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:
parent
e07f089cb0
commit
adb1a6ce3c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user