]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
host allocation: Avoid starving out failing tests
authorIan Jackson <iwj@xenproject.org>
Mon, 7 Jun 2021 14:25:24 +0000 (15:25 +0100)
committerIan Jackson <iwj@xenproject.org>
Mon, 7 Jun 2021 15:14:47 +0000 (16:14 +0100)
This can result in bad pushes.  Better to wait.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
ts-hosts-allocate-Executive

index 849bc97b37e8e4154bf0bfee0cb63a75080f6880..4dfcd0cd1a2fd1e7fb3c6a3fa7474fcd70a25bca 100755 (executable)
@@ -704,6 +704,7 @@ sub hid_recurse ($$) {
            Selections => [ map { $_->{Selected} } @hids ],
            Start => $start_time,
            Duration => $duration,
+           PrevFail => ($previously_failed || $previously_failed_equiv),
        };
     }
 }
@@ -951,7 +952,11 @@ sub attempt_allocation {
            }
            $starvation_q->finish();
            if ($all_starving) {
-               return $alloc_starved_r;
+               if (!$best->{PrevFail}) {
+                   return $alloc_starved_r;
+               } else {
+                   logm "starving, but previously failed, so continue...";
+               }
            }
        }
     }