mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
Revert "unix: add openat2 for linux"
This reverts CL 227280. Reason for revert: causes failures on ARM builders Fixes golang/go#38357 Change-Id: Ie80ff37205ff12c3b74d00ff46b7222e34363d86 Reviewed-on: https://go-review.googlesource.com/c/sys/+/227846 Run-TryBot: Andrew Bonventre <andybons@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
@@ -663,24 +663,3 @@ func TestPrctlRetInt(t *testing.T) {
|
||||
t.Fatalf("unexpected return from prctl; got %v, expected %v", v, 1)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOpenat2(t *testing.T) {
|
||||
how := &unix.OpenHow{
|
||||
Flags: unix.O_RDONLY,
|
||||
Resolve: unix.RESOLVE_NO_MAGICLINKS,
|
||||
}
|
||||
fd, err := unix.Openat2(-1, "/proc/self/fd/1", how)
|
||||
switch err {
|
||||
case nil:
|
||||
unix.Close(fd)
|
||||
t.Fatal("expected ELOOP, got nil")
|
||||
case unix.ELOOP:
|
||||
return
|
||||
case unix.ENOSYS:
|
||||
t.Skip("old kernel? (need Linux >= 5.6)")
|
||||
case unix.ENOENT:
|
||||
t.Skipf("openat2: %v, skipping test", err)
|
||||
default:
|
||||
t.Fatalf("unexpected error from openat2: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user