[U-Boot] dm: rtc: random Gitlab results for dm_test_rtc_dual()
Heinrich Schuchardt
xypron.glpk at gmx.de
Thu Oct 31 04:10:13 UTC 2019
Hello Simon,
the gitlab 'sandbox test.py' job seems to be kind of a lottery:
https://gitlab.denx.de/u-boot/custodians/u-boot-efi/-/jobs/25678
Job succeeded
https://gitlab.denx.de/u-boot/custodians/u-boot-efi/-/jobs/25499
/u-boot-efi/test/dm/rtc.c:167, dm_test_rtc_dual():
-EINVAL == cmp_times(&now1, &cmp, false):
Expected -22, got 0\r\r\nFailures: 1'.endswith
dm_test_rtc_dual() fails or succeeds for the same code.
@Tom:
Did you also see such spurious results?
At first sight I could not anything wrong in the dm_test_rtc_dual() test
assuming that the Gitlab environment provides a monotonic clock for the
time() function.
The findings below do not explain the problem:
now2 is read but never used. We are testing that we can get the time
from emul2 later on. So I think this line is not needed.
The offset of emul1 is not set before reading now1. If it were -2 (but I
would not know why it should get to that value), than setting offset + 1
for emul2 would be a NOP. So shouldn't we set the offset of emul1 to a
well defined value before reading now1?
Shouldn't dm_test_rtc_dual() reset the offset of emul2 to 0 before
returning?
Best regards
Heinrich
More information about the U-Boot
mailing list