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

Explicitly set pointer to NULL #497

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

kstribrnAmzn
Copy link
Member

Description

Fixing test cases by explicitly setting
pContext pointer to NULL for later check.

Testing

Checked out OTA package, built unit tests, observed two failing tests.
Build commands:

cmake -S test -B build
make -C build all
cd build && ctest

Previously failing tests:

Test project /home/kstribrn/workspace/ota-for-aws-iot-embedded-sdk/build
    Start 1: ota_utest
1/4 Test #1: ota_utest ........................***Failed    0.02 sec
    Start 2: ota_base64_utest
2/4 Test #2: ota_base64_utest .................   Passed    0.00 sec
    Start 3: ota_cbor_utest
3/4 Test #3: ota_cbor_utest ...................   Passed    0.00 sec
    Start 4: ota_os_posix_utest
4/4 Test #4: ota_os_posix_utest ...............   Passed    5.01 sec

75% tests passed, 1 tests failed out of 4

Total Test time (real) =   5.03 sec

The following tests FAILED:
	  1 - ota_utest (Failed)
Errors while running CTest

/home/kstribrn/workspace/ota-for-aws-iot-embedded-sdk/test/unit-test/ota_utest.c:3603:test_OTA_parseJobFailsMoreBlocksThanBitmap:FAIL: Expected NULL
/home/kstribrn/workspace/ota-for-aws-iot-embedded-sdk/test/unit-test/ota_utest.c:3623:test_OTA_extractParameterFailInvalidJobDocModel:FAIL: Expected NULL
-----------------------
150 Tests 2 Failures 0 Ignored 

Test results now:

Test project /home/kstribrn/workspace/ota-for-aws-iot-embedded-sdk/build
    Start 1: ota_utest
1/4 Test #1: ota_utest ........................   Passed    0.02 sec
    Start 2: ota_base64_utest
2/4 Test #2: ota_base64_utest .................   Passed    0.00 sec
    Start 3: ota_cbor_utest
3/4 Test #3: ota_cbor_utest ...................   Passed    0.00 sec
    Start 4: ota_os_posix_utest
4/4 Test #4: ota_os_posix_utest ...............   Passed    5.00 sec

100% tests passed, 0 tests failed out of 4

Total Test time (real) =   5.03 sec

Checklist:

  • I have tested my changes. No regression in existing tests.
  • My code is formatted using Uncrustify.
  • I have read and applied the rules stated in CONTRIBUTING.md.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fixing test cases by explicitly setting
pContext pointer to NULL for later check.
@kstribrnAmzn kstribrnAmzn merged commit d85b8d7 into aws:main Sep 14, 2023
12 checks passed
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.

3 participants