Commit adb1a6ce authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: more robust test

Fixes #3014

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5665043
parent e07f089c
......@@ -419,8 +419,8 @@ func TestLinuxSendfile(t *testing.T) {
child.Wait()
strace.Wait()
rx := regexp.MustCompile(`sendfile\(\d+,\s*\d+,\s*NULL,\s*\d+\)\s*=\s*\d+\s*\n`)
rxResume := regexp.MustCompile(`<\.\.\. sendfile resumed> \)\s*=\s*\d+\s*\n`)
rx := regexp.MustCompile(`sendfile(64)?\(\d+,\s*\d+,\s*NULL,\s*\d+\)\s*=\s*\d+\s*\n`)
rxResume := regexp.MustCompile(`<\.\.\. sendfile(64)? resumed> \)\s*=\s*\d+\s*\n`)
out := buf.String()
if !rx.MatchString(out) && !rxResume.MatchString(out) {
t.Errorf("no sendfile system call found in:\n%s", out)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment