]> xenbits.xensource.com Git - osstest.git/commitdiff
cr-ensure-disk-space: Take the flights db lock
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 3 Jul 2015 16:54:28 +0000 (17:54 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Sep 2015 11:37:30 +0000 (12:37 +0100)
This eliminates the race with cs-bisection-step (and other
flight-construction tools which might reuse previous flights, provided
that they also do not pass previous flight numbers from hand to hand
with the db unlocked).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
cr-ensure-disk-space

index 8c5a708f334f894a1b48571c12f33725105a0069..138f3f4e5c5bc427d677ac33180d1db52eeb1988 100755 (executable)
@@ -145,10 +145,13 @@ END
     return 1;
 }
 
-for (;;) {
-    iteration_continue()
-       or last;
-}
+db_retry($dbh_tests,[qw(flights)], sub {
+    @flights = ();
+    for (;;) {
+       iteration_continue()
+           or last;
+    }
+});
 
 printf "ok.\n";
 exit 0;