Commit 2ffe3255 authored by Rahul Chaudhry's avatar Rahul Chaudhry Committed by Ian Lance Taylor

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/3676Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent f17cd880
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment