From: Lucian Petrut Date: Mon, 12 Sep 2022 08:34:06 +0000 (+0000) Subject: test/libcephfs: disable flaky timestamp assertion on Windows X-Git-Tag: v18.1.0~369^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=197251e1d1f546fd3e7ec16a9f3ef621f064e313;p=ceph.git 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 --- diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index a6094a7e5c97..058daba6c168 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];