From 92f8acd192dc2dc9191cc633666c26137c12a6cd Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 11 Jun 2018 22:34:03 +0200 Subject: [PATCH] cmd/nm: fix TestGoExec on Plan 9 CL 115975 changed TestGoExec to check symbol types. However, this test is failing on Plan 9, because there is no read-only data segment symbol on Plan 9. This change fixes TestGoExec to replace the check of read-only data segment symbol (R) by data segment symbol (D) on Plan 9. Fixes #25820. Change-Id: I7164cd9056fa1dfcd1dc1b0f87653290c14c85fa Reviewed-on: https://go-review.googlesource.com/118035 Run-TryBot: David du Colombier <0intro@gmail.com> Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/nm/nm_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/nm/nm_test.go b/src/cmd/nm/nm_test.go index 890df0f902..ccf5682d69 100644 --- a/src/cmd/nm/nm_test.go +++ b/src/cmd/nm/nm_test.go @@ -157,6 +157,10 @@ func testGoExec(t *testing.T, iscgo, isexternallinker bool) { t.Errorf("duplicate name of %q is found", name) } if stype, found := runtimeSyms[name]; found { + if runtime.GOOS == "plan9" && stype == "R" { + // no read-only data segment symbol on Plan 9 + stype = "D" + } if want, have := stype, strings.ToUpper(f[1]); have != want { t.Errorf("want %s type for %s symbol, but have %s", want, name, have) } -- 2.50.0