my $failure_verbosity = $openssl_args{failure_verbosity};
my @plans = (); # initial level, no plan yet
my $output_buffer = "";
+ my $in_indirect = 0;
# We rely heavily on perl closures to make failure verbosity work
# We need to do so, because there's no way to safely pass extra
$output_buffer = ""; # ignore comments etc. until plan
} elsif ($is_test) { # result of a test
pop @plans if @plans && --($plans[-1]) <= 0;
- print $output_buffer if !$is_ok;
+ if ($output_buffer =~ /.*Indirect leak of.*/ == 1) {
+ my @asan_array = split("\n", $output_buffer);
+ foreach (@asan_array) {
+ if ($_ =~ /.*Indirect leak of.*/ == 1) {
+ $in_indirect = 1;
+ } else {
+ if ($_ =~ /^ #.*/ == 0) {
+ $in_indirect = 0;
+ }
+ }
+ print "$_\n" if !$in_indirect;
+ }
+ } else {
+ print $output_buffer if !$is_ok;
+ }
print "\n".$self->as_string
if !$is_ok || $failure_verbosity == 2;
print "\n# ------------------------------------------------------------------------------" if !$is_ok;