]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
host allocation: Support new reuse-* magic hostflag
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 30 Oct 2017 16:33:50 +0000 (16:33 +0000)
committerIan Jackson <iwj@xenproject.org>
Fri, 2 Oct 2020 15:49:13 +0000 (16:49 +0100)
This is like share-* except it has different MaxTasks and MaxWear
parameters.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
README.planner
ts-hosts-allocate-Executive

index f134d716b8491d974891e04d5e6431a90beb016e..a9275f12e21bd16915bc516eaa6f5c9b3c1777ec 100644 (file)
@@ -230,6 +230,13 @@ hostflag:
     identically.  The osstest test harness revision is automatically
     appended and therefore does not need to be included.
 
+  reuse-SHARING
+
+    The host may be reused, one job after another.  Like share- but
+    only permits one job at a time, and has a much higher limit for
+    the number of successive jobs.  ts-host-test-share should be used
+    to arrange for the host's state to be recorded appropriately.
+
   equiv-FORMALTOKEN
 
     For each equiv-FORMALTOKEN job flag set on one or more IDENTs, a
index 2c18a739f54013489778108bfcf6a7dc60e35056..6fcfd2e34e1b8f934d64d380bc94f4d785a81120 100755 (executable)
@@ -279,6 +279,16 @@ sub compute_hids () {
                     " $hid->{DefaultSharedMaxTasks}".
                     " $hid->{DefaultSharedMaxWear}\n";
                 next;
+            } elsif ($flag =~ m/^reuse-/) {
+                die if exists $hid->{Shared};
+                my $shr= $'; #'
+                $hid->{Shared}= $shr." ".get_harness_rev();
+                $hid->{SharedMaxTasks}= 1;
+               $hid->{SharedMaxWear}= 10;
+                print DEBUG "HID $ident FLAG $flag SHARE-REUSE $shr".
+                    " $hid->{SharedMaxTasks}".
+                    " $hid->{SharedMaxWear}\n";
+                next;
             } elsif ($flag =~ m/^equiv-/) {
                 my $formalclass= $'; #'
                 die if exists $hid->{Equiv};
@@ -484,6 +494,11 @@ END
         foreach my $kcomb (qw(Shared-Max-Wear Shared-Max-Tasks)) {
             my $kdb= $kcomb;  $kdb =~ y/-A-Z/ a-z/;
             my $khash= $kcomb;  $khash =~ y/-//d;
+           if ($hid->{$khash}) {
+               $candrow->{$khash} = $hid->{$khash};
+                print DEBUG "$dbg $khash FROM-HID\n";
+               next;
+           }
             $resprop_q->execute($candrow->{restype},$candrow->{resname},$kdb);
             my $proprow= $resprop_q->fetchrow_hashref();
             my $val= $proprow->{val};