In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/54ad4e11aa2a4191637d6f4ef1b878490e4fb6db?hp=e13dc8886fcabf88a521e8e73c358157b1fa4c8a>
- Log ----------------------------------------------------------------- commit 54ad4e11aa2a4191637d6f4ef1b878490e4fb6db Author: David Mitchell <[email protected]> Date: Fri Jun 23 08:37:08 2017 +0100 porting/bench.t: skip under ASAN Address Sanitizer and cachegrind don't play nicely together Also change a couple of 'is length($out), 0' to 'is $out, ""' so that $out is displayed to stderr if not empty. ----------------------------------------------------------------------- Summary of changes: t/porting/bench.t | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/t/porting/bench.t b/t/porting/bench.t index c4221c1e89..e73f980f74 100644 --- a/t/porting/bench.t +++ b/t/porting/bench.t @@ -6,14 +6,17 @@ # # See also t/porting/bench_selftest.pl -use warnings; -use strict; - BEGIN { chdir '..' if -f 'test.pl' && -f 'thread_it.pl'; require './t/test.pl'; + push @INC, 'lib'; } +use warnings; +use strict; +use Config; + + # Only test on git checkouts - this is more of a perl core developer # tool than an end-user tool. # Only test on a platform likely to support forking, pipes, cachegrind @@ -22,6 +25,8 @@ BEGIN { skip_all "not devel" unless -d ".git"; skip_all "not linux" unless $^O eq 'linux'; skip_all "no valgrind" unless -x '/bin/valgrind' || -x '/usr/bin/valgrind'; +# Address sanitizer clashes horribly with cachegrind +skip_all "not with ASAN" if $Config{ccflags} =~ /sanitize=address/; my $bench_pl = "Porting/bench.pl"; @@ -363,7 +368,7 @@ my $resultfile2 = tempfile(); # benchmark results for 2 perls note("running cachegrind for 1st perl; may be slow..."); $out = qx($bench_cmd -j 2 --write=$resultfile1 --tests=call::sub::empty $^X=p0 2>&1); -is length($out), 0, "--write should produce no output (1 perl)"; +is $out, "", "--write should produce no output (1 perl)"; ok -s $resultfile1, "--write should create a non-empty results file (1 perl)"; # and again with 2 perls. This is also tests the 'mix read and new new @@ -371,7 +376,7 @@ ok -s $resultfile1, "--write should create a non-empty results file (1 perl)"; note("running cachegrind for 2nd perl; may be slow..."); $out = qx($bench_cmd -j 2 --read=$resultfile1 --write=$resultfile2 $^X=p1 2>&1); -is length($out), 0, "--write should produce no output (2 perls)" +is $out, "", "--write should produce no output (2 perls)" or diag("got: $out"); ok -s $resultfile2, "--write should create a non-empty results file (2 perls)"; -- Perl5 Master Repository
