The libgo test of using sendfile on GNU/Linux runs strace.  The version
of strace I have installed on my powerpc64-unknown-linux-gnu system
crashes when tracing the sigaltstack system call.  This patch works
around this problem by telling strace to not trace sigaltstack.  This
does not affect the test, as the only reason it is running strace is to
check that the binary invokes sendfile or sendfile64.  Bootstrapped and
ran Go testsuite on x86_64-unknown-linux-gnu and
powerpc64-unknown-linux-gnu.  Committed to mainline and 4.7 branch.

Ian

diff -r 0a34b0a7bcc1 libgo/go/net/http/fs_test.go
--- a/libgo/go/net/http/fs_test.go	Fri Apr 20 11:42:58 2012 -0700
+++ b/libgo/go/net/http/fs_test.go	Fri Apr 20 11:44:53 2012 -0700
@@ -396,7 +396,7 @@
 	defer ln.Close()
 
 	var buf bytes.Buffer
-	child := exec.Command("strace", "-f", os.Args[0], "-test.run=TestLinuxSendfileChild")
+	child := exec.Command("strace", "-f", "-e!sigaltstack", os.Args[0], "-test.run=TestLinuxSendfileChild")
 	child.ExtraFiles = append(child.ExtraFiles, lnf)
 	child.Env = append([]string{"GO_WANT_HELPER_PROCESS=1"}, os.Environ()...)
 	child.Stdout = &buf

Reply via email to