From: Ian Jackson Subject: [OSSTEST PATCH 4/4] JobDB/Executive: Improve an internal `die' error Date: Wed, 8 Jul 2015 16:21:16 +0100 Message-ID: <1436368876-23964-4-git-send-email-ian.jackson@eu.citrix.com> References: <1436368876-23964-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZCrEY-0007Sf-0S for xen-devel@lists.xenproject.org; Wed, 08 Jul 2015 15:26:02 +0000 In-Reply-To: <1436368876-23964-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org When this assertion fails, dump the troublesome harness revision and requested host flags, too. Signed-off-by: Ian Jackson --- Osstest/JobDB/Executive.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Osstest/JobDB/Executive.pm b/Osstest/JobDB/Executive.pm index ba51bdf..1ec947e 100644 --- a/Osstest/JobDB/Executive.pm +++ b/Osstest/JobDB/Executive.pm @@ -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 -- 1.7.10.4