From d465b5b9ad991c2dfcfb0655ac4f411f95888495 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 1 May 2020 17:11:30 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"Darwin=20test=20fix:=20allow=201?= =?UTF-8?q?=CE=BCs=20timestamp=20difference"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f3016a90960ae671c28497746d132eace2b65ead. --- cmd/restic/integration_helpers_test.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cmd/restic/integration_helpers_test.go b/cmd/restic/integration_helpers_test.go index d277184f2..136ec6fe0 100644 --- a/cmd/restic/integration_helpers_test.go +++ b/cmd/restic/integration_helpers_test.go @@ -72,17 +72,7 @@ func sameModTime(fi1, fi2 os.FileInfo) bool { } } - same := fi1.ModTime().Equal(fi2.ModTime()) - if !same && (runtime.GOOS == "darwin" || runtime.GOOS == "openbsd") { - // Allow up to 1μs difference, because macOS <10.13 cannot restore - // with nanosecond precision and the current version of Go (1.9.2) - // does not yet support the new syscall. (#1087) - mt1 := fi1.ModTime() - mt2 := fi2.ModTime() - usecDiff := (mt1.Nanosecond()-mt2.Nanosecond())/1000 + (mt1.Second()-mt2.Second())*1000000 - same = usecDiff <= 1 && usecDiff >= -1 - } - return same + return fi1.ModTime().Equal(fi2.ModTime()) } // directoriesEqualContents checks if both directories contain exactly the same