From b4c4bf0b3fb643f6f27a24a426fbe4c482a0d199 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 21 May 2025 14:39:39 +0200 Subject: [PATCH] tests: fix diff cmd test on macOS HFS+, fixes #8860 If we touch too quickly after file creation, it would not noticably update the timestamp. --- src/borg/testsuite/archiver/diff_cmd_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/borg/testsuite/archiver/diff_cmd_test.py b/src/borg/testsuite/archiver/diff_cmd_test.py index d4249d820..8d5735154 100644 --- a/src/borg/testsuite/archiver/diff_cmd_test.py +++ b/src/borg/testsuite/archiver/diff_cmd_test.py @@ -53,6 +53,7 @@ def test_basic_functionality(archivers, request): create_regular_file(archiver.input_path, "file_replaced", contents=b"0" * 4096) os.unlink("input/file_removed") os.unlink("input/file_removed2") + time.sleep(1) # macOS HFS+ has a 1s timestamp granularity Path("input/file_touched").touch() os.rmdir("input/dir_replaced_with_file") create_regular_file(archiver.input_path, "dir_replaced_with_file", size=8192)