From 6929cae97a36b0196d0fa97f41bb3d0e4bea5c9a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 4 Oct 2021 17:55:48 +0100 Subject: [PATCH] mg-repro-setup: Check allocation feasibility at the start Signed-off-by: Ian Jackson --- mg-repro-setup | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) -- 2.39.5