1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 // testalias checks for aliasing of error strings returned by sys1 and sys2,
13 // which both call the function named fn in package syscall
14 func testalias(t *testing.T, fn string, sys1, sys2 func() error) {
16 errcopy := string([]byte(err))
19 t.Errorf("syscall.%s error string changed from %q to %q\n", fn, errcopy, err)
23 // issue 13770: errors cannot be nested in Plan 9
25 func TestPlan9Syserr(t *testing.T) {
29 return syscall.Mkdir("/", 0)
32 return syscall.Mkdir("#", 0)
37 return syscall.Mount(0, 0, "", 0, "")
40 return syscall.Mount(-1, 0, "", 0, "")
42 // originally failed only on plan9_arm
46 _, err := syscall.Seek(0, 0, -1)
50 _, err := syscall.Seek(-1, 0, 0)