Skip to content

Commit 83de3ab

Browse files
author
Felipe Zimmerle
committed
nginx: looking for segfaults on the regression test.
If nginx segfaults it will return, warning that the test failed.
1 parent 9c69508 commit 83de3ab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/run-regression-tests-nginx.pl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ sub runfile {
204204
my $rc = 0;
205205
my $conf_fn;
206206

207+
# watch for segfaults
208+
if ($t and !$t->{match_log}) {
209+
$t->{match_log} = {};
210+
}
211+
if ($t and $t->{match_log} and !$t->{match_log}{-error}) {
212+
$t->{match_log}{-error} = [];
213+
}
214+
push $t->{match_log}{-error}, qr/(core dump)/;
215+
push $t->{match_log}{-error}, 1;
216+
207217
# Startup nginx with optionally included conf.
208218
if (exists $t{conf} and defined $t{conf}) {
209219
$conf_fn = sprintf "%s/%s_%s_%06d.conf",
@@ -498,7 +508,6 @@ sub match_log {
498508
#dbg("Match \"$re\" in $name \"$$rbuf\" ($n)");
499509
if ($$rbuf =~ m/$re/m) {
500510
$rc = $&;
501-
# print "bonga\n";
502511
last;
503512
}
504513
# TODO: Use select()/poll()
@@ -695,6 +704,7 @@ sub nginx_reset_fd {
695704
return undef;
696705
}
697706

707+
698708
# Any extras listed in "match_log"
699709
if ($t and exists $t->{match_log}) {
700710
for my $k (keys %{ $t->{match_log} || {} }) {

0 commit comments

Comments
 (0)