Brad Fitzpatrick
f7da38b97c
unix: re-generate darwin output on Big Sur (11.2.1)
...
For posterity, I ran:
GOARCH_TARGET=amd64 go tool cgo -godefs types_darwin.go | GOOS=darwin GOARCH_TARGET=amd64 go run mkpost.go > ztypes_darwin_amd64.go
GOARCH_TARGET=arm64 go tool cgo -godefs types_darwin.go | GOOS=darwin GOARCH_TARGET=arm64 go run mkpost.go > ztypes_darwin_arm64.go
GOOS=darwin GOARCH=amd64 ./mkerrors.sh -m64 > zerrors_darwin_amd64.go ; gofmt -w zerrors_darwin_amd64.go
GOOS=darwin GOARCH=arm64 ./mkerrors.sh -m64 > zerrors_darwin_arm64.go ; gofmt -w zerrors_darwin_arm64.go
perl -i -npe 's,( cgo -godefs(?: -- -m64)? )/.+/(\S+.go),$$1$$2,' zerrors_darwin_amd64.go zerrors_darwin_arm64.go ztypes_darwin_amd64.go ztypes_darwin_arm64.go
Change-Id: I17e8fc3bd66f4766d0f5f731151f0b85758c01b0
Reviewed-on: https://go-review.googlesource.com/c/sys/+/292329
Trust: Brad Fitzpatrick <bradfitz@golang.org >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2021-02-16 16:36:48 +00:00
Brad Fitzpatrick
c4c1ae6d18
unix: fix typo in test
...
Change-Id: I80b28a28a9e6133a7c8a9340ce5914498ff6bf0f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/292331
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Brad Fitzpatrick <bradfitz@golang.org >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
2021-02-16 15:53:14 +00:00
Tobias Klauser
4bcb84eeeb
Revert "unix: add Pipe2 on netbsd"
...
This reverts CL 283593.
Reason for revert: breaks DragonflyBSD builders and was submitted during code freeze.
Change-Id: I784f58ae56f7259d5176921d7a61070e0ac7cb52
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283597
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
2021-01-13 18:17:07 +00:00
Tobias Klauser
ba0562f347
unix: re-generate linux consts after CL 283413
...
ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF was removed from linux/types.go and
mkerrors.sh will catch it instead.
Change-Id: I76e063cbfee4411e5ea9f2e0e5359e169d56b195
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283595
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-01-13 13:13:15 +00:00
Tobias Klauser
3196cb8d8e
unix: add Pipe2 on netbsd
...
Also move TestPipe2 into a separate file, enabling it for all platforms
where Pipe2 is available.
Change-Id: I1a31e9563f5f60ef0e994abc1db57b7f1c58fe88
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283593
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2021-01-13 11:20:37 +00:00
Matt Layher
eaf3bda374
unix: add ethtool constants for Linux
...
The ethtool generic netlink interface also uses these constants
in addition to the ones I previously added.
For more information about this interface, see:
https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html .
Change-Id: I8861e5faa23bfc0179725314fc5a528486e328b2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283413
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-01-13 00:00:19 +00:00
Tobias Klauser
489259a850
unix: add Pipe2 for solaris
...
We already implement Pipe2 for illumos and it seems solaris provides the
pipe2 syscall as well, see
https://docs.oracle.com/cd/E88353_01/html/E37841/pipe2-2.html .
Fixes golang/go#40613
Change-Id: I135cb1e78e6c67567d30d7eed266d00ef8fd6c3a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/283032
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 >
2021-01-12 08:05:10 +00:00
Matt Layher
789bb1bd40
unix: add ethtool generic netlink constants for Linux
...
For more information about this interface, see:
https://www.kernel.org/doc/html/latest/networking/ethtool-netlink.html .
Change-Id: I4fe37e7dce3c52d72286bee047de2b49fe559b13
Reviewed-on: https://go-review.googlesource.com/c/sys/+/282812
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Matt Layher <mdlayher@gmail.com >
2021-01-10 05:19:26 +00:00
Artyom Pervukhin
16f7687f50
unix: don't call testing.T.Fatalf in a background goroutine
...
> Those methods [...] must be called only from the goroutine running the
> Test function.
For golang/go#43498
Change-Id: I847067936ade613a21b059c90219bd285425f0aa
Reviewed-on: https://go-review.googlesource.com/c/sys/+/280622
Reviewed-by: Keith Randall <khr@golang.org >
Run-TryBot: Keith Randall <khr@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Ian Lance Taylor <iant@golang.org >
2021-01-05 21:07:32 +00:00
Keith Randall
6f8348627a
unix: fix darwin pipe implementation
...
The raw syscall returned the two pipes whereas the libc call
takes a pointer to a location to write the two pipes.
When we switched over from raw syscalls to libc calls, this
change in behavior was missed.
Fixes golang/go#43498
Change-Id: Icee2204dcb8be8fc94be0df106e1ff061cafa446
Reviewed-on: https://go-review.googlesource.com/c/sys/+/281432
Trust: Keith Randall <khr@golang.org >
Run-TryBot: Keith Randall <khr@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2021-01-04 20:47:34 +00:00
Tobias Klauser
0d417f6369
unix: don't use ptrace on ios
...
Follow CL 279481 which did the same for package syscall.
For golang/go#43302 .
Change-Id: I9fa7bec5712cf43fd7485225d4c21665c151defc
Reviewed-on: https://go-review.googlesource.com/c/sys/+/279393
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Cherry Zhang <cherryyz@google.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-12-23 07:45:33 +00:00
Tobias Klauser
bc327ba9c2
unix/linux: update Dockerfile to Go 1.16beta1
...
Change-Id: Iee6d0bdbbb4f36adb8e963e482c0d62c7a3fb147
Reviewed-on: https://go-review.googlesource.com/c/sys/+/279113
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 >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-12-21 09:36:33 +00:00
Tobias Klauser
7d0127a747
unix: add SizeofIovec on aix, dragonfly, *bsd and solaris
...
Change-Id: Ib981ad3f745a2566d0a12eba5e54c7da53b69d6e
Reviewed-on: https://go-review.googlesource.com/c/sys/+/279112
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 >
2020-12-18 08:43:10 +00:00
Tobias Klauser
f9fddec55a
unix/linux: update Dockerfile to kernel 5.10 and Go 1.15.6
...
Also include some newly added consts.
Change-Id: Iaf9fad92a4cbbf9f1e97ed544116bd93525dddde
Reviewed-on: https://go-review.googlesource.com/c/sys/+/277254
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 >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-12-14 21:06:02 +00:00
Tobias Klauser
aec9a39092
unix: use Time{spec,val}.Nano in Time{spec,val}ToNsec
...
Follow what CL 188397 did in package syscall:
Call the Nano methods of Timespec and Timeval in TimespecToNsec and
TimevalToNsec respectively, instead of duplicating the implementation.
Change-Id: I50f1958c0f7bca92fc4990684f1de9c148ae5859
Reviewed-on: https://go-review.googlesource.com/c/sys/+/277253
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 >
2020-12-14 09:51:26 +00:00
Tobias Klauser
8c39875709
unix: drop references to Unix epoch in Timeval/Timespec docs
...
Follow what CL 277073 did for package syscall:
The various conversion functions just change the format of time values.
They don't use the Unix epoch. Although in practice the values are often
times since the Unix epoch, they aren't always, so referring to the
epoch can be confusing.
Updates golang/go#43010
Change-Id: Icb9953e20d7cab8e36ddfb467dc2380ee181f18b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/277252
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 >
2020-12-14 09:51:18 +00:00
Tobias Klauser
69691e4674
unix: remove ineffectual //go:linkname directives
...
For golang/go#42938
Change-Id: I9d68a2436f3ce7402b3c6517a630d0272cf39071
Reviewed-on: https://go-review.googlesource.com/c/sys/+/274573
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Matthew Dempsky <mdempsky@google.com >
2020-12-02 21:35:21 +00:00
Tobias Klauser
ef89a241cc
unix: add SizeofIovec on darwin
...
Change-Id: I50909f3b731b4c0ef7f37788e8132930bb865c2b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/274452
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 >
2020-12-01 14:50:00 +00:00
Tobias Klauser
760e229fe7
unix: test anyToSockaddr without creating actual socket
...
Test_anyToSockaddr on linux needs to create a socket with the given
domain, type and protocol in order to test anyToSockaddr. Depending on
kernel version, permission and other factors, a given combination might
not be available on the system that runs the test, as is e.g. the case
for AF_CAN/SOCK_DGRAM/CAN_J1939 on several builders after CL 272767.
The only reason to create the socket is to be able to get the socket
protocol in anyToSockaddr using GetsockoptInt(..., SO_PROTOCOL). Move
this implementation into a wrapper func which can be overriden in tests
to with a func unconditionally returning the protocol under test. This
makes the test less dependent on the system it runs on and should fix
the builders broken by CL 272767.
While at it also removed the unused SocketSpec type in
syscall_internal_bsd_test.go and remove an unnecessary error var
declaration.
Change-Id: Ie8754cf795fa96980b29ae43777f698cd86ae863
Reviewed-on: https://go-review.googlesource.com/c/sys/+/274046
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 >
2020-11-30 17:19:29 +00:00
Sauci
a4b67b81d3
unix: add J1939 protocol support on socketcan interface
...
Fixes golang/go#42797
Change-Id: Ia7be73e53438dec80903c95de0e6829005741a0f
GitHub-Last-Rev: bc35835339
GitHub-Pull-Request: golang/sys#91
Reviewed-on: https://go-review.googlesource.com/c/sys/+/272767
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-26 14:47:05 +00:00
Tobias Klauser
f84b799fce
unix: add Pipe2 on dragonfly
...
The pipe2 syscall is available since DragonflyBSD 4.2, see
https://www.dragonflybsd.org/release42/
Change-Id: I94631fd64ee731e416049cac5f3d15544f1337dd
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271177
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-11-19 10:28:17 +00:00
Matt Layher
a01c418693
unix: add Linux MPLS tunnel constants for use with rtnetlink APIs
...
Change-Id: Ic990c616c416e7bfe98e68eb74bab2810a1126ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271137
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-18 18:29:58 +00:00
Matt Layher
ade898ef86
unix: add Linux lwtunnel constants for use with rtnetlink APIs
...
Change-Id: Ibe39b315321c18916870dcfc97b083a18b91be2b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/271077
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Trust: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-18 18:01:33 +00:00
Tobias Klauser
c061ba923f
unix: define isBigEndian for all GOARCHes supported by gccgo
...
For golang/go#18031
For golang/go#37443
Change-Id: I49dabb362592bb61532a0c4f193919c3f2036af3
Reviewed-on: https://go-review.googlesource.com/c/sys/+/270317
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 >
2020-11-16 16:16:45 +00:00
Tamir Duberstein
0a15ea8d9b
*: use more precise build tags
...
s/!gccgo/gc/ in files which use gc-syntax assembly.
Change-Id: Iafc006cd60ad0e429cff182a05c790d80c380802
Reviewed-on: https://go-review.googlesource.com/c/sys/+/269717
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Trust: Than McIntosh <thanm@google.com >
2020-11-13 13:57:34 +00:00
Tobias Klauser
215b40eba5
unix/linux: update Dockerfile to Go 1.15.4
...
No changes in generated files.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch >
Change-Id: Ibbb81f8ef48d43d7fb620fec57c3ac779ebf0e11
Reviewed-on: https://go-review.googlesource.com/c/sys/+/268357
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 >
2020-11-09 16:54:25 +00:00
Lehner Florian
da207088b7
unix: update IFLA consts on linux
...
Update the IFLA_* consts from /usr/include/linux/if_link.h
Change-Id: I8a751f9237c78737691fb425dcbc4be6e52364d9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/266977
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Tobias Klauser <tobias.klauser@gmail.com >
2020-11-01 10:28:59 +00:00
Tobias Klauser
c5abc1b1d3
unix: revert zsysnum_darwin_*.go deletion from CL 250437
...
CL 250437 removed the zsysnum_darwin_*.go files containing the SYS_*
contants for macOS. This was done assuming that users should migrate
away from direct syscalls to libSystem wrappers. Let's not force users
of this package on when they want to do that and re-add the
zsysnum_darwin_*.go files and mark the consts as deprecated.
We can still remove these once macOS actively prevents use of direct
syscalls.
Fixes golang/go#41868
Change-Id: Ie5edf135154f24e3efa4811ef2253ad1353ba132
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265857
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Trust: Bryan C. Mills <bcmills@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-28 21:52:40 +00:00
Ben Cartwright-Cox
0fcbb8f492
unix: add linux constants and types for PPS devices ioctl's
...
After trying to implement Pulse Per Second devices
in go, I found that the ioctl values and structs
where not in the unix package yet:
~# strace ppstest /dev/pps0 |& grep ioctl
ioctl(3, PPS_GETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_GETCAP, 0xbee63b84) = 0
ioctl(3, PPS_GETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_SETPARAMS, 0xbee63b18) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
ioctl(3, PPS_FETCH, 0xbee63b00) = 0
This commit should add them.
Change-Id: If1225ab7c4c38aad5d8ae841d1fdebfa45055549
GitHub-Last-Rev: c1469112b8
GitHub-Pull-Request: golang/sys#90
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265217
Trust: Tobias Klauser <tobias.klauser@gmail.com >
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: Matt Layher <mdlayher@gmail.com >
2020-10-27 14:07:54 +00:00
Tobias Klauser
9d1ec526b7
unix: add anyToSockaddrGOOS on dragonfly
...
CL 264638 forgot to add func anyToSockaddrGOOS on dragonfly which breaks
the build.
Change-Id: I35d28a972c8c541dea8db0349b7e1440f5ec2fd7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265377
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 >
2020-10-27 13:05:17 +00:00
Tobias Klauser
e1471140ff
unix: implement AF_SYSTEM/AF_SYS_CONTROL sockets on darwin
...
See https://developer.apple.com/documentation/kernel/sockaddr_ctl for
details.
AF_SYSTEM is darwin-specific, so the BSD-specific anyToSockaddr func
needs to call GOOS-specific funcs which return nil, EAFNOSUPPORT on all
BSD platforms but darwin.
For golang/go#41868
Change-Id: Id7794aba5988dd9511053b76be5efeb66c104a26
Reviewed-on: https://go-review.googlesource.com/c/sys/+/264638
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 >
2020-10-27 09:04:13 +00:00
Tobias Klauser
119d4633e4
unix: add Ioctl{Get,Set}IfreqMTU on darwin
...
For golang/go#41868
Change-Id: I9fb8f5eee933488e4c63aaa757059b8cea4d9629
Reviewed-on: https://go-review.googlesource.com/c/sys/+/264637
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-10-26 17:38:27 +00:00
Tobias Klauser
e075d93706
unix: deflake TestPselect and TestSelect on linux
...
On some platforms (namely Linux), Select and Pselect update the
passed-in timeval/timespec, which might lead to failing tests in
case of an EINTR. Fix this by always resetting the timeval/timespec
before calling Select/Pselect.
Also change accept timeouts within 2/3 margin of the expected timeout,
like already done in TestSelect. While at it, fix the failure log to use
the common "got X, expected Y" message.
Fixes golang/go#42210
Change-Id: Id0efbbecc9c0bf44c102d5d1880b1bae32980ad1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265020
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-26 16:32:16 +00:00
Tobias Klauser
418715ba6f
unix: compare Stat_t members when checking Stat vs. Fstatat in TestFstatat
...
TestFstatat regularly fails on the dragonfly-amd64 builder due to
mismatching Stat_t info returned by the calls to Fstatat vs. Stat (most
likely due to Atime changing). Fix the test by just comparing some well
known members. This was already fixed for the Lstat call in CL 212417.
Fixes golang/go#42208
Change-Id: I3e241470d373338b9716bb9ce0265a105db2720d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/265018
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-26 13:34:11 +00:00
Jason A. Donenfeld
6e5568b54d
unix,windows,plan9: add Byte{Slice,Ptr}ToString functions
...
We already provide ByteSliceFromString and BytePtrFromString, and on
Windows we provide UTF16FromString, UTF16PtrFromString, UTF16ToString,
and UTF16PtrToString. So this commit fills in the remaining two
Byte-oriented functions: ByteSliceToString and BytePtrToString. Since
the existing two are available on windows, unix, and plan9, we add the
remaining two to the same places. This helps eliminate unsafe pointer
options in addition to triggering checkptr in Go 1.15, by eliminating
the use of prior idioms for these types of casts.
Change-Id: I85ae49f2756e142c2462fe8b2428216b6992e089
Reviewed-on: https://go-review.googlesource.com/c/sys/+/263757
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Trust: Brad Fitzpatrick <bradfitz@golang.org >
Trust: Jason A. Donenfeld <Jason@zx2c4.com >
2020-10-20 23:07:47 +00:00
Tobias Klauser
eeed37f84f
unix: add IoctlCtlInfo on darwin
...
For golang/go#41868
Change-Id: I0f4dbeacfe10b9614caf05633a1de3a98a1fc85f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262959
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 >
2020-10-18 23:04:17 +00:00
Clément Chigot
b09fb700fb
unix: add missing syscalls on AIX
...
Access, Chmod, Chown and Creat were forgotten when porting the package
on AIX.
Fixes golang/go#42001
Change-Id: I1ab8c5198240421b31db8b447fe37ce5d80e5ce8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262897
Trust: Tobias Klauser <tobias.klauser@gmail.com >
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: Ian Lance Taylor <iant@golang.org >
2020-10-17 00:35:18 +00:00
Tobias Klauser
f659759dc4
unix: add support for ptrace on macOS/ARM64
...
Same as CL 260718 did for package syscall.
Updates golang/go#38485
Change-Id: I7b282b7c823dd79eb1fe8b172a78da8dfe9acd1c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262957
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Cherry Zhang <cherryyz@google.com >
2020-10-16 16:01:50 +00:00
Ian Lance Taylor
e3ed0017c2
unix/linux: update to Go 1.15.3 release
...
Does not cause any changes to generated files.
Change-Id: I635230441d4c48d1f649ca5c7cca073974e36b60
Reviewed-on: https://go-review.googlesource.com/c/sys/+/262457
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
Trust: Ian Lance Taylor <iant@golang.org >
2020-10-15 00:08:50 +00:00
Tobias Klauser
cc95f250f6
unix: add FIORDCHK on solaris/illumos
...
Change-Id: Ib789b19d45f1ca3d5628e53e68b9ab732d6f8200
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261797
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 >
2020-10-14 08:05:44 +00:00
Tobias Klauser
9029056a59
unix: refresh types and error consts on solaris/illumos
...
Generated on SunOS 5.11
Change-Id: Ia3a00e9fa4267a748e1d8434ae8a53ffe44494be
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261461
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 >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-14 08:05:34 +00:00
Tobias Klauser
2da7054afa
unix: remove stray TODO comment
...
This was addressed by CL 2816 for package syscall and the same comment
was deleted from asm_linux_386.s.
Same as CL 261458 for package syscall.
Change-Id: Ib5d86dbafb6766f9d8d523c6035e1f095f18e6ed
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261460
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2020-10-13 13:26:46 +00:00
Tobias Klauser
a5aeffabbd
unix: move build constraints comment below copyright message
...
Make fcntl_linux_32bit.go consistent with all other files in the
package.
Change-Id: If2e21027b0f31ac27d434806c18d9223ee55992f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261459
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2020-10-13 13:26:27 +00:00
Tobias Klauser
56aa3af1a1
unix: update Dockerfile to Linux 5.9 and Go 1.15.2
...
Also add some newly added IFLA_* and PERF_* consts and adjust the
renamed NFTA_LIST_UNPEC const (see torvalds/linux@da9125df85 ).
Change-Id: Ic37f39e5b5bfe063ae6d7701de05ced07e62abfb
Reviewed-on: https://go-review.googlesource.com/c/sys/+/261457
Trust: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
2020-10-13 06:48:17 +00:00
Ian Lance Taylor
a893ed343c
unix: sync with DragonFly 5.8
...
Change-Id: I258e86b502957d76aeeead286bcc9c5e22b53834
Reviewed-on: https://go-review.googlesource.com/c/sys/+/260001
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-07 16:58:08 +00:00
Ian Lance Taylor
cec0259cc9
unix: update Darwin ztype files
...
The main effect is to change some fields of Statfs_t from arrays of int8
to arrays of byte. This makes the types of those fields correspond to the
types used on most other BSD systems.
Change-Id: If7e80fd53d6369a0f7c979c0bf36ffe530dc5d8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259903
Trust: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2020-10-07 16:57:53 +00:00
Matt Layher
ac719f4daa
unix: fix typo in PERF_TYPE_HARDWARE introduced in CL 259477
...
Change-Id: Iee2a067673309abc6b80d3cc96ac49d9d6b52865
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259799
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Bryan C. Mills <bcmills@google.com >
2020-10-06 15:56:30 +00:00
Tobias Klauser
097ba2fa90
unix: fix build on solaris after CL 259637
...
The build on illumos and solaris currently fails with:
unix/syscall_solaris.go:558:6: no new variables on left side of :=
Fix this by dropping the named return value.
Change-Id: Ie29956ba08fd107f380fe432cc85f120d66057b5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259581
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 >
2020-10-06 15:36:26 +00:00
Matt Layher
9971236665
unix: use runtime.KeepAlive in Solaris IoctlSetTermio
...
This ensures that value remains live for the duration of the ioctl system call.
This pattern is used in all other IoctlSet* functions but appears to have been
forgotten here.
Change-Id: I2b26a5c4e7c862f779427b839327b36c1bc78c82
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259637
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
2020-10-05 17:22:24 +00:00
Matt Layher
935f906f17
unix: fix typos and reflow comments on IoctlFile* functions
...
Change-Id: I9be66514d6b5c8c85e7e424c4aa7856d0f4d884d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/259557
Trust: Matt Layher <mdlayher@gmail.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
TryBot-Result: Go Bot <gobot@golang.org >
Reviewed-by: Johan Brandhorst <johan.brandhorst@gmail.com >
2020-10-05 17:05:23 +00:00