[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH] ts-depriv-audit-qemu: Leaked substeps are `blocked', and then script is fail



If thus script crash in some non-substep-specific operation, the
substeps may have been created (and thus be in the db as `running').
Leaving them like this is not allowed: it is treated by sg-run-job,
and by the archaeologists as an internal error.

If this happens, what we want is for the script as a whole to be
`fail', and for the failing tests to be `blocked'.  The former will
spot if this crash is a regression.  The latter will avoid treating
the substeps themselves as regressions.

Reported-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 ts-depriv-audit-qemu | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ts-depriv-audit-qemu b/ts-depriv-audit-qemu
index 81bd5c0..3c218d9 100755
--- a/ts-depriv-audit-qemu
+++ b/ts-depriv-audit-qemu
@@ -118,10 +118,21 @@ sub audit_fish () {
     foreach my $cl (sort keys %classes) {
        substep_finish("/$cl", $classes{$cl} || 'pass');
        # (if there are no fds of this class, maybe they were all closed)
+       $classes{$cl} = 'reported';
     }
     logm("audit complete...");
 }
 
+END {
+    foreach my $cl (sort keys %classes) {
+       my $st = $classes{$cl};
+       next if $st eq 'REPORTED';
+       logm("substep not reported, at exit: $cl, $st");
+       substep_finish("/$cl", 'blocked');
+       $? = -1; # in case we were trying to succeed
+    }
+}    
+
 #----- administrivia, main program, etc. -----
 
 sub mode_create () {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.