From 3e73998710e3073b2280af74da44004d34b78254 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 26 Oct 2015 23:08:37 +0100 Subject: [PATCH] atime unit test: do not compare input file's current atime and explain why (missing O_NOATIME open mode modified the atime at backup time). --- borg/testsuite/archiver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py index b476c77d3..4d5f96146 100644 --- a/borg/testsuite/archiver.py +++ b/borg/testsuite/archiver.py @@ -297,7 +297,10 @@ class ArchiverTestCase(ArchiverTestCaseBase): sti = os.stat('input/file1') sto = os.stat('output/input/file1') assert st_mtime_ns(sti) == st_mtime_ns(sto) == mtime * 1e9 - assert st_atime_ns(sti) == st_atime_ns(sto) == atime * 1e9 + # to support testing on platforms without O_NOATIME open mode, we just + # compare the restored file with the original atime (not with the + # atime it has now). + assert st_atime_ns(sto) == atime * 1e9 def _extract_repository_id(self, path): return Repository(self.repository_path).id