From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST 2/4] ts-hosts-allocate-Executive: add a label to loop over candidates
Date: Tue, 15 Sep 2015 17:05:16 +0100 [thread overview]
Message-ID: <1442333118-843-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1442333100.18856.16.camel@citrix.com>
I'm going to want to "next CANDIDATE" from within a nested loop.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
ts-hosts-allocate-Executive | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ts-hosts-allocate-Executive b/ts-hosts-allocate-Executive
index c9aae88..294395d 100755
--- a/ts-hosts-allocate-Executive
+++ b/ts-hosts-allocate-Executive
@@ -313,6 +313,7 @@ END
my @candidates;
my $any=0;
+ CANDIDATE:
while (my $candrow= $findhostsq->fetchrow_hashref()) {
$candrow->{Warnings}= [ ];
$candrow->{Reso}= "$candrow->{restype} $candrow->{resname}";
@@ -343,7 +344,7 @@ END
my $erow= $equivflagscheckq->fetchrow_hashref();
if (!$erow) {
print DEBUG "$dbg EQUIV $equiv->{FormalClass} NO-CLASSES\n";
- next;
+ next CANDIDATE;
}
my $eq= $erow->{hostflag};
print DEBUG "$dbg EQUIV $equiv->{FormalClass} MAYBE $eq\n";
@@ -358,7 +359,7 @@ END
print DEBUG "$dbg FLAGS MISSINGFLAGS: @missingflags.\n";
if (@missingflags) {
- next unless defined $use;
+ next CANDIDATE unless defined $use;
push @{ $candrow->{Warnings} },
"specified host lacks flags @missingflags";
}
--
2.5.1
next prev parent reply other threads:[~2015-09-15 16:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 16:05 [PATCH OSSTEST 0/4] Avoid running Linux on hosts for the given version lacks drivers Ian Campbell
2015-09-15 16:05 ` [PATCH OSSTEST 1/4] ts-hosts-allocate-Executive: Allow dry-run Ian Campbell
2015-09-15 17:04 ` Ian Jackson
2015-09-15 16:05 ` Ian Campbell [this message]
2015-09-15 17:04 ` [PATCH OSSTEST 2/4] ts-hosts-allocate-Executive: add a label to loop over candidates Ian Jackson
2015-09-16 8:51 ` Ian Campbell
2015-09-15 16:05 ` [PATCH OSSTEST 3/4] Add support for selecting resources based on their properties Ian Campbell
2015-09-15 17:18 ` Ian Jackson
2015-09-16 8:57 ` Ian Campbell
2015-09-15 16:05 ` [PATCH OSSTEST 4/4] make-flight: Add a minimum linux version requirement to all linux-* branches Ian Campbell
2015-09-15 17:19 ` Ian Jackson
2015-09-15 17:21 ` [PATCH OSSTEST 0/4] Avoid running Linux on hosts for the given version lacks drivers Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442333118-843-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).