Closed JonathanKnam closed 1 year ago
/azp run
So I see the error in the tests:
iothub_client/src/iothub_client_ll_uploadtoblob.c Func:IoTHubClient_LL_UploadToBlob_SetOption Line:1052 trying to set an openssl engine while the authentication scheme is not x509
and
iothub_client/src/iothub_client_ll_uploadtoblob.c Func:IoTHubClient_LL_UploadToBlob_SetOption Line:1020 trying to set a x509 private key type while the authentication scheme is not x509
Basically I could adjust the logic, to also accept these arguments (engine and private key) in case it uses no certificate based authentication (x509). Can probably be achieved by just reverting my second commit 090ade74.
Or actually I should probably adjust the tests, to set the required property beforehand.
/azp run
/azp run
The following tests FAILED: 61 - iothub_client_ll_u2b_ut (Failed) 62 - iothub_client_ll_u2b_ut_valgrind (Failed) 63 - iothub_client_ll_u2b_ut_helgrind (Failed) 64 - iothub_client_ll_u2b_ut_drd (Failed)
I can repro this on my system: likely the Unit test expectations on expected API calls are incorrect.
The 3 new UTs are failing:
Executing test IoTHubClient_LL_UploadToBlob_SetOption_openssl_engine_type_succeeds ...
Assert failed in line 1429 Expected: , Actual: [mallocAndStrcpy_s(0x7fffffffd7c0,"pkcs11")]
Test IoTHubClient_LL_UploadToBlob_SetOption_openssl_engine_type_succeeds result = !!! FAILED !!!
Executing test IoTHubClient_LL_UploadToBlob_SetOption_openssl_private_key_type_succeeds ...
Assert failed in line 1410 Expected: , Actual: [gballoc_malloc(4)]
Test IoTHubClient_LL_UploadToBlob_SetOption_openssl_private_key_type_succeeds result = !!! FAILED !!!
Executing test IoTHubClient_LL_UploadToBlob_Destroy_handle_x509_succeeds ...
Assert failed in line 992 Expected: , Actual: [gballoc_free(0x555555983470)][gballoc_free(0x55555597e240)]
Test IoTHubClient_LL_UploadToBlob_Destroy_handle_x509_succeeds result = !!! FAILED !!!
To repro, configure the following CMake options (I find it easier to use ccmake
or cmake-gui
):
CMAKE_BUILD_TYPE Debug
run_unittests ON
Then run
./build/iothub_client/tests/iothubclient_ll_u2b_ut/iothub_client_ll_u2b_ut_exe
/azp run
@CIPop Thanks for merging, and also for the explanations about the missing parts in the unittests.