Commit Graph

4 Commits

Author SHA1 Message Date
Tobias Klauser
8b4580aae2 unix: remove /dev/ptyp* from device node tests on NetBSD
Follow up for CL 80615

The NetBSD 8.0 builders don't seem to have these device nodes either.
Just remove them entirely.

Change-Id: Ib729574ed119f9ec78b06124ba4a5d9bbc74bf4d
Reviewed-on: https://go-review.googlesource.com/81015
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-30 16:37:41 +00:00
Tobias Klauser
316e922701 unix: fix tests on NetBSD 8.0
Use /dev/ptyp* instead of /dev/ttyp* which don't seem to be available on
NetBSD 8.0+ anymore.

Change-Id: Idda6cc91b8cd26f5488852027b8d918f35a5e8fb
Reviewed-on: https://go-review.googlesource.com/80615
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-11-29 15:52:45 +00:00
Tobias Klauser
328643532e unix: fix test compilation error on Go 1.7
testing.Run was introduced in Go 1.7. Skip the tests using it if built
with Go 1.6 or below.

Change-Id: I24c81426ea6d3eaaca5a565ad79b62b30e645d04
Reviewed-on: https://go-review.googlesource.com/78255
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-11-20 17:00:34 +00:00
Tobias Klauser
7ddbeae9ae unix: add Major, Minor and Mkdev functions on NetBSD
Add Major, Minor and Mkdev functions for converting devices numbers to
their major/minor components and vice versa.

The functions follow the behavior of the macros defined in NetBSD's
sys/types.h header. However, the parameter and return types are changed
to match the existing implementations of these functions.

Test the conversion macros with some well-known device numbers.

Updates golang/go#8106

Change-Id: I536d6d2622f6fe9be3c1ed3beb266745fe4bfb6e
Reviewed-on: https://go-review.googlesource.com/60970
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-09-01 18:12:14 +00:00