From adfa06de996944b495b878540464dd6e74563052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sun, 8 Feb 2015 19:10:41 +0000 Subject: [PATCH 18/29] [tests] improve valgrind and strace TRACEME, disable condition logging in normal configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - condition logging is way too noisy and rarely useful - increate timeout to wait for port bind; if the process dies we fail early anyway From: Stefan Bühler git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2978 152afb58-edef-0310-8abb-c4023f1b3aa9 --- tests/LightyTest.pm | 6 +++--- tests/lighttpd.conf | 2 +- tests/var-include.conf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm index b92af87..36029dc 100755 --- a/tests/LightyTest.pm +++ b/tests/LightyTest.pm @@ -87,7 +87,7 @@ sub wait_for_port_with_proc { my $self = shift; my $port = shift; my $child = shift; - my $timeout = 5*10; # 5 secs, select waits 0.1 s + my $timeout = 10*10; # 10 secs (valgrind might take a while), select waits 0.1 s while (0 == $self->listening_on($port)) { select(undef, undef, undef, 0.1); @@ -125,13 +125,13 @@ sub start_proc { my @cmdline = ($self->{LIGHTTPD_PATH}, "-D", "-f", $self->{SRCDIR}."/".$self->{CONFIGFILE}, "-m", $self->{MODULES_PATH}); if (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'strace') { - @cmdline = (qw(strace -tt -s 512 -o strace), @cmdline); + @cmdline = (qw(strace -tt -s 4096 -o strace -f -v), @cmdline); } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'truss') { @cmdline = (qw(truss -a -l -w all -v all -o strace), @cmdline); } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'gdb') { @cmdline = ('gdb', '--batch', '--ex', 'run', '--ex', 'bt full', '--args', @cmdline); } elsif (defined $ENV{"TRACEME"} && $ENV{"TRACEME"} eq 'valgrind') { - @cmdline = (qw(valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --log-file=valgrind), @cmdline); + @cmdline = (qw(valgrind --tool=memcheck --track-origins=yes --show-reachable=yes --leak-check=yes --log-file=valgrind.%p), @cmdline); } # diag("\nstarting lighttpd at :".$self->{PORT}.", cmdline: ".@cmdline ); my $child = fork(); diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf index a4b5cd8..a140002 100644 --- a/tests/lighttpd.conf +++ b/tests/lighttpd.conf @@ -1,7 +1,7 @@ debug.log-request-handling = "enable" debug.log-request-header = "enable" debug.log-response-header = "enable" -debug.log-condition-handling = "enable" +#debug.log-condition-handling = "enable" server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" ## 64 Mbyte ... nice limit diff --git a/tests/var-include.conf b/tests/var-include.conf index 04b8271..6a107c5 100644 --- a/tests/var-include.conf +++ b/tests/var-include.conf @@ -1,6 +1,6 @@ debug.log-request-handling = "enable" -debug.log-condition-handling = "enable" +#debug.log-condition-handling = "enable" server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" -- 2.4.5