Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:

> As described in the PR, the go libgo test fails on Solaris since /bin is
> a symlink to /usr/bin.  Since there is other OS-specific code in
> os_test.go, I'm using the follwing patch to fix this.

I committed this patch instead, to the upstream library and to gccgo.
Let me know if it doesn't work.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

diff -r f58704837aa1 libgo/go/os/os_test.go
--- a/libgo/go/os/os_test.go	Tue May 24 15:02:48 2011 -0700
+++ b/libgo/go/os/os_test.go	Tue May 24 22:54:38 2011 -0700
@@ -437,7 +437,8 @@
 	var b bytes.Buffer
 	io.Copy(&b, r)
 	output := b.String()
-	if output != expect {
+	// Accept /usr prefix because Solaris /bin is symlinked to /usr/bin.
+	if output != expect && output != "/usr"+expect {
 		t.Errorf("exec %q returned %q wanted %q",
 			strings.Join(append([]string{cmd}, args...), " "), output, expect)
 	}

Reply via email to