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:
Andrew Bonventre
2020-04-13 16:56:38 +00:00
parent 59c9f1ba88
commit 669c56c373
5 changed files with 0 additions and 72 deletions
-21
View File
@@ -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)
}
}