-
Notifications
You must be signed in to change notification settings - Fork 7.4k
posix_apis: fails at test_posix_realtime for mimxrt1024_evk #35703
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
Comments
possibly related to #33544 |
I find the test that is failing to be somewhat confusing.
Some related items do rank fairly high on the nice-to-have scale though (#6498, #25559, #28542) and it would be great to chat about it at the next review. |
I see the exact same failure on nrf9160dk_nrf9160_ns. Other platforms on our farm don't show it. |
I reproduced this on the rt1024_evk I have. |
@cfriedt is correct in his assessment. You can minimize the problem by putting the two clock_gettime() calls back to back without the zassert_equal() check. But I think this test case should account for edge conditions. I converted the tv_nsec to TICKS and did some test runs and when it fails it is typically off by 1 TICK. The "Nanoseconds not equal" should probably be ((rts-mts) <= 1) type of test or make the 1 be some sort of configurable value that would encompass the edge cases. On the rt1024, there are 10000 ticks per sec so the two calls to have to happen within the same 100usec window. |
@dleach02 - Thanks for tagging me - improving clocking has been on my to-do list for a very long time. Probably not going to make it for LTS but it would be great to being it up in dev-review at some point |
I looked at this because it initially was flagged against an NXP board. I just received the board and tried it out. The "fix" I was suggesting would be the following:
Or remove this particular test case... |
I would be open to removing the test |
The test assumed initial equality between CLOCK_MONOTONIC and CLOCK_REALTIME and also assumed coarse granularity for each clock. Neither of those assumptions are solid. Furthermore, the test failed on multiple vendor boards which caused some concern. Remove the poorly conditioned tests and remove some comments / printks. Fixes zephyrproject-rtos#35703 Signed-off-by: Christopher Friedt <[email protected]>
dev-review: (sept 2, 2021): suggestion to @cfriedt to open an issue to track rfc/enhancement around this area. |
The test assumed initial equality between CLOCK_MONOTONIC and CLOCK_REALTIME and also assumed coarse granularity for each clock. Neither of those assumptions are solid. Furthermore, the test failed on multiple vendor boards which caused some concern. Remove the poorly conditioned tests and remove some comments / printks. Fixes #35703 Signed-off-by: Christopher Friedt <[email protected]>
Describe the bug
only this board has such issue, all other rt1xxx series boards are OK.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
pass
Impact
posix realtime
Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: