From: Brad Fitzpatrick Date: Fri, 1 Dec 2017 03:25:02 +0000 (+0000) Subject: os: ignore Chtimes test failure on NetBSD if fs mounted noatime X-Git-Tag: go1.10beta1~74 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d4f48e3ff92d1d9ea05f5d8b91e37a29eba0ac89;p=gostls13.git 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 --- 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) }