diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-05 00:25:38 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-11-05 01:17:21 +0000 |
commit | f9d406ebeaa0af42d2a88bab498a44a91c6c03ee (patch) | |
tree | 926759b2a4d75fe867b12877fb8b243df2ab45c6 | |
parent | 276c29ff6da13ef7089075d8cd2172fe3d3956fb (diff) | |
download | go-f9d406ebeaa0af42d2a88bab498a44a91c6c03ee.tar.gz go-f9d406ebeaa0af42d2a88bab498a44a91c6c03ee.zip |
net/http: deflake TestLinuxSendfile
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>
-rw-r--r-- | src/net/http/fs_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net/http/fs_test.go b/src/net/http/fs_test.go index 55f0debe70..910295c180 100644 --- a/src/net/http/fs_test.go +++ b/src/net/http/fs_test.go @@ -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) } } |