Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Integration test for PLDM request/response #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mlvisaya
Copy link
Collaborator

@mlvisaya mlvisaya commented Feb 21, 2025

Add Integration test for PLDM request/response

  1. Add new integration test feature test-pldm-request-response

This simulates an environment where in the emulator acting as a BMC
sends out GetTidRequest and SetTIDRequest messages. It then expects the
device to respond with the correct GetTidResponse and SetTIDResponse
messages.

The test frameworks allows for easily adding more types of
request/respond messages if needed.

To run the test:
cargo t -p tests-integration -- --test test_pldm_request_respons

  1. Introduce pldm-ua (PLDM update agent) library

This library provides implementation of the PLDM Update Agent.
Currently, it only defines a generic PLDM transport that will be used
for all PLDM communication.

  1. Create a wrapper for PLDM Transport

The PLDM-UA library provides a trait that abstracts the implementation
of the PLDM transport, so that PLDM will be able to work on any kind of
tranport layer.

An implementation for the MCTP transport is provided for this purpose.
A test MockTransport is also provided to be used for unit tests.

  1. Create a new MCTP API method to allow reception of both requests and
    response

@mlvisaya mlvisaya force-pushed the mlvisaya/pldm-request-response-test2 branch 2 times, most recently from 25ac5d1 to e7b7312 Compare February 26, 2025 18:25
1. Add new integration test feature test-pldm-request-response
This simulates an environment where in the emulator acting as a BMC
sends out GetTidRequest and SetTIDRequest messages. It then expects the
device to respond with the correct GetTidResponse and SetTIDResponse
messages.

The test frameworks allows for easily adding more types of
request/respond messages if needed.

To run the test:
cargo t -p tests-integration -- --test test_pldm_request_respons

2. Introduce pldm-ua (PLDM update agent) library
This library provides implementation of the PLDM Update Agent.
Currently, it only defines a generic PLDM transport that will be used
for all PLDM communication.

3. Create a wrapper for PLDM Transport
The PLDM-UA library provides a trait that abstracts the implementation
of the PLDM transport, so that PLDM will be able to work on any kind of
tranport layer.

An implementation for the MCTP transport is provided for this purpose.
A test MockTransport is also provided to be used for unit tests.

4. Create a new MCTP API method to allow reception of both requests and
response
@mlvisaya mlvisaya force-pushed the mlvisaya/pldm-request-response-test2 branch from e7b7312 to bc17180 Compare February 26, 2025 18:28
@mlvisaya mlvisaya marked this pull request as ready for review February 26, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant