From ce111536994e37f470fbe5dc4c425baaffe87057 Mon Sep 17 00:00:00 2001 From: Edward Liaw Date: Wed, 3 Aug 2022 23:50:11 +0000 Subject: 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. Fixes: 0c443ca40 ("syscalls/timerfd04: Add time namespace test") Fixes: 2f8f989d1 ("syscalls/timerfd: Add support for time64 tests") Bug: 241307310 Test: atest vts_ltp_test_arm_64:syscalls.timerfd04_64bit#syscalls.timerfd04_64bit Reviewed-by: Petr Vorel Signed-off-by: Edward Liaw (cherry picked from commit 2761a81c4ddfac3e1003618768ae028668ceef12) Change-Id: I28c5b7d0132bf32cae6c50faa7d300ded42cc9f7 --- testcases/kernel/syscalls/timerfd/timerfd04.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/timerfd/timerfd04.c b/testcases/kernel/syscalls/timerfd/timerfd04.c index 4af91d6f8..eb7f98d5b 100644 --- a/testcases/kernel/syscalls/timerfd/timerfd04.c +++ b/testcases/kernel/syscalls/timerfd/timerfd04.c @@ -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; } -- cgit v1.2.3