From 197251e1d1f546fd3e7ec16a9f3ef621f064e313 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Mon, 12 Sep 2022 08:34:06 +0000 Subject: [PATCH] test/libcephfs: disable flaky timestamp assertion on Windows The LibCephFS.SnapXattrs test takes two snapshots and then compares the timestamps, expecting the latter one to be newer. On Windows, the snapshot timestamps are sometimes the same, in which case the test fails. For now, we'll disable this check on Windows. Signed-off-by: Lucian Petrut --- src/test/libcephfs/test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index a6094a7e5c9..058daba6c16 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -2490,7 +2490,10 @@ TEST(LibCephFS, SnapXattrs) { ASSERT_EQ('.', *s); *s = '\0'; utime_t new_btime = utime_t(strtoull(gxattrv2, NULL, 10), strtoull(s + 1, NULL, 10)); + #ifndef _WIN32 + // This assertion sometimes fails on Windows, possibly due to the clock precision. ASSERT_LT(btime, new_btime); + #endif // listxattr() shouldn't return snap.btime vxattr char xattrlist[512]; -- 2.39.5