-
Notifications
You must be signed in to change notification settings - Fork 216
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
count-sem-test, bin-sem-test intermittently fail on POSIX as non-root user #1445
Comments
Here is the output of
|
here is the output of
|
Looks like it's failing due to the non-root scheduling. Likely needs more relaxed asserts in the case where priorities aren't strictly enforced. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
count-sem-test and bin-sem-test unit tests fail intermittently on POSIX systems when running the tests as a non-elevated user when OSAL_CONFIG_DEBUG_PERMISSIVE_MODE is True. Both tests fail for the same reason. The tests spawn multiple tasks with different priority and assert that the highest priority task executes before the others. When running the tests on Linux as a regular user it is not possible to set the thread priority. When OSAL_CONFIG_DEBUG_PERMISSIVE_MODE set to True any attempt to set the thread priority is ignored. In this mode there is no guarantee which task executes first causing the tests to fail intermittently.
To Reproduce
Build OSAL with tests for generic-linux on any Linux PC as described in the quick start
Run bin-sem-test or count-sem-test in a loop as a regular user. It will eventually fail. See the test outputs below for the failing case.
Note that running the tests in a loop as root does not seem to fail.
Expected behavior
The tests should always pass.
Code snips
bin-sem-test.c
count-sem-test.c
System observed on:
Additional context
Reporter Info
Andrew Hatstat, Geost
The text was updated successfully, but these errors were encountered: