Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Russ Cox 9a76102bfb all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I01667f826428426a39c84717d02efa25fa44553c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/294490
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Russ Cox <rsc@golang.org>
2021-02-20 05:07:31 +00:00
Tobias Klauser b016eb3dc9 unix: test UtimesNanoAt on *bsd and solaris
Move TestUtimesNanoAt to syscall_unix_test.go. All BSDs and
solaris/illumos provide UtimesNanoAt. The implementations on linux and
darwin are already the same and the type conversions of Timespec members
on aix should no longer be necessary since CL 177838.

Change-Id: If0d03a92b3167da08191b6e98888eec92f27c3c9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/213398
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-01-06 16:20:15 +00:00
Tobias Klauser f068ffe820 unix: use same TestSelect on all Unices
Also change t.Error messages to use "got foo, expected bar" notation.

Change-Id: Ia0b452f96b08cbb69a0b64cc2a467b5cf94e72da
Reviewed-on: https://go-review.googlesource.com/c/sys/+/207858
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-19 19:55:28 +00:00
Tobias Klauser fee6b63275 unix: accept time.Now()±1 as valid in TestTime
Fixes golang/go#33200

Change-Id: I7e6e62f09174f0b214e7d021a31f1ad2166f9db5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/206861
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-13 15:49:46 +00:00
Tobias Klauser c432e742b0 unix: remove unused stringsFromByteSlice for tests on aix
stringsFromByteSlice is only used in xattr_test.go which isn't enabled
for aix.

Change-Id: I95948cbac285d8efe7f5299de85625cb7541e906
Reviewed-on: https://go-review.googlesource.com/c/sys/+/177839
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-05-20 20:13:01 +00:00
Clément Chigot ad400b1274 unix: remove StTimespec type on AIX
On AIX, Stat_t's fields dealing with time are of type StTimespec while
all other GOOS are using Timespec.
StTimespec and Timespec are the same on ppc but not in ppc64. Therefore,
values returned by ppc64 syscalls need to be adjusted in order to
allow the use of Timespec instead of StTimespec.

Fixes golang/go#32073

Change-Id: I0c212bf1741a27c49e995bf928d4941b6d583e54
Reviewed-on: https://go-review.googlesource.com/c/sys/+/177838
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-20 16:14:52 +00:00
Clément Chigot f0ce4c0180 unix: add Select syscall on AIX
As select is a keyword of Go, C.select cannot be used on gccgo files.
Therefore, select call is transformed into c_select.

Change-Id: Ic68a7ffa03dc5a5d70514876b5f6afb565691a4a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/172739
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-04-18 15:33:12 +00:00
chigotc 8f1d3d21f8 unix: add support for aix/ppc64, gc implementation
This commit ports unix package for aix/ppc64 with gc implementation.

In order to merge as much as possible gc and gccgo implementation, the
mksyscall_aix_ppc64.pl creates three files.

zsyscall_aix_ppc64.go is common for both implementation. It has the main
syscall function and handles the pointer creations, type conversions
and the error if needed. It calls a function "call..." which is
available for each implementation.

zsyscall_aix_ppc64_gc.go is the gc part. It implements "call..."
functions using //go:cgo_import_dynamic and //go:linkname. It is
based on syscall.syscall6 function.

zsyscall_aix_ppc64_gccgo.go is the gccgo part. It implements "call..."
functions using cgo and C functions.

Some unavailable syscalls were also removed from the previous
implementation.

For aix/ppc, the script is left unchanged as aix/ppc won't be
implemented inside gc.

Change-Id: I3701095df31517c66f95874ba8e682967993090b
Reviewed-on: https://go-review.googlesource.com/c/143117
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-10-19 08:45:34 +00:00
Tony Reix d99a578cf4 unix: code for AIX ppc and ppc64, for gccgo
Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2018-08-28 06:51:06 +00:00