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

Fix #425, Correct Test_OS_ConvertToArrayIndex assertion typo #428

Conversation

yammajamma
Copy link
Contributor

@yammajamma yammajamma commented Apr 20, 2020

Fix #425 Test_OS_ConvertToArrayIndex: tautological assertion

Describe the contribution
Unit test Test_OS_ConvertToArrayIndex implements the following assertion:
osal/src/unit-test-coverage/shared/src/coveragetest-idmap.c

Lines 610 to 611 in 7d9c4c8

UtAssert_True(local_idx1 == local_idx1, "local_idx1 (%lu) == local_idx2 (%lu)",
(unsigned long)local_idx1, (unsigned long)local_idx2);

This is a tautological assertion as it compares local_idx1 with itself.

Update:
local_idx1 is now compared with local_idx2:

UtAssert_True(local_idx1 == local_idx2, "local_idx1 (%lu) == local_idx2 (%lu)",
(unsigned long)local_idx1, (unsigned long)local_idx2);

Testing performed
Steps taken to test the contribution:

  1. Standard build and ran unit tests.

Expected behavior changes

System(s) tested on
cFS Dev Server
OS: Ubuntu 18.04
Versions: OSAL 5.0.11.0

Contributor Info - All information REQUIRED for consideration of pull request
Yasir Khan
NASA-GSFC

@skliper skliper changed the title Fix, 425 Test_OS_ConvertToArrayIndex: tautological assertion Fix #425, Correct Test_OS_ConvertToArrayIndex assertion typo Apr 20, 2020
@skliper
Copy link
Contributor

skliper commented Apr 20, 2020

@yammajamma amend commit (git commit --amend and force push to fork) to match updated pull request title. Also, use a key word in the description to auto-link the pull request to the issue - Fixes #428 preferred.

@yammajamma yammajamma force-pushed the fix-425-Tautological-Assertion-Fix branch from c3469e5 to eb0230f Compare April 20, 2020 19:01
@skliper skliper added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Apr 20, 2020
@skliper skliper added this to the 5.1.0 milestone Apr 20, 2020
@astrogeco astrogeco added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Apr 21, 2020
@astrogeco
Copy link
Contributor

CCB 20200422 - APPROVED

@skliper skliper added CCB - 20200422 CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Apr 22, 2020
@astrogeco astrogeco changed the base branch from master to integration-candidate April 27, 2020 22:58
@astrogeco astrogeco merged commit f31e2d9 into nasa:integration-candidate Apr 28, 2020
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
issue nasa#427, adding travis.yml for cppcheck on flight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test_OS_ConvertToArrayIndex: tautological assertion
3 participants