Skip to content
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

net: TestLookupPort fails on brillo when CGO_ENABLED=0 #14576

Closed
rakyll opened this issue Feb 29, 2016 · 9 comments
Closed

net: TestLookupPort fails on brillo when CGO_ENABLED=0 #14576

rakyll opened this issue Feb 29, 2016 · 9 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@rakyll
Copy link
Contributor

rakyll commented Feb 29, 2016

export GOOS=android
export GOARCH=386
export CGO_ENABLED=0

export CC_FOR_TARGET="i686-linux-android-gcc --sysroot=$SYSROOT"
export CXX_FOR_TARGET="i686-linux-android-g++ --sysroot=$SYSROOT"

# ...

bash run.bash --no-rebuild

go_android_exec: adb shell mkdir -p /mnt/media_rw/tmp/net.test-48210
go_android_exec: adb push /var/folders/00/1b8h8000h01000cxqpysvccm005d21/T/go-build514703080/net/_test/net.test /mnt/media_rw/tmp/net.test-48210/net.test-48210-tmp
1973 KB/s (5076236 bytes in 2.511s)
go_android_exec: adb shell cp '/mnt/media_rw/tmp/net.test-48210/net.test-48210-tmp' '/mnt/media_rw/tmp/net.test-48210/net.test-48210'
go_android_exec: adb shell rm '/mnt/media_rw/tmp/net.test-48210/net.test-48210-tmp'
go_android_exec: adb shell export TMPDIR="/mnt/media_rw/tmp/net.test-48210"; export GOROOT="/mnt/media_rw/goroot/"; export GOPATH="/mnt/media_rw/gopath/"; cd "/mnt/media_rw/goroot/src/net"; '/mnt/media_rw/tmp/net.test-48210/net.test-48210' -test.short=true -test.timeout=3m0s; echo -n exitcode=$?
--- FAIL: TestLookupPort (0.00s)
    lookup_test.go:631: LookupPort("tcp", "echo") = 0, unknown port tcp/echo; want 7
    lookup_test.go:631: LookupPort("tcp", "discard") = 0, unknown port tcp/discard; want 9
    lookup_test.go:631: LookupPort("tcp", "systat") = 0, unknown port tcp/systat; want 11
    lookup_test.go:631: LookupPort("tcp", "daytime") = 0, unknown port tcp/daytime; want 13
    lookup_test.go:631: LookupPort("tcp", "chargen") = 0, unknown port tcp/chargen; want 19
    lookup_test.go:631: LookupPort("tcp", "ftp-data") = 0, unknown port tcp/ftp-data; want 20
    lookup_test.go:631: LookupPort("tcp", "ftp") = 0, unknown port tcp/ftp; want 21
    lookup_test.go:631: LookupPort("tcp", "telnet") = 0, unknown port tcp/telnet; want 23
    lookup_test.go:631: LookupPort("tcp", "smtp") = 0, unknown port tcp/smtp; want 25
    lookup_test.go:631: LookupPort("tcp", "time") = 0, unknown port tcp/time; want 37
    lookup_test.go:631: LookupPort("tcp", "domain") = 0, unknown port tcp/domain; want 53
    lookup_test.go:631: LookupPort("tcp", "finger") = 0, unknown port tcp/finger; want 79
    lookup_test.go:631: LookupPort("udp", "echo") = 0, unknown port udp/echo; want 7
    lookup_test.go:631: LookupPort("udp", "tftp") = 0, unknown port udp/tftp; want 69
    lookup_test.go:631: LookupPort("udp", "bootpc") = 0, unknown port udp/bootpc; want 68
    lookup_test.go:631: LookupPort("udp", "bootps") = 0, unknown port udp/bootps; want 67
    lookup_test.go:631: LookupPort("udp", "domain") = 0, unknown port udp/domain; want 53
    lookup_test.go:631: LookupPort("udp", "ntp") = 0, unknown port udp/ntp; want 123
    lookup_test.go:631: LookupPort("udp", "snmp") = 0, unknown port udp/snmp; want 161
    lookup_test.go:631: LookupPort("udp", "syslog") = 0, unknown port udp/syslog; want 514
FAIL
exitcode=1go_android_exec: adb shell rm -rf /mnt/media_rw/tmp/net.test-48210
FAIL    net 13.332s
@rakyll rakyll self-assigned this Feb 29, 2016
@rakyll rakyll added this to the Unplanned milestone Feb 29, 2016
@rakyll
Copy link
Contributor Author

rakyll commented Feb 29, 2016

(Reproducible on an Intel Edison.)

@ianlancetaylor
Copy link
Contributor

CC @mikioh

@hyangah
Copy link
Contributor

hyangah commented Mar 1, 2016

does brillo have /etc/services? (see net/port_unix.go)

@mikioh
Copy link
Contributor

mikioh commented Mar 2, 2016

I'll take a look if no one sends a CL until the Go 1.7 cutoff. Probably we need to split the test case into two: one for LookupPort and another for lookupPort.

@rakyll
Copy link
Contributor Author

rakyll commented Mar 2, 2016

/etc/services are not available on Android and Brillo.

goLookupPort should return an error that lookup is not supported on Android. We also need to separate the test case into two to skip the lookup test on GOOS=android and CGO_ENABLED=0.

gopherbot pushed a commit that referenced this issue Mar 3, 2016
/etc/services is not available on Android. The pure Go implementation
of LookupPort will never succeed on Android. Skipping the test.

Updates #14576.

Change-Id: I707ac24aea3f988656b95b1816ee5c9690106985
Reviewed-on: https://go-review.googlesource.com/20154
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@mikioh
Copy link
Contributor

mikioh commented Mar 3, 2016

Linux on IBM z (s390x) too; linux-on-ibm-z@d611bf8

@rakyll rakyll modified the milestones: Go1.7, Unplanned Mar 3, 2016
@gopherbot
Copy link

CL https://golang.org/cl/20349 mentions this issue.

@rakyll rakyll modified the milestones: Unplanned, Go1.7 Apr 18, 2016
@mikioh mikioh added the Testing An issue that has been verified to require only test changes, not just a test failure. label May 11, 2016
@gopherbot
Copy link

CL https://golang.org/cl/23111 mentions this issue.

@gopherbot
Copy link

CL https://golang.org/cl/23194 mentions this issue.

gopherbot pushed a commit that referenced this issue May 18, 2016
Looks like some version of Android still fails with "servname not
supported for ai_socktype". It probably doesn't support
ai_socktype=SOCK_STREAM.

Updates #14576.

Change-Id: I77ecff147d5b759e3281b3798c60f150a4aab811
Reviewed-on: https://go-review.googlesource.com/23194
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@golang golang locked and limited conversation to collaborators May 18, 2017
@rsc rsc unassigned rakyll Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

5 participants