From f624cb736a20c433d4e81c202222fc4ff50afe4c Mon Sep 17 00:00:00 2001 From: Hugo van der Sanden Date: Wed, 11 Feb 2015 17:24:33 +0000 Subject: Add --crash option for Porting/bisect If --crash is specified, treat test cases as bad only if they exit with ($? & 0xff) non-zero. --- Porting/bisect-runner.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 5f78cf91f3..4d7a6f2314 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -53,7 +53,7 @@ push @paths, qw(/usr/local/lib /lib /usr/lib) unless $linux64; unless(GetOptions(\%options, - 'target=s', 'make=s', 'jobs|j=i', 'expect-pass=i', + 'target=s', 'make=s', 'jobs|j=i', 'crash', 'expect-pass=i', 'expect-fail' => sub { $options{'expect-pass'} = 0; }, 'clean!', 'one-liner|e=s@', 'c', 'l', 'w', 'match=s', 'no-match=s' => sub { @@ -151,6 +151,8 @@ bisect.pl - use git bisect to pinpoint changes .../Porting/bisect.pl --expect-fail --match '\buseithreads\b' # When did this test program stop exiting 0? .../Porting/bisect.pl -- ./perl -Ilib ../test_prog.pl + # When did this test program start crashing (any signal or coredump)? + .../Porting/bisect.pl --crash -- ./perl -Ilib ../test_prog.pl # When did this first become valid syntax? .../Porting/bisect.pl --target=miniperl --end=v5.10.0 \ --expect-fail -e 'my $a := 2;' @@ -397,6 +399,13 @@ revision. The bisect run will find the first commit where it passes. =item * +--crash + +Treat any non-crash as success, any crash as failure. (Crashing defined +as exiting with a signal or a core dump.) + +=item * + -D I =item * @@ -1137,6 +1146,7 @@ sub run_report_and_exit { my $ret = run_with_options({setprgp => $options{setpgrp}, timeout => $options{timeout}, }, @_); + $ret &= 0xff if $options{crash}; report_and_exit(!$ret, 'zero exit from', 'non-zero exit from', "@_"); } -- cgit v1.2.1