mirror of
https://github.com/golang/go
synced 2024-11-19 16:34:49 -07:00
os: fix failing test on Plan 9
LGTM=0intro, r R=0intro, r CC=ality, dave, golang-codereviews, jas, mischief, rsc https://golang.org/cl/105580044
This commit is contained in:
parent
8aea9a00a8
commit
a6cc634766
@ -926,6 +926,12 @@ func TestOpenError(t *testing.T) {
|
||||
syscallErrStr := perr.Err.Error()
|
||||
expectedErrStr := strings.Replace(tt.error.Error(), "file ", "", 1)
|
||||
if !strings.HasSuffix(syscallErrStr, expectedErrStr) {
|
||||
// Some Plan 9 file servers incorrectly return
|
||||
// EACCES rather than EISDIR when a directory is
|
||||
// opened for write.
|
||||
if tt.error == syscall.EISDIR && strings.HasSuffix(syscallErrStr, syscall.EACCES.Error()) {
|
||||
continue
|
||||
}
|
||||
t.Errorf("Open(%q, %d) = _, %q; want suffix %q", tt.path, tt.mode, syscallErrStr, expectedErrStr)
|
||||
}
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user