UnitTest/TestSpdmRequester/TestSpdmRequesterGetVersion.c
/**
  Test 7: receiving a RequestResynch ERROR message from the responder.
  Expected behavior: client returns a Status of RETURN_DEVICE_ERROR, and the
  internal state should be reset.
  Note: As from 1.1.c, this is an unexpected behavior, as the responder should not
  respond a GET_VERSION message with a RequestResynch. It should expect a GET_VERSION.
**/
Test 7: receiving a RequestResynch ERROR message from the responder.
Expected behavior: client returns a Status of RETURN_DEVICE_ERROR, and the
internal state should be reset.
Note: As from 1.1.c, this is an unexpected behavior, as the responder should not
respond a GET_VERSION message with a RequestResynch. It should expect a GET_VERSION.
Test 7 : receiving a RequestResynch ERROR message from the responder . Expected behavior : client returns a Status of RETURN_DEVICE_ERROR and the internal state should be reset . Note : As from 1 . 1 . c this is an unexpected behavior as the responder should not respond a GET_VERSION message with a RequestResynch . It should expect a GET_VERSION .
void TestSpdmRequesterGetVersionCase7(void **state) {
  RETURN_STATUS        Status;
  SPDM_TEST_CONTEXT    *SpdmTestContext;
  SPDM_DEVICE_CONTEXT  *SpdmContext;
  SpdmTestContext = *state;
  SpdmContext = SpdmTestContext->SpdmContext;
  SpdmTestContext->CaseId = 0x7;
  Status = SpdmGetVersion (SpdmContext);
  assert_int_equal (Status, RETURN_DEVICE_ERROR);
  assert_int_equal (SpdmContext->ConnectionInfo.ConnectionState, SpdmConnectionStateNotStarted);
}
void TestSpdmRequesterGetVersionCase7 ( void * * state ) { RETURN_STATUS Status ; SPDM_TEST_CONTEXT * SpdmTestContext ; SPDM_DEVICE_CONTEXT * SpdmContext ; SpdmTestContext = * state ; SpdmContext = SpdmTestContext -> SpdmContext ; SpdmTestContext -> CaseId = 0x7 ; Status = SpdmGetVersion ( SpdmContext ) ; assert_int_equal ( Status , RETURN_DEVICE_ERROR ) ; assert_int_equal ( SpdmContext -> ConnectionInfo . ConnectionState , SpdmConnectionStateNotStarted ) ; }
Test 7: receiving a RequestResynch ERROR message from the responder.
Test 7 : receiving a RequestResynch ERROR message from the responder .