]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
JobDB/Executive: Improve an internal `die' error
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 6 Jul 2015 10:20:28 +0000 (11:20 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 9 Jul 2015 11:47:38 +0000 (12:47 +0100)
When this assertion fails, dump the troublesome harness revision and
requested host flags, too.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest/JobDB/Executive.pm

index ba51bdfce3ca62175c99f1d387b0791091385f07..1ec947eb7c0f642749182e8be1df6fb4e0781eda 100644 (file)
@@ -127,14 +127,17 @@ sub host_check_allocated ($$) { #method
     $ho->{SharedMaybeOthers}=
         $ho->{Shared} &&
         $ho->{Shared}{State} eq 'ready';
+    my $harness = get_harness_rev();
+    my @flags = get_hostflags($ho->{Ident});
     $ho->{SharedReady}=
        $ho->{SharedMaybeOthers} &&
-        !! (grep { $_." ".get_harness_rev() eq "share-".$ho->{Shared}{Type} }
-           get_hostflags($ho->{Ident}));
+        !! (grep { $_." ".$harness eq "share-".$ho->{Shared}{Type} }
+           @flags);
     $ho->{SharedOthers}=
         $ho->{Shared} ? $ho->{Shared}{Others} : 0;
     
-    die Dumper($ho)." ?" if $ho->{SharedOthers} && !$ho->{SharedReady};
+    die Dumper($ho, $harness, \@flags)." ?"
+       if $ho->{SharedOthers} && !$ho->{SharedReady};
 }
 
 sub jobdb_postfork ($) { #method