]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: more robust test
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 14 Feb 2012 06:11:12 +0000 (17:11 +1100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 14 Feb 2012 06:11:12 +0000 (17:11 +1100)
Fixes #3014

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5665043

src/pkg/net/http/fs_test.go

index 5878f60887dcf985f48514c637daf68582dc4697..11ca786fce0a577a3fa57ce9d4095e77baa2947e 100644 (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)