-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix intermittent failures in PAL tests #115958
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates several PAL threading tests to use high-resolution tick measurements and converts raw tick deltas into milliseconds to reduce timing-related test flakiness.
- Replaced
minipal_lowres_ticks()
withminipal_hires_ticks()
- Divided tick differences by
(minipal_hires_tick_frequency() / 1000)
to produce millisecond values - Applied these changes consistently across WaitForSingleObject, WaitForMultipleObjectsEx, SleepEx, and Sleep test cases
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/SleepEx/test2/test2.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/SleepEx/test1/test1.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/Sleep/test2/sleep.cpp | Swap low-res ticks for high-res and convert to ms |
src/coreclr/pal/tests/palsuite/threading/Sleep/test1/Sleep.cpp | Swap low-res ticks for high-res and convert to ms |
...reclr/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExThreadTest/WFSOExThreadTest.cpp
Show resolved
Hide resolved
...pal/tests/palsuite/threading/WaitForSingleObject/WFSOExSemaphoreTest/WFSOExSemaphoreTest.cpp
Show resolved
Hide resolved
...coreclr/pal/tests/palsuite/threading/WaitForSingleObject/WFSOExMutexTest/WFSOExMutexTest.cpp
Show resolved
Hide resolved
src/coreclr/pal/tests/palsuite/threading/WaitForMultipleObjectsEx/test2/test2.cpp
Show resolved
Hide resolved
Example of a failure: https://helix.dot.net/api/2019-06-17/jobs/30c36749-2cf4-4fa9-a5bb-71292b5a72a4/workitems/PALTests/console
|
/azp run runtime-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
cc @huoyaoyuan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le sigh... Thank you.
/ba-g known issue #115640 |
Fixing regression introduced by #115877. The lowres timestamp has a rounding error that makes the test fail intermittently. Switch back to highres timestamp.