From: Ian Jackson Date: Mon, 4 Oct 2021 16:55:48 +0000 (+0100) Subject: mg-repro-setup: Check allocation feasibility at the start X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6929cae97a36b0196d0fa97f41bb3d0e4bea5c9a;p=osstest.git mg-repro-setup: Check allocation feasibility at the start Signed-off-by: Ian Jackson --- diff --git a/mg-repro-setup b/mg-repro-setup index 56d27d4..895f299 100755 --- a/mg-repro-setup +++ b/mg-repro-setup @@ -260,6 +260,17 @@ if [ "${alloc_idents[*]}" ]; then echo >&2 'cannot hand-allocate in a way that will free' exit 1 fi + + set +e + alloc_output=$( + ./mg-allocate --dry-run $duration "${alloc_specs[@]}" 2>&1 + ) + alloc_rc=$? + set -e + test $alloc_rc = 0 || + fail "requested allocation(s) infeasible: +$alloc_output +" fi flight=$(./cs-adjust-flight new:$blessing)