Skip to content

Commit e1ba7f6

Browse files
zhuyifei1999anakryiko
authored andcommitted
selftests/bpf: Relax time_tai test for equal timestamps in tai_forward
We're observing test flakiness on an arm64 platform which might not have timestamps as precise as x86. The test log looks like: test_time_tai:PASS:tai_open 0 nsec test_time_tai:PASS:test_run 0 nsec test_time_tai:PASS:tai_ts1 0 nsec test_time_tai:PASS:tai_ts2 0 nsec test_time_tai:FAIL:tai_forward unexpected tai_forward: actual 1702348135471494160 <= expected 1702348135471494160 test_time_tai:PASS:tai_gettime 0 nsec test_time_tai:PASS:tai_future_ts1 0 nsec test_time_tai:PASS:tai_future_ts2 0 nsec test_time_tai:PASS:tai_range_ts1 0 nsec test_time_tai:PASS:tai_range_ts2 0 nsec #199 time_tai:FAIL This patch changes ASSERT_GT to ASSERT_GE in the tai_forward assertion so that equal timestamps are permitted. Fixes: 64e1582 ("selftests/bpf: Add BPF-helper test for CLOCK_TAI access") Signed-off-by: YiFei Zhu <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 745e031 commit e1ba7f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tools/testing/selftests/bpf/prog_tests/time_tai.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void test_time_tai(void)
5656
ASSERT_NEQ(ts2, 0, "tai_ts2");
5757

5858
/* TAI is moving forward only */
59-
ASSERT_GT(ts2, ts1, "tai_forward");
59+
ASSERT_GE(ts2, ts1, "tai_forward");
6060

6161
/* Check for future */
6262
ret = clock_gettime(CLOCK_TAI, &now_tai);

0 commit comments

Comments
 (0)