diff options
author | Lucian Petrut <lpetrut@cloudbasesolutions.com> | 2022-09-12 10:34:06 +0200 |
---|---|---|
committer | Lucian Petrut <lpetrut@cloudbasesolutions.com> | 2022-11-10 08:38:14 +0100 |
commit | 197251e1d1f546fd3e7ec16a9f3ef621f064e313 (patch) | |
tree | 6ffa6423200f1b2256e24270889ddef6393b58ff /src/test/libcephfs | |
parent | client: use _setattrx when changing timestamps (diff) | |
download | ceph-197251e1d1f546fd3e7ec16a9f3ef621f064e313.tar.xz ceph-197251e1d1f546fd3e7ec16a9f3ef621f064e313.zip |
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 <lpetrut@cloudbasesolutions.com>
Diffstat (limited to 'src/test/libcephfs')
-rw-r--r-- | src/test/libcephfs/test.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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]; |