From: Brad Fitzpatrick Date: Tue, 14 Feb 2012 06:11:12 +0000 (+1100) Subject: net/http: more robust test X-Git-Tag: weekly.2012-02-14~35 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=adb1a6ce3ca6b6f9c9aed7148cfc8b4b9b498b06;p=gostls13.git net/http: more robust test Fixes #3014 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5665043 --- diff --git a/src/pkg/net/http/fs_test.go b/src/pkg/net/http/fs_test.go index 5878f60887..11ca786fce 100644 --- a/src/pkg/net/http/fs_test.go +++ b/src/pkg/net/http/fs_test.go @@ -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)