From 2ffe3255a1ba3e09105eb1c86ef221a8ccc5c515 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Fri, 30 Jan 2015 15:07:11 -0800 Subject: [PATCH] os: allow EROFS in TestMkdirAllAtSlash On some systems (e.g. ChromeOS), / is mounted read-only. This results in error code syscall.EROFS, which I guess is just as valid as syscall.EACCES for this test. Change-Id: I9188d5437a1b5ac1daa9c68b95b8dcb447666ca3 Reviewed-on: https://go-review.googlesource.com/3676 Reviewed-by: Ian Lance Taylor --- src/os/path_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/path_test.go b/src/os/path_test.go index 6f24a43132..bf7308a3eb 100644 --- a/src/os/path_test.go +++ b/src/os/path_test.go @@ -211,7 +211,7 @@ func TestMkdirAllAtSlash(t *testing.T) { if err != nil { pathErr, ok := err.(*PathError) // common for users not to be able to write to / - if ok && pathErr.Err == syscall.EACCES { + if ok && (pathErr.Err == syscall.EACCES || pathErr.Err == syscall.EROFS) { return } t.Fatalf(`MkdirAll "/_go_os_test/dir": %v`, err) -- 2.50.0