From adb1a6ce3ca6b6f9c9aed7148cfc8b4b9b498b06 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 14 Feb 2012 17:11:12 +1100 Subject: [PATCH] net/http: more robust test Fixes #3014 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5665043 --- src/pkg/net/http/fs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/net/http/fs_test.go b/src/pkg/net/http/fs_test.go index 5878f60887d..11ca786fce0 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)