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

[Xen-devel] [OSSTEST PATCH v2 5/8] mg-repro-setup: Introduce `statictask' variable


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 21 Jun 2019 15:22:55 +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@xxxxxxxxxxxxxxx
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 21 Jun 2019 14:25:04 +0000
  • Ironport-sdr: qP7B1voH7vkL957cfszKMdxg/ZH1qG/xcEBpek+G2LbZrVQIZRJ6c+BLcYmIlLvEMTB5znD0Sw rOhsg2TMon8gTZM95Nx6MRxiz5iTI8dCFRZ0G8Y0vWMO/u6vRAlk0Hs/AihfJI5TDq1Tf6km49 OY37jP/SrsUSca3kt3N7/NxwGxbE7xva1BwLxT69ybOGhw8D4lyPzrdScuC7DCJngcN71XkQhc S12B2Lt7Dihk4i5QbF/7VwlRLXJE+u8hfBdrYCG1XXNveK14Wze8HOkR5hd4ckcx9xgNX7VtIf 7M4=
  • 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 9a81c565..45c56f6a 100755
--- a/mg-repro-setup
+++ b/mg-repro-setup
@@ -102,6 +102,7 @@ duration=28d
 blessing=play
 skipcapture=true
 autoalloc=false
+statictask=true
 
 while true; do
        case "$1" in
@@ -116,7 +117,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
@@ -257,16 +258,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®.