[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v2 4/5] Osstest::Executive: Export get_plan
To retrieve the current plan from the queue daemon. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Osstest/Executive.pm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index ecd38c3..f29f778 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -48,7 +48,7 @@ BEGIN { findtask @all_lock_tables report_run_getinfo report_altcolour report_blessingscond report_find_push_age_info - tcpconnect_queuedaemon plan_search + tcpconnect_queuedaemon get_plan plan_search alloc_resources alloc_resources_rollback_begin_work resource_check_allocated resource_shared_mark_ready duration_estimator @@ -477,6 +477,18 @@ sub tcpconnect_queuedaemon () { return $qserv; } +sub get_plan ($) { + my ($qserv) = @_; + + print $qserv "get-plan\n" or die $!; + $_= <$qserv>; defined && m/^OK get-plan (\d+)\s/ or die "$_ ?"; + + my $jplanlen= $1; + my $jplan; + read($qserv, $jplan, $jplanlen) == $jplanlen or die $!; + return $jplan; +} + sub plan_search ($$$$) { my ($plan, $dbgprint, $duration, $requestlist) = @_; # @@ -674,12 +686,7 @@ sub alloc_resources { db_retry($flight,'running', $dbh_tests, \@all_lock_tables, [ sub { - print $qserv "get-plan\n" or die $!; - $_= <$qserv>; defined && m/^OK get-plan (\d+)\s/ or die "$_ ?"; - - my $jplanlen= $1; - my $jplan; - read($qserv, $jplan, $jplanlen) == $jplanlen or die $!; + my $jplan = get_plan($qserv); my $jplanprint= $jplan; chomp $jplanprint; logm("resource allocation: obtained base plan."); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |