]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: deflake TestLinuxSendfile
authorBrad Fitzpatrick <bradfitz@golang.org>
Sat, 5 Nov 2016 00:25:38 +0000 (00:25 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 5 Nov 2016 01:17:21 +0000 (01:17 +0000)
Fixes #17805

Change-Id: I30d3e63a82b3690a76f2bb33d59ae34c62a7fa59
Reviewed-on: https://go-review.googlesource.com/32759
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/http/fs_test.go

index 55f0debe70eb27392e9fd9d3d284e81ac0d99ecd..910295c180eed4e6c55a600ea42abd50503c8e62 100644 (file)
@@ -1116,10 +1116,9 @@ func TestLinuxSendfile(t *testing.T) {
        Post(fmt.Sprintf("http://%s/quit", ln.Addr()), "", nil)
        child.Wait()
 
-       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`)
+       rx := regexp.MustCompile(`sendfile(64)?\(\d+,\s*\d+,\s*NULL,\s*\d+`)
        out := buf.String()
-       if !rx.MatchString(out) && !rxResume.MatchString(out) {
+       if !rx.MatchString(out) {
                t.Errorf("no sendfile system call found in:\n%s", out)
        }
 }