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

Improve POSIX mutex test #484

Closed
shankar-in opened this issue Jan 11, 2021 · 0 comments · Fixed by #545
Closed

Improve POSIX mutex test #484

shankar-in opened this issue Jan 11, 2021 · 0 comments · Fixed by #545
Assignees
Labels
test A module/integration/stress/etc test for a component

Comments

@shankar-in
Copy link
Contributor

Brief feature description

Using the While loop will consume CPU cycles and other threads will have to wait. Using the sleep_for will free up the CPU for the define time so that other threads can utilize.-

Detailed information

The test_posix_mutex.cpp has DestructorFailsOnLockedMutex test case. It uses deadline timer with a While loop and this can be improved by replacing with sleep_for. Hint suggestion from @elBoberido ,
EXPECT_DEATH({{ iox::posix::mutex mtx{false}; mtx.lock; }}, ".*");

@mossmaurice mossmaurice added the test A module/integration/stress/etc test for a component label Jan 12, 2021
shankar-in added a commit to nihalchari/iceoryx that referenced this issue Feb 2, 2021
Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <Sankara.Narayanan@in.bosch.com>
nihalchari pushed a commit to nihalchari/iceoryx that referenced this issue Feb 5, 2021
Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <Sankara.Narayanan@in.bosch.com>
nihalchari pushed a commit to nihalchari/iceoryx that referenced this issue Feb 5, 2021
Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <Sankara.Narayanan@in.bosch.com>
nihalchari pushed a commit to nihalchari/iceoryx that referenced this issue Feb 5, 2021
nihalchari pushed a commit to nihalchari/iceoryx that referenced this issue Feb 5, 2021
Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <Sankara.Narayanan@in.bosch.com>
nihalchari pushed a commit to nihalchari/iceoryx that referenced this issue Feb 8, 2021
…tex test

Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <Sankara.Narayanan@in.bosch.com>
marthtz added a commit that referenced this issue Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test A module/integration/stress/etc test for a component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants