-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/unix: TestDevices test fails on Solaris #25528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think we can just skip or delete those tests. They seem specific to one Solaris variant or version and I suspect it's not guaranteed that those device numbers are guaranteed stable over time. |
Yes, let's drop this, the only way to do this is by parsing |
Ok. I also noticed the same test with hardcoded numbers for other OSes (dev_*_test.go). What about them? |
I don't know how other operating systems are supposed to work. |
Change https://golang.org/cl/114092 mentions this issue: |
Change https://golang.org/cl/114094 mentions this issue: |
Update #25528 Update #25529 Change-Id: I47ec282e76eb7740547e220ac00d6a7992e17b9e Reviewed-on: https://go-review.googlesource.com/114094 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
At least on Linux, these numbers are guaranteed to be stable between releases. I'm not sure about the BSDs. On Darwin most of the major/minor numbers are generated dynamically and the few static ones (which are used in the test) might change as well in future releases. I'll send a CL removing these tests on *BSD and Darwin as well. |
Change https://golang.org/cl/114396 mentions this issue: |
Instead, add a small test verify Major, Minor and Mkdev using arbitrary numbers. Leave TestDevices on Linux as its major/minor numbers are guaranteed stable. Updates golang/go#25528 Updates golang/go#25535 Change-Id: Ic105211660d80f9b3508ca9d518e9fac3b7e3beb Reviewed-on: https://go-review.googlesource.com/114396 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change https://golang.org/cl/114416 mentions this issue: |
…d iOS tests Pick up the changes from CL 114395, CL 114396 and CL 114415. By re-running govendor in the latest version, some files from golang.org/x/sys/unix which are ignored for the build also got removed from the vendored copy. Updates #25528 Updates #25535 Change-Id: I5c0002fc3a37d6abaafed2e15cc3e2ade803ad7b Reviewed-on: https://go-review.googlesource.com/114416 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Discovered when the package was vendored and tested by builders.
This broke both Solaris builders.
https://build.golang.org/log/7c8e4f372950715426cac40c9a124602804df843
--- FAIL: TestDevices (0.00s)
--- FAIL: TestDevices//dev/zero_134:12 (0.00s)
dev_solaris_test.go:41: for /dev/zero Major(0x840000000c) == 132, want 134
dev_solaris_test.go:47: for /dev/zero Mkdev(134, 12) == 0x860000000c, want 0x840000000c
--- FAIL: TestDevices//dev/null_134:2 (0.00s)
dev_solaris_test.go:41: for /dev/null Major(0x8400000002) == 132, want 134
dev_solaris_test.go:47: for /dev/null Mkdev(134, 2) == 0x8600000002, want 0x8400000002
--- FAIL: TestDevices//dev/ptyp0_172:0 (0.00s)
dev_solaris_test.go:41: for /dev/ptyp0 Major(0xa900000000) == 169, want 172
dev_solaris_test.go:47: for /dev/ptyp0 Mkdev(172, 0) == 0xac00000000, want 0xa900000000
--- FAIL: TestDevices//dev/ttyp0_175:0 (0.00s)
dev_solaris_test.go:41: for /dev/ttyp0 Major(0xac00000000) == 172, want 175
dev_solaris_test.go:47: for /dev/ttyp0 Mkdev(175, 0) == 0xaf00000000, want 0xac00000000
--- FAIL: TestDevices//dev/ttyp1_175:1 (0.00s)
dev_solaris_test.go:41: for /dev/ttyp1 Major(0xac00000001) == 172, want 175
dev_solaris_test.go:47: for /dev/ttyp1 Mkdev(175, 1) == 0xaf00000001, want 0xac00000001
The text was updated successfully, but these errors were encountered: