]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
sg-run-job: nested: Report nested log capture failure as `fail'
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 11 Apr 2016 16:17:30 +0000 (17:17 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 11 Apr 2016 16:39:03 +0000 (17:39 +0100)
Previously this was `broken' (ie, infrastructure failure), which is
not really true - the usual reason is that the L0 has crashed, so that
efforts to manipulate the L1 do not succeed.

Tested using OSSTEST_SIMULATE and this:

  diff --git a/sg-run-job b/sg-run-job
  index 8b2d5e1..0f8e278 100755
  --- a/sg-run-job
  +++ b/sg-run-job
  @@ -181,6 +181,11 @@ proc spawn-ts {iffail testid args} {
       set xprefix {}
       if {[var-or-default env(OSSTEST_SIMULATE) 0]} { set xprefix echo }

  +puts stderr ">$ts $real_args"
  +    switch -glob "$ts $real_args" {
  +        {ts-logs-capture *} { set xprefix "bomb $xprefix" }
  +    }
  +
       set log [jobdb::step-log-filename $flight $jobinfo(job) $stepno $ts]
       set redirects {< /dev/null}
       if {[string length $log]} {

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
sg-run-job

index d1bd124ba1e88c4abda6309074bda7eda173951f..8b2d5e16cd1fc98e26dc70265cea3658b920812c 100755 (executable)
@@ -33,8 +33,9 @@ proc per-host-prep {} {
 }
 
 proc per-host-finish {} {
+    if {[nested-hosts-p]} { set broken fail } { set broken broken }
     per-host-ts .       =                {ts-leak-check check}
-    per-host-ts !broken capture-logs/@(*) ts-logs-capture
+    per-host-ts !$broken capture-logs/@(*) ts-logs-capture
 }
 
 proc run-job {job} {
@@ -259,7 +260,7 @@ proc per-host-ts {iffail ident script args} {
 
 proc nested-hosts-p {} {
     global nested_layers_hosts
-    expr {!![llength nested_layers_hosts]}
+    expr {!![llength $nested_layers_hosts]}
 }
 
 proc nested-layer-descend {nested_hosts} {