From 98bc0917d7d659ad75a89b17599fcf7ffeb19487 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 2 Jan 2022 22:37:35 +0100 Subject: [PATCH] run-tests: fix `vm` cmd Previously, qemu failed with error `restrict=on : Parameter 'restrict' expects 'on' or 'off'` due to the trailing space after `on`. --- test/run-tests.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index f30c5a2..e63a823 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -185,13 +185,11 @@ vm() { nix-build --out-link $TMPDIR/vm -E "((import \"$scriptDir/tests.nix\" {}).getTest \"$scenario\").vmWithoutTests" echo "VM stats: CPUs: $numCPUs, memory: $memoryMiB MiB" - extraNetOpts= - [[ $NB_TEST_ENABLE_NETWORK ]] || extraNetOpts='restrict=on' + [[ $NB_TEST_ENABLE_NETWORK ]] || export QEMU_NET_OPTS="restrict=on,$QEMU_NET_OPTS" USE_TMPDIR=1 \ NIX_DISK_IMAGE=$TMPDIR/img.qcow2 \ QEMU_OPTS="-smp $numCPUs -m $memoryMiB -nographic $QEMU_OPTS" \ - QEMU_NET_OPTS="$extraNetOpts $QEMU_NET_OPTS" \ $TMPDIR/vm/bin/run-*-vm }