syscalls/timerfd04: incorrect CLOCK_BOOTIME end
PATCH 1/1 syscalls/timerfd04: incorrect CLOCK_BOOTIME end
The end time was hardcoded to CLOCK_MONOTONIC and needs to be changed to the clk_id of the test case.
Signed-off-by Edward Liaw <[email protected]>
Change-Id I28c5b7d0132bf32cae6c50faa7d300ded42cc9f7
--- testcases/kernel/syscalls/timerfd/timerfd04.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/timerfd/timerfd04.c +2 -2
@@ -94,9 +94,9 @@ static void verify_timerfd(unsigned int n)SAFE_WAIT (NULL ); -if (tv->clock_gettime (CLOCK_MONOTONIC ,tst_ts_get (&end))) { +if (tv->clock_gettime (tc->clk_id,tst_ts_get (&end))) {tst_res (TFAIL |TERRNO ,"clock_gettime(2) failed for clock %s" , -tst_clock_name (CLOCK_MONOTONIC )); +tst_clock_name (tc->clk_id));return ; }
Signature · 5 lines
2.37.1.455.g008518b4e5-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Edward,
Quoted 2 lines
The end time was hardcoded to
CLOCK_MONOTONICand needs to be changed to theclk_idof the test case.
Good catch! This bug has been since ever, probably because reproducible only on bare metal SUT (wrong clock works on VM).
Thanks, merged!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp