]> Cypherpunks repositories - gostls13.git/commit
net/http: relax the matching of strace output in test
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 2 Jan 2018 01:17:14 +0000 (17:17 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 2 Jan 2018 20:02:06 +0000 (20:02 +0000)
commit2ba3fd484bb048be86c2bd804900151a1ec5affd
tree67213ee6fff52503efdb952d69fecb33215fa009
parent5305bdd86bbe31d61c72e62f4e6729e3562ae178
net/http: relax the matching of strace output in test

Modify the regex in TestLinuxSendfile to not match the parameters of
the syscall, just its name and the opening parenthesis. This is enough
to recognize that the syscall was invoked.

This fixes the TestLinuxSendfile test when running in Clear Linux,
where strace always execute with -yy implied, having output with extra
information in the parameters:

    [pid  5336] sendfile(6<TCP:[127.0.0.1:35007->127.0.0.1:55170]>, 8</home/c/src/go/src/net/http/testdata/index.html>, NULL, 22) = 22

Change-Id: If7639b785d5fdf65fae8e6149a97a57b06ea981c
Reviewed-on: https://go-review.googlesource.com/85657
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/fs_test.go