From d4f48e3ff92d1d9ea05f5d8b91e37a29eba0ac89 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 1 Dec 2017 03:25:02 +0000 Subject: [PATCH] os: ignore Chtimes test failure on NetBSD if fs mounted noatime Fixes #19293 Change-Id: I35f2f786e2e3972eda21ba5a948433bfcd621269 Reviewed-on: https://go-review.googlesource.com/81355 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/os/os_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/os/os_test.go b/src/os/os_test.go index 2d608f4b24..804cf4a1db 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -1190,7 +1190,12 @@ func testChtimes(t *testing.T, name string) { // the contents are accessed; also, it is set // whenever mtime is set. case "netbsd": - t.Logf("AccessTime didn't go backwards; was=%v, after=%v (Ignoring. See NetBSD issue golang.org/issue/19293)", at, pat) + mounts, _ := ioutil.ReadFile("/proc/mounts") + if strings.Contains(string(mounts), "noatime") { + t.Logf("AccessTime didn't go backwards, but see a filesystem mounted noatime; ignoring. Issue 19293.") + } else { + t.Logf("AccessTime didn't go backwards; was=%v, after=%v (Ignoring on NetBSD, assuming noatime, Issue 19293)", at, pat) + } default: t.Errorf("AccessTime didn't go backwards; was=%v, after=%v", at, pat) } -- 2.50.0