]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
cs-bisection-step: Print our command line at the start
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 4 Sep 2015 10:38:35 +0000 (11:38 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 4 Sep 2015 11:08:15 +0000 (12:08 +0100)
The usual approach for debugging the cs-bisection-step is to repro the
problem (with --max-flight), which is most easily done by copying the
command line provided during a run which did the wrong thing.

Print the command line at startup, so that it appears in the report.
This will save us grobbling through the logs and cron mail.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
cs-bisection-step

index 42bf20ba2a37bae989ee662e93556d59640280e2..37efbeac6c020913c36fbf96007788aaf70bec52 100755 (executable)
@@ -114,6 +114,18 @@ our (@treeinfos);
 our $restrictflight_cond= restrictflight_cond();
 our $blessingscond= '('.join(" OR  ", map { "blessing='$_'" } @blessings).')';
 
+sub reportcmdline () {
+    print STDERR "Running cs-bisection-step";
+    foreach (my @noalias = @org_argv) {
+       if (!length || m{[^-+,./_=:A-Z0-9a-z]}) {
+           s{'}{'\\''}g;
+           $_ = "'$_'";
+       }
+       print STDERR " ", $_;
+    }
+    print STDERR "\n";
+}
+
 sub psummary ($) {
     my ($s) = @_;
     print STDERR $s or die $!;
@@ -1326,6 +1338,7 @@ sub compute_exitstatus () {
 
 csreadconfig();
 grabrepolock_reexec(@org_argv);
+reportcmdline();
 findbasics();
 digraph_whole();
 digraph_relevant();