Add system call definitions for 32-bit PowerPC (ppc). These are
expected to be used with gccgo, as gc does not have a suitable code
generator.
These definitions are largely copied from ppc64x, with some 32-bit
specific wrappers copied from arm.
The glibc definitions of epoll_event and sockaddr_un structures need
to be overridden on ppc, similarly to some other architectures.
For golang/go#18031Fixesgolang/go#37443
Change-Id: I061ac2b8fa452dd37c2239a0b09dff2f3e9d50da
GitHub-Last-Rev: aada37a10b
GitHub-Pull-Request: golang/sys#106
Reviewed-on: https://go-review.googlesource.com/c/sys/+/312349
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Split all ioctl wrappers on linux into ioctl_linux.go and reorder them
so related ioctls are grouped together.
Change-Id: Iaf80993001ba3b4d4fa3096fed522cd9d339d21c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/311389
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Copied from golang.org/x/net/ipv6. This will allow to replace the
socket option constants in that package with constants from x/sys/unix.
Change-Id: Ie0ce8ac7a927418df6f6e793d626c425a1cf48ec
Reviewed-on: https://go-review.googlesource.com/c/sys/+/307670
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Follow up on three occurences missed in CL 309689.
The raw fds are successively wrapped using os.NewFile and will be closed
by (*os.File).Close. Avoids a double close, in the worst case closing an
unrelated fd.
Change-Id: Iffe4cc4f77db10237547915c362c4aeb20cc9630
Reviewed-on: https://go-review.googlesource.com/c/sys/+/310010
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The raw fds are successively wrapped using os.NewFile and will be closed
by (*os.File).Close. Avoids a double close, in the worst case closing an
unrelated fd.
Same as CL 309353 does for package syscall.
Change-Id: I26dffc3fefa90d636cb67a904df0bfc3b131f702
Reviewed-on: https://go-review.googlesource.com/c/sys/+/309689
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Add type EthtoolDrvinfo and the type-safe IoctlGetEthtoolDrvinfo ioctl
wrapper func to retrieve it.
Change-Id: Ia514df89175939d9b0c2c4ddace621882e86b21a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/308989
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
The Flags member was added to struct sockaddr_vm in Linux kernel 5.11
and successively into RawSockaddrVM when updating to that kernel version
in CL 291637. Add the flags to SockaddrVM as well.
While at it, also update the list of CID values with VMADDR_CID_LOCAL.
Change-Id: I08828136f4c5ded3cca2fd07aefac066b9977b13
Reviewed-on: https://go-review.googlesource.com/c/sys/+/308990
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Self-relative security descriptors can sometimes be smaller than the
header size of the SECURITY_DESCRIPTOR struct, which is fine in C, but
checkptr complains about it, so instead, ensure that the allocation is
at least the size of the SECURITY_DESCRIPTOR struct.
This fixes this splat:
fatal error: checkptr: converted pointer straddles multiple allocations
goroutine 36 [running]:
runtime.throw(0x761c5f, 0x3a)
/usr/lib/go/src/runtime/panic.go:1117 +0x79 fp=0xc00005dd90 sp=0xc00005dd60 pc=0x5fb8d9
runtime.checkptrAlignment(0xc0001a4020, 0x741860, 0x1)
/usr/lib/go/src/runtime/checkptr.go:20 +0xc9 fp=0xc00005ddc0 sp=0xc00005dd90 pc=0x5c7729
golang.org/x/sys/windows.(*SECURITY_DESCRIPTOR).copySelfRelativeSecurityDescriptor(0x1b9ad638190, 0x2)
/home/zx2c4/Projects/golang-dev/sys/windows/security_windows.go:1359 +0x1b7 fp=0xc00005de50 sp=0xc00005ddc0 pc=0x6f0077
golang.org/x/sys/windows.SecurityDescriptorFromString(0x754f2b, 0x2, 0x0, 0x0, 0x0)
/home/zx2c4/Projects/golang-dev/sys/windows/security_windows.go:1371 +0xde fp=0xc00005deb8 sp=0xc00005de50 pc=0x6f019e
Change-Id: I552017a93d4ca6f6debc6f8f445dac5c6717fed1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/307129
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This struct has pointers in it, which means checkptr expects for it to
be aligned properly. When we're copying a Windows-allocated struct to a
Go-allocated one, make sure that the Go allocation is aligned to the
pointer size.
This fixes the following checkptr splat:
goroutine 29 [running]:
runtime.throw(0x4f8dd9, 0x3a)
C:/hostedtoolcache/windows/go/1.16.2/x64/src/runtime/panic.go:1117 +0x79 fp=0xc000041c50 sp=0xc000041c20 pc=0x2f9879
runtime.checkptrAlignment(0xc00009c180, 0x4d8a00, 0x1)
C:/hostedtoolcache/windows/go/1.16.2/x64/src/runtime/checkptr.go:20 +0xc9 fp=0xc000041c80 sp=0xc000041c50 pc=0x2c4d09
golang.org/x/sys/windows.(*SECURITY_DESCRIPTOR).copySelfRelativeSecurityDescriptor(0x227284caa00, 0x2)
C:/Users/runneradmin/go/pkg/mod/golang.org/x/sys@v0.0.0-20210309040221-94ec62e08169/windows/security_windows.go:1347 +0x11f fp=0xc000041ce8 sp=0xc000041c80 pc=0x467f9f
golang.org/x/sys/windows.SecurityDescriptorFromString(0x4ebfb0, 0x2, 0x0, 0x0, 0x0)
Change-Id: I7eb9c07e7afb7f139473b660f82a23541663ec50
Reviewed-on: https://go-review.googlesource.com/c/sys/+/306889
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Also add IP_RECVTOS and O_DIRECT which were generated when running
mkall.sh on SunOS openindiana 5.11.
The change in mkerrors.h is necessary to avoid lots of unnecessary
ICMP6_* consts being added on solaris.
Change-Id: Ica9a4b67f2d2d7916e65bcb600a5b2fa98edb80a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/306249
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Copied from golang.org/x/net/ipv6. This will allow to replace the
socket option constants in that package with constants from x/sys/unix.
Change-Id: I92a6ee9ffb4fbfcc66f1644b7677ac5bdf202367
Reviewed-on: https://go-review.googlesource.com/c/sys/+/305811
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change-Id: Ide2beea5182b3ef35f1f04f429dc8f9327457c8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/302829
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: David Anderson <dave@natulte.net>
Trust: Ian Lance Taylor <iant@golang.org>
create a new types_illumos.go for illumos specific constants
and structs, bring in those needed for wireguard-go
Change-Id: I68117abcae66127b617faea1f4cc2568b8b28d58
GitHub-Last-Rev: 3003e04e7e
GitHub-Pull-Request: golang/sys#100
Reviewed-on: https://go-review.googlesource.com/c/sys/+/301713
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
These all just jump to the respective implementation in package syscall.
Change-Id: Ie1c0438d983c8d78dc780487bb866760460f1ce1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/301490
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
These will be used to replace the respective local definitions in
the golang.org/x/net package.
Change-Id: Ieae8908a87ee7df1ca43683e7e921128bff90b8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/301690
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The close_range(2) syscall is available since Linux kernel v5.9,
with additional functionality of CLOSE_RANGE_CLOEXEC since v5.11.
No tests are required since this is a bare syscall.
Change-Id: I410470e3713e2005cc7acf24d1347938fe05ef63
Reviewed-on: https://go-review.googlesource.com/c/sys/+/301409
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
The //+go:build lines were added by running Go 1.17 gofmt in CL 294490.
Make sure to retain them when re-generating files in this package.
For golang/go#41184.
Change-Id: Ia418b8c0eb4291a0db3f4bb97685bde78d0ff016
Reviewed-on: https://go-review.googlesource.com/c/sys/+/296889
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
I added GetNamedPipeHandleState before but forgot the setter function,
which winds up being useful for namedpipe's tests.
Change-Id: Iefeabb2ac9584ec15e18e2ae7e4a72fbb46cbe7c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/299209
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Occassionaly TestPoll fails on some builders due to Poll getting
interrupted:
--- FAIL: TestPoll (0.00s)
syscall_unix_test.go:516: Poll: unexpected error: interrupted system call
FAIL
FAIL golang.org/x/sys/unix 0.956s
Fix this by retrying Poll in case of EINTR, same as CL 207861 did in
TestSelect.
Change-Id: I78ada14d7409e6cde852d76abd5a9a1b1bb645d2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298189
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
These functions sometimes return a non-nil value, while indicating
ERROR_ALREADY_EXISTS through GetLastError. In this case, return the
error along with the handle, to indicate the case.
Fixesgolang/go#44539.
Change-Id: Id18e64724e57f62a34d6562511d9eafa8e6f9a3e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/297332
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Alex pointed out that some of these original types were incomplete, so
this commit fills things out a bit more. We also add more to the test
case.
Change-Id: Iff7bd9ea6e0d021ba997c6d7351fe7c4a46187a9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/299189
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Alex copied this from a temporary thing I had written for the runtime
package. In runtime, you can't really access other packages like
syscall, so everything has to be very manual. But in x/sys, we can do
things properly. So this reimplements the function in a more straight
forward way.
Change-Id: I1634904bb1e10f33252954ce02d4b17ae56592e5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298830
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This will be useful for reworking the IsWindowsService function in
svc/.
Change-Id: Ie1f7a560d7e81ee4ac3055e04748b6f9c8234edb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298829
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
These are basic functions for getting function pointers to instantiated
OLE objects.
Change-Id: I5a3d179d6da2af006b6e11def18280959bb9bd98
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298469
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
These functions make it possible to read executable resource information
at runtime.
Change-Id: I00f260199ecda8daeb3417eaa9c02198663063b7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298173
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
These remaining APIs will make it possible to implement a win32 pipe
library using x/sys/windows.
Change-Id: If0cacedb7857c013c03e15cb6330b474cc010581
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298172
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
In anticipation of the next commit which adds win32 pipe APIs, add some
of the foundational NT APIs for that, which will be required for making
a robust Go pipe library. Also add a simple test case.
Change-Id: I898bd6c5265a8939a7f05a24c4d9b22941dc56b7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298171
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
It turns out that the proc thread update function doesn't actually
allocate new memory for its arguments and instead just copies the
pointer values into the preallocated memory. Since we were allocating
that memory as []byte, the garbage collector didn't scan it for pointers
to Go allocations and freed them. We _could_ fix this by requiring that
all users of this use runtime.KeepAlive for everything they pass to the
update function, but that seems harder than necessary. Instead, we can
just do the allocation as []unsafe.Pointer, which means the GC can
operate as intended and not free these from beneath our feet. In order
to ensure this remains true, we also add a test for this.
Updates golang/go#44662.
Change-Id: Iaa8b694a6682cc1876879632c7ba068e47b8666d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/297331
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
The prior function updated the TEB's LastStatus member, which is not
what we want to be doing here. It's also not consistent with Microsoft's
own Go code for their pipe library, which properly uses the "NoTeb"
variant like this commit.
For good measure, we add a simple test case to make sure these paths are
being exercised.
Change-Id: I4080898f704bdc93a6048001b06ffce516fb412d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298169
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
All references to "Errno" go through the syscalldot function, which
prepends "syscall." if the generation target is not in the syscall
package. Similarly so, we need a windowsdot function to prepend
"windows." to NTStatus.
Change-Id: I86affcf0155632ed5848ebabca97d175a041c6c3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/298170
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The same symbol name might be defined multiple times with different
function names or signatures. In that case, it's an error to redefine
the proc variable. So deduplicate these before printing.
Change-Id: I7a636cd44fb1ea6f51840ef3924d6316e266faa0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/288332
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The native NT API returns error values from a different namespace as the
usual Win32 one. This means it needs to be typed differently. This
commit adds broad support for using NTSTATUS values in a new type called
NTStatus.
First we add the type as a basic uint32. Then we add all of the
predefined constants from ntstatus.h, by augmenting mkerrors.bash to do
automatic extraction. There's a convenece way to convert an NT error to
a Win32 error, so we add the NTStatus.Errno() function. Since NTStatus
is an error type, we define an Error() function that returns a string by
asking ntdll.dll for its contents, in the exact same way that
syscall.Errno.Error() does, by calling FormatMessage. Since functions
need to actually use this, we add the rule that if a `//sys` declaration
returns an error value called "ntstatus", then the type underlying the
error interface is an NTStatus instead of an Errno. Finally we fix one
function that was returning an error interface of an Errno rather than
an NTStatus.
Change-Id: I06296b9563bbec526759d12a19f13ac6ad46dcc3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/297330
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This is simply a re-run of mkerrors.bash with the newer Windows SDK.
Change-Id: I16077dce04e38ae23ffb938df1feed8fdadc96fa
Reviewed-on: https://go-review.googlesource.com/c/sys/+/297329
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
CommTimeouts allows the user to set the timeout on Comm devices:
docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcommtimeouts
docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcommtimeouts
Change-Id: I756dc93b1b01412a496c6eccab22c9ff7e5f4b83
Reviewed-on: https://go-review.googlesource.com/c/sys/+/290209
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
IsWindowsService fails when parent process has exited.
This change makes IsWindowsService return false instead.
Added a test to verify the change.
Change-Id: Ibb2aa9478e8afd9e35011bbdc0985bdf8f0af9cc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294729
TryBot-Result: Go Bot <gobot@golang.org>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
The test introduced in CL 284352 breaks on several builders, either
with IoctlFileDedupeRange returning ENOTTY (as already seen for android
in the TryBot run) or returning EINVAL in the FileDedupeRange.Status
field. Both seem to indicate that the underlying filesystem doesn't
support deduplication, so skip the test in these cases.
Also rename the test to indicate the func it is testing.
Change-Id: I29553a5fc95f98335cb233f05d4c2dfb5640dc4c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/295911
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
The pipe2 on dragonfly still expects an fds array as an argument, but
does not use it to return the file descriptors. Just pass the argument
but ignore its value. This way the flags argument will be respected
correctly.
Change-Id: Id340653040999f31074eae01e9be4ea2088abae5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/295870
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>