From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 07/13] Planner: ms-planner support -w option Date: Wed, 2 Sep 2015 16:45:13 +0100 Message-ID: <1441208719-31336-8-git-send-email-ian.jackson@eu.citrix.com> References: <1441208719-31336-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 1ZXAEw-0000a6-QY for xen-devel@lists.xenproject.org; Wed, 02 Sep 2015 15:46:22 +0000 In-Reply-To: <1441208719-31336-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 We are going to introduce multiple concurrent streams of planning processing, called `walkers' in ms-queuedaemon. The work-in-progress plan is stored, server-side, during planning, in data-plan.pl. But we need to have more than one of these. Update ms-planner and ms-planner-debug to honour a -w option, to specify a replacement for the word `plan' in `data-plan.pl'. No overall functional change, since nothing uses these options yet. Signed-off-by: Ian Jackson --- ms-planner | 6 +++++- ms-planner-debug | 13 ++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ms-planner b/ms-planner index 1dd01a9..f2070b0 100755 --- a/ms-planner +++ b/ms-planner @@ -33,12 +33,16 @@ use Osstest::Executive; open DEBUG, ">/dev/null" or die $!; +our $walker = 'plan'; + while (@ARGV and $ARGV[0] =~ m/^-/) { $_= shift @ARGV; last if m/^--$/; while (m/^-./) { if (s/^-D/-/) { open DEBUG, ">&STDERR" or die $!; + } elsif (s/^-w(.+)/-/) { + $walker = $1; } else { die "$_ ?"; } @@ -49,7 +53,7 @@ csreadconfig(); our ($plan); -my $fn= "data-plan.pl"; +my $fn= "data-$walker.pl"; sub allocations ($$) { my ($init, $each) = @_; diff --git a/ms-planner-debug b/ms-planner-debug index e277ca6..eac5675 100755 --- a/ms-planner-debug +++ b/ms-planner-debug @@ -25,7 +25,14 @@ use Osstest; csreadconfig(); -my $f= sprintf "data-plan-debug-%s.txt", time; +my $walker = 'plan'; + +if (@ARGV && $ARGV[0] =~ m/^-w(.+)$/) { + $walker = $1; + shift @ARGV; +} + +my $f= sprintf "data-$walker-debug-%s.txt", time; printf "%s\n", $f; @@ -42,9 +49,9 @@ foreach my $arg (@ARGV) { } } -print "==========data-plan.pl==========\n"; +print "==========data-$walker.pl==========\n"; -system 'cat data-plan.pl 2>&1'; +system 'cat data-$walker.pl 2>&1'; print "==========resources==========\n"; -- 1.7.10.4