From 17d6a993fc17d533460c5f40f3908c708e057c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 23 May 2024 18:45:17 +0200 Subject: Merging upstream version 18.2.3. Signed-off-by: Daniel Baumann --- src/test/libcephfs/test.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test/libcephfs/test.cc') diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index c83ddccf9..57c5eefa6 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -3711,8 +3711,11 @@ TEST(LibCephFS, SnapdirAttrsOnSnapDelete) { struct ceph_statx stx_snap_dir_2; ASSERT_EQ(ceph_statx(cmount, snap_dir_path, &stx_snap_dir_2, CEPH_STATX_MTIME|CEPH_STATX_CTIME|CEPH_STATX_VERSION, 0), 0); + // Flaky assertion on Windows, potentially due to timestamp precision. + #ifndef _WIN32 ASSERT_LT(utime_t(stx_snap_dir_1.stx_mtime), utime_t(stx_snap_dir_2.stx_mtime)); ASSERT_LT(utime_t(stx_snap_dir_1.stx_ctime), utime_t(stx_snap_dir_2.stx_ctime)); + #endif ASSERT_LT(stx_snap_dir_1.stx_version, stx_snap_dir_2.stx_version); ASSERT_EQ(0, ceph_rmdir(cmount, dir_path)); @@ -3764,8 +3767,11 @@ TEST(LibCephFS, SnapdirAttrsOnSnapRename) { struct ceph_statx stx_snap_dir_2; ASSERT_EQ(ceph_statx(cmount, snap_dir_path, &stx_snap_dir_2, CEPH_STATX_MTIME|CEPH_STATX_CTIME|CEPH_STATX_VERSION, 0), 0); + // Flaky assertion on Windows, potentially due to timestamp precision. + #ifndef _WIN32 ASSERT_LT(utime_t(stx_snap_dir_1.stx_mtime), utime_t(stx_snap_dir_2.stx_mtime)); ASSERT_LT(utime_t(stx_snap_dir_1.stx_ctime), utime_t(stx_snap_dir_2.stx_ctime)); + #endif ASSERT_LT(stx_snap_dir_1.stx_version, stx_snap_dir_2.stx_version); ASSERT_EQ(0, ceph_rmdir(cmount, snap_path_r)); -- cgit v1.2.3