]> Cypherpunks repositories - gostls13.git/commitdiff
debug/elf: enable TestNoSectionOverlaps on *bsd and solaris
authorTobias Klauser <tklauser@distanz.ch>
Tue, 17 Apr 2018 09:48:05 +0000 (09:48 +0000)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 17 Apr 2018 13:52:30 +0000 (13:52 +0000)
cmd/link produces ELF executables on all these geese, so enable
TestNoSectionOverlaps for them as well. Also add a skip message.

Change-Id: I374651dde3679271ef8c0c375c9cabd1adbca310
Reviewed-on: https://go-review.googlesource.com/107535
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/debug/elf/file_test.go

index 58bdf277d36b39ae495febfe8c2d1b58781c41a2..ce27abb064de8153661f1153323b1450686a3646 100644 (file)
@@ -763,9 +763,10 @@ func TestCompressedSection(t *testing.T) {
 }
 
 func TestNoSectionOverlaps(t *testing.T) {
-       // Ensure 6l outputs sections without overlaps.
-       if runtime.GOOS != "linux" && runtime.GOOS != "freebsd" {
-               return // not ELF
+       // Ensure cmd/link outputs sections without overlaps.
+       switch runtime.GOOS {
+       case "android", "darwin", "nacl", "plan9", "windows":
+               t.Skipf("cmd/link doesn't produce ELF binaries on %s", runtime.GOOS)
        }
        _ = net.ResolveIPAddr // force dynamic linkage
        f, err := Open(os.Args[0])