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

VxWorks OS_CountSemCreate unit test fails #542

Closed
mbenson1 opened this issue Jul 2, 2020 · 3 comments · Fixed by #681 or #690
Closed

VxWorks OS_CountSemCreate unit test fails #542

mbenson1 opened this issue Jul 2, 2020 · 3 comments · Fixed by #681 or #690
Assignees
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@mbenson1
Copy link

mbenson1 commented Jul 2, 2020

Describe the bug
The OS_CountSemCreate unit test, "#4 Initial-count-too-high", fails. This is because the vxworks OSAL, as written, does not check the initial count. Rather, it passes it directly to the OS call.

Expected behavior
It should pass.

System observed on:

  • AiTech SP0-S
  • OS: VxWorks 6.9
  • OSAL 5.0.3-bv

Reporter Info
Mathew Benson
Windhover Labs

@jphickey jphickey transferred this issue from nasa/cFS Jul 15, 2020
@jphickey
Copy link
Contributor

Just checked into this - and it is probably related to the value of SEM_VALUE_MAX

The test is supposed to be skipped as "NA" if the system doesn't define a specific maximum, but an issue would occur if the SEM_VALUE_MAX was actually defined as value 0xFFFFFFFF - in this case it would wrap and therefore pass 0, and the test wouldn't work properly.

@jphickey
Copy link
Contributor

@mbenson1 can you confirm if your platform defines a SEM_VALUE_MAX macro and if so, what is the actual value?

skliper added a commit to skliper/osal that referenced this issue Dec 9, 2020
skliper added a commit to skliper/osal that referenced this issue Dec 9, 2020
@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label Dec 9, 2020
@skliper skliper added this to the 6.0.0 milestone Dec 9, 2020
@skliper
Copy link
Contributor

skliper commented Dec 9, 2020

Pushed a potential fix (#681). @mbenson1 can you confirm this solves the issue? If not we will need more information to resolve.

@skliper skliper self-assigned this Dec 9, 2020
@astrogeco astrogeco added the bug label Dec 16, 2020
astrogeco added a commit that referenced this issue Dec 18, 2020
Fix #542, Avoid UT failure if SEM_VALUE_MAX >= UINT32_MAX
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#539, build failure in UT stubs with multiple CPUs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
4 participants