1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:04:41 -07:00

net/http: more robust test

Fixes #3014

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5665043
This commit is contained in:
Brad Fitzpatrick 2012-02-14 17:11:12 +11:00
parent e07f089cb0
commit adb1a6ce3c

View File

@ -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)