From nobody Mon Feb 9 19:52:59 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1555605178; cv=none; d=zoho.com; s=zohoarc; b=Tj1iLmAchSg9ndf5uWokNsPDNEzpd0k9ISBmqCn5IP+Oy2HV2k9AjZDNEtD1DrSVrqhgt4X/CDAcpIL+TFjPeiv687LBNrT6kuLC/xN9AjHiKITYZcdsctmK6Ie5Bmhk2OEoaXZXNFtZ0jN01l4z9dgMdQNBvWW0h2X7JYEAQt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605178; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=u7F1RNdP/iWvzHVWBX0ahZCcv6HIzTCGHxhHjDA3CeM=; b=YA08YZrQFopvsZlrQE4Yl9k+ocMwRU1gvZ9x1fTJTwZEdsqMbtZrB0aVmE0jQDlq48tFyXRw+yQumEF7z/8VWBlBlQqOO47PgvtphSAovwMpShxNdpGS+mjON12czhSGZ+xqRRlVFSKE+f3d7plkd10cRZhseOAgJAg9sbNeUYY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 155560517878410.990493634445784; Thu, 18 Apr 2019 09:32:58 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xU-0002IZ-Kc; Thu, 18 Apr 2019 16:32:20 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xR-0002CN-JH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:17 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 86bfa75d-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:15 +0000 (UTC) X-Inumbo-ID: 86bfa75d-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913805" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:41 +0100 Message-ID: <20190418163158.11408-5-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 04/21] alloc_resources: Support special abandonment values X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This gives a way for the caller's $resourcecall to signal something interesting, back to its main loop. This is useful for calling broken, for example: that can't be done within $resourcecall because $resourcecall operates within the allocation db transaction (which ought to be rolled back...) Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 0d8502b5..b27b8d25 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -737,7 +737,8 @@ sub alloc_resources { # # values of $ok # 0 rollback, wait and try again - # 1 commit, completed ok + # 1 commit, completed ok } return the + # >1 rollback and abandon } value of $ok # $bookinglist should be undef or a hash for making a booking # # $resourcecall should not look at tasks.live @@ -859,10 +860,14 @@ sub alloc_resources { # $resourcecall itself failed: bomb out (don't retry) $ok=3D-1; } - return db_retry_abort() unless $ok>0; + return db_retry_abort() unless $ok=3D=3D1; }]); =20 - if ($bookinglist && $ok!=3D-1) { + if ($ok<0 || $ok>1) { + return 1; + } + + if ($bookinglist) { my %prstart; foreach my $book (@{ $bookinglist->{Bookings} }) { my $pr =3D $book->{Reso}; @@ -890,8 +895,6 @@ sub alloc_resources { =20 if ($ok=3D=3D1) { print $qserv "thought-done\n" or die $!; - } elsif ($ok<0) { - return 1; } else { # 0 logm("resource allocation: deferring"); print $qserv "thought-wait\n" or die $!; @@ -935,8 +938,12 @@ END $ok=3D 0; } } - die unless $ok=3D=3D1; - logm("resource allocation: successful."); + if ($ok=3D=3D1) { + logm("resource allocation: successful."); + } else { + logm("resource allocation: resourcecall returned ($ok,...)"); + } + return $ok; } =20 sub resource_check_allocated ($$) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel