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

[Xen-devel] [OSSTEST PATCH 02/26] Executive: Allow out-of-order manipulations of flights intended play



Flights being operated on by a developer hacking about with the code,
which were created with intended blessing `play', are usually blessed
`running' or `broken' or something.  So the safety catch bypass needs
to look at the intended blessing too.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest/JobDB/Executive.pm | 6 +++---
 README.dev                 | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm
index 51c1ebb..c21eba7 100644
--- a/Osstest/JobDB/Executive.pm
+++ b/Osstest/JobDB/Executive.pm
@@ -102,14 +102,14 @@ sub dbfl_check ($$) { #method
     }
     die unless ref($flok) eq 'ARRAY';
 
-    my ($bless) = $dbh_tests->selectrow_array(<<END, {}, $fl);
-        SELECT blessing FROM flights WHERE flight=?
+    my ($bless, $intended) = $dbh_tests->selectrow_array(<<END, {}, $fl);
+        SELECT blessing, intended FROM flights WHERE flight=?
 END
 
     die "modifying flight $fl but flight not found\n"
         unless defined $bless;
 
-    unless ($bless =~ m/\bplay\b/) {
+    unless ($bless =~ m/\bplay\b/ || $intended =~ m/\bplay\b/) {
        die "modifying flight $fl blessing $bless expected @$flok\n"
            unless grep { $_ eq $bless } @$flok;
     }
diff --git a/README.dev b/README.dev
index 351cd25..a5b23b0 100644
--- a/README.dev
+++ b/README.dev
@@ -341,4 +341,5 @@ they crashed, are simply left with whatever blessing they 
had at the
 time.
 
 There is a special exception to the tools' flight status checks: any
-flight whose blessing contains `play' can be operated on out of order.
+flight whose blessing (or intended blessing) contains `play' can be
+operated on out of order.
-- 
2.1.4


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

 


Rackspace

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