Skip to content

Commit

Permalink
[test suite] always run crash check at the end of test run
Browse files Browse the repository at this point in the history
  • Loading branch information
mrash committed Jun 12, 2014
1 parent e02750e commit d8b2ae3
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/test-fwknop.pl
Expand Up @@ -288,6 +288,7 @@
my @tests_to_include = ();
my $test_exclude = '';
my @tests_to_exclude = ();
my $do_crash_check = 1;
my %valgrind_flagged_fcns = ();
my %valgrind_flagged_fcns_unique = ();
my $previous_valgrind_coverage_dir = '';
Expand Down Expand Up @@ -692,23 +693,10 @@
@os_compatibility,
@perl_FKO_module,
@python_fko,

{
'category' => 'Look for crashes',
'detail' => 'checking for segfault/core dump messages (1)',
'function' => \&look_for_crashes,
},

@gpg_no_pw,
@gpg_no_pw_hmac,
@gpg,
@gpg_hmac,

{
'category' => 'Look for crashes',
'detail' => 'checking for segfault/core dump messages (2)',
'function' => \&look_for_crashes,
}
);

my %test_keys = (
Expand Down Expand Up @@ -850,6 +838,14 @@
);
}

if ($do_crash_check) {
&run_test({
'category' => 'Look for crashes',
'detail' => 'checking for segfault/core dump messages',
'function' => \&look_for_crashes}
);
}

&logr("\n");

unless ($list_mode) {
Expand Down Expand Up @@ -1043,6 +1039,7 @@ ()
if ($msg =~ $test
or ($enable_valgrind and $msg =~ /valgrind\soutput/)
or ($enable_profile_coverage_check and $msg =~ /profile\scoverage/)
or ($msg =~ /segfault.*dump\smessages/)
) {
$found = 1;
last;
Expand Down Expand Up @@ -1371,7 +1368,8 @@ ()
} else {
### we are testing the fwknop client and expect an error
### we are testing the fwknop client, server, or other command
### and expect an error
$rv = not &run_cmd($test_hr->{'cmdline'}, $cmd_out_tmp, $curr_test_file);
if ($test_hr->{'positive_output_matches'}) {
Expand Down Expand Up @@ -1527,6 +1525,8 @@ ()
}
}
$do_crash_check = 0;
return $rv;
}
Expand Down

0 comments on commit d8b2ae3

Please sign in to comment.