@@ -1122,21 +1122,13 @@ func TestLinuxSendfile(t *testing.T) {
1122
1122
}
1123
1123
defer ln .Close ()
1124
1124
1125
- syscalls := "sendfile,sendfile64"
1126
- switch runtime .GOARCH {
1127
- case "mips64" , "mips64le" , "s390x" :
1128
- // strace on the above platforms doesn't support sendfile64
1129
- // and will error out if we specify that with `-e trace='.
1130
- syscalls = "sendfile"
1131
- }
1132
-
1133
1125
// Attempt to run strace, and skip on failure - this test requires SYS_PTRACE.
1134
- if err := exec .Command ("strace" , "-f" , "-q" , "-e" , "trace=" + syscalls , os .Args [0 ], "-test.run=^$" ).Run (); err != nil {
1126
+ if err := exec .Command ("strace" , "-f" , "-q" , os .Args [0 ], "-test.run=^$" ).Run (); err != nil {
1135
1127
t .Skipf ("skipping; failed to run strace: %v" , err )
1136
1128
}
1137
1129
1138
1130
var buf bytes.Buffer
1139
- child := exec .Command ("strace" , "-f" , "-q" , "-e" , "trace=" + syscalls , os .Args [0 ], "-test.run=TestLinuxSendfileChild" )
1131
+ child := exec .Command ("strace" , "-f" , "-q" , os .Args [0 ], "-test.run=TestLinuxSendfileChild" )
1140
1132
child .ExtraFiles = append (child .ExtraFiles , lnf )
1141
1133
child .Env = append ([]string {"GO_WANT_HELPER_PROCESS=1" }, os .Environ ()... )
1142
1134
child .Stdout = & buf
@@ -1159,7 +1151,7 @@ func TestLinuxSendfile(t *testing.T) {
1159
1151
Post (fmt .Sprintf ("http://%s/quit" , ln .Addr ()), "" , nil )
1160
1152
child .Wait ()
1161
1153
1162
- rx := regexp .MustCompile (`sendfile(64)?\(` )
1154
+ rx := regexp .MustCompile (`\b(n64:)? sendfile(64)?\(` )
1163
1155
out := buf .String ()
1164
1156
if ! rx .MatchString (out ) {
1165
1157
t .Errorf ("no sendfile system call found in:\n %s" , out )
0 commit comments