aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYao Zhang <lunaria21@gmail.com>2015-09-10 11:33:31 -0400
committerMinux Ma <minux@golang.org>2015-11-12 04:50:57 +0000
commiteebf7d279bd2991d54f18a629d4f3c32d7a58f2b (patch)
tree49d72915e787fa3a88f57f84b55fe0beabd38991 /src
parent84df38181baeae5b12d2831ecfa5c7aefeffd7b1 (diff)
downloadgo-eebf7d279bd2991d54f18a629d4f3c32d7a58f2b.tar.xz
net/http: fixed TestLinuxSendfile for mips64
mips64 strace doesn't support sendfile64 and will error out if we specify that with `-e trace='. So we use sendfile for mips64 here. Change-Id: If5e2bb39866ca3a77dcc40e4db338ba486921d89 Reviewed-on: https://go-review.googlesource.com/14455 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/net/http/fs_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go
index a3d64f3a08..abfd39377b 100644
--- a/src/net/http/fs_test.go
+++ b/src/net/http/fs_test.go
@@ -917,8 +917,16 @@ func TestLinuxSendfile(t *testing.T) {
}
defer ln.Close()
+ syscalls := "sendfile,sendfile64"
+ switch runtime.GOARCH {
+ case "mips64", "mips64le":
+ // mips64 strace doesn't support sendfile64 and will error out
+ // if we specify that with `-e trace='.
+ syscalls = "sendfile"
+ }
+
var buf bytes.Buffer
- child := exec.Command("strace", "-f", "-q", "-e", "trace=sendfile,sendfile64", os.Args[0], "-test.run=TestLinuxSendfileChild")
+ child := exec.Command("strace", "-f", "-q", "-e", "trace="+syscalls, 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