xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/2] sg-run-job: nested: Break out nested-hosts-p
@ 2016-04-11 16:37 Ian Jackson
  2016-04-11 16:37 ` [OSSTEST PATCH 2/2] sg-run-job: nested: Report nested log capture failure as `fail' Ian Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Jackson @ 2016-04-11 16:37 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

We are going to want to test this elsewhere, too.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-run-job |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sg-run-job b/sg-run-job
index 3e0f966..d1bd124 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -75,7 +75,7 @@ proc run-job {job} {
     while 1 {
 	per-host-finish
 	
-	if {![llength $nested_layers_hosts]} break
+	if {![nested-hosts-p]} break
 
 	per-host-ts . final-poweroff {ts-host-powercycle --power=0}
 
@@ -257,6 +257,11 @@ proc per-host-ts {iffail ident script args} {
     }
 }
 
+proc nested-hosts-p {} {
+    global nested_layers_hosts
+    expr {!![llength nested_layers_hosts]}
+}
+
 proc nested-layer-descend {nested_hosts} {
     # We save need_xen_hosts on a stack in nested_layers_hosts
     # It gets popped again during the cleanup part of run-job
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [OSSTEST PATCH 2/2] sg-run-job: nested: Report nested log capture failure as `fail'
  2016-04-11 16:37 [OSSTEST PATCH 1/2] sg-run-job: nested: Break out nested-hosts-p Ian Jackson
@ 2016-04-11 16:37 ` Ian Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2016-04-11 16:37 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

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 |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sg-run-job b/sg-run-job
index d1bd124..8b2d5e1 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -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} {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-11 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-11 16:37 [OSSTEST PATCH 1/2] sg-run-job: nested: Break out nested-hosts-p Ian Jackson
2016-04-11 16:37 ` [OSSTEST PATCH 2/2] sg-run-job: nested: Report nested log capture failure as `fail' Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).