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

Add test to validate priority-based wakeup on semaphores #1059

Open
jphickey opened this issue May 27, 2021 · 0 comments
Open

Add test to validate priority-based wakeup on semaphores #1059

jphickey opened this issue May 27, 2021 · 0 comments
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
OSAL semaphores should implement priority-based wakeup, as opposed to FIFO. This currently is not validated by any test.

Describe the solution you'd like
Should implement a new unit test to confirm that priority-based semaphores are working as expected. Basic procedure should be something like:

  1. Create a semaphore with value 0
  2. Create a low priority task which blocks on the semaphore
  3. Create a high priority task which also blocks on the semaphore
  4. Give the semaphore
  5. Confirm only high priority task woke up, low priority still blocked
  6. Give the semaphore again
  7. Confirm low priority task woke up

Additional context
This test depends on actual task priorities being set in the OS scheduler, which may not happen when running as a normal user and using OS_CONFIG_PERMISSIVE_MODE option. This test would have to be bypassed in that case.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@skliper skliper added the unit-test Tickets related to the OSAL unit testing (functional and/or coverage) label May 28, 2021
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
…tub_doc

Fix nasa#1059, Correct documentation for CFE_SB_GetPipeName() stub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
Development

No branches or pull requests

2 participants