From: Rahul Chaudhry Date: Fri, 30 Jan 2015 23:07:11 +0000 (-0800) Subject: os: allow EROFS in TestMkdirAllAtSlash X-Git-Tag: go1.5beta1~2189 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2ffe3255a1ba3e09105eb1c86ef221a8ccc5c515;p=gostls13.git 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 --- 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)