Skip to content

Commit f9d406e

Browse files
committed
net/http: deflake TestLinuxSendfile
Fixes #17805 Change-Id: I30d3e63a82b3690a76f2bb33d59ae34c62a7fa59 Reviewed-on: https://go-review.googlesource.com/32759 Run-TryBot: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 276c29f commit f9d406e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/net/http/fs_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,10 +1116,9 @@ func TestLinuxSendfile(t *testing.T) {
11161116
Post(fmt.Sprintf("http://%s/quit", ln.Addr()), "", nil)
11171117
child.Wait()
11181118

1119-
rx := regexp.MustCompile(`sendfile(64)?\(\d+,\s*\d+,\s*NULL,\s*\d+\)\s*=\s*\d+\s*\n`)
1120-
rxResume := regexp.MustCompile(`<\.\.\. sendfile(64)? resumed> \)\s*=\s*\d+\s*\n`)
1119+
rx := regexp.MustCompile(`sendfile(64)?\(\d+,\s*\d+,\s*NULL,\s*\d+`)
11211120
out := buf.String()
1122-
if !rx.MatchString(out) && !rxResume.MatchString(out) {
1121+
if !rx.MatchString(out) {
11231122
t.Errorf("no sendfile system call found in:\n%s", out)
11241123
}
11251124
}

0 commit comments

Comments
 (0)