Skip to content

Commit 604701d

Browse files
jtlaytonpevik
authored andcommitted
syscalls/statx06: use a fine-grained timestamp for the second time fetch
I have a patchset in progress to change the kernel to sometimes use fine-grained timestamps for the mtime/ctime. With this, the statx06 test sometimes fails. Change the test to grab a fine-grained timestamp for the "after" value, which fixes the issue. Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Cyril Hrubis <[email protected]> Reviewed-by: Petr Vorel <[email protected]> Reviewed-by: Yang Xu <[email protected]> [ pvorel: Although patchset [1] has not been merged, we agreed that the change is backward compatible anyway. ] Signed-off-by: Jeff Layton <[email protected]> [1] https://lore.kernel.org/lkml/[email protected]/
1 parent ff415bb commit 604701d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcases/kernel/syscalls/statx/statx06.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static void test_statx(unsigned int test_nr)
109109
clock_wait_tick();
110110
tc->operation();
111111
clock_wait_tick();
112-
SAFE_CLOCK_GETTIME(CLOCK_REALTIME_COARSE, &after_time);
112+
SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &after_time);
113113

114114
TEST(statx(AT_FDCWD, TEST_FILE, 0, STATX_BASIC_STATS | STATX_BTIME, &buff));
115115
if (TST_RET != 0) {

0 commit comments

Comments
 (0)