[tests] improve valgrind and strace TRACEME, disable condition logging in normal configs

- 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 <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2978 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2015-02-08 19:10:41 +00:00
parent 4365bdbebe
commit adfa06de99
3 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

@ -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

View File

@ -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/"