[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 3/4] mg-repro-setup: Introduce `statictask' variable


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Mon, 20 May 2019 16:41:46 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@xxxxxxxxxxxxx; spf=Pass smtp.mailfrom=Ian.Jackson@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 May 2019 15:43:15 +0000
  • Ironport-sdr: 0TTEQkWmNlb99UCq+fGMOKVRwTb0AyD0JIqyyfktnyBcc3cFT6NLSGBn8cm+v1QU3bFCJVx8VQ fhrE+8W+ryL/FQd/sEy6+jQ8YIMijO8S4xriZIacALGkEujcpGWp5ZqIVtDCRAGoWtb4hvICOi g8XcTVLUCEVbrZRt1fBNm71Rd+lx9dYQ0RElvGI9V6r76PsV9k41UUBWtVan9k4f9ai+BYPxpw hD2rMIsxkGJUow1j6cjflu2vAbIYnt60NZstdnx0t0IZ8lV76iJ/zFxKxM2Z9z05aGfV6zXgb/ Cs4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We are going to make a mode where we don't set OSSTEST_TASK.  The
result is that our subprocesses will do whatever they usually do.

Those are mg-allocate (which would allocate for our static task) and
mg-execute-flight which will make a dynamic task.  We must therefore
prevent mg-allocate from running since the allocations would not be
useable for the flight execution.

No functional change yet, since nothing sets statictask=false and
therefore OSSTEST_TASK would always be set.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 mg-repro-setup | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/mg-repro-setup b/mg-repro-setup
index 5a52e617..b60389d8 100755
--- a/mg-repro-setup
+++ b/mg-repro-setup
@@ -103,6 +103,7 @@ duration=28d
 blessing=play
 skipcapture=true
 autoalloc=false
+statictask=true
 
 while true; do
        case "$1" in
@@ -117,7 +118,7 @@ while true; do
        -t?*)           duration=${arg#-t}              ;;
        --rogue)        duration=''                     ;;
        --capture)      skipcapture=false               ;;
-       --autoalloc-nofree) autoalloc=true              ;;
+       --autoalloc-nofree) autoalloc=true; statictask=true ;;
        -l*)            logfile=${arg#-l}               ;;
        -r^*|-r!*)      adjustsets+=("${arg#-r}")       ;;
        # ^ two patterns because there's no way in bash to write
@@ -258,16 +259,25 @@ if [ "x$rebuilds_flight" != x ]; then
        fi
 fi
 
-OSSTEST_TASK=$(perl -e '
-       use Osstest;
-       use Osstest::Executive;
-       csreadconfig();
-       findtask();
-       printf "%s\n", $ENV{'OSSTEST_TASK'} or die $!;
-')
-export OSSTEST_TASK
+if $statictask; then
+        OSSTEST_TASK=$(perl -e '
+               use Osstest;
+               use Osstest::Executive;
+               csreadconfig();
+               findtask();
+               printf "%s\n", $ENV{'OSSTEST_TASK'} or die $!;
+        ')
+        export OSSTEST_TASK
+fi
 
 if [ "${alloc_idents[*]}" ]; then
+        if [ x"$OSSTEST_TASK" = x ]; then
+                # We would have to make a dynamic task and hold the
+                #  fd for it in this script.  Would be quite awkward.
+                echo >&2 'cannot hand-allocate in a way that will free'
+                exit 1
+        fi
+
        progress "allocating ${alloc_idents[*]} ..."
        alloc_output=tmp/$flight.allocations
        ./mg-allocate \
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.