From 32ae87933247989fab75245f51c5b53f34d17d73 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 7 Dec 2022 02:06:30 -0600 Subject: [PATCH] Add bash -c wrapper around run-qemu.sh call. Timeout doesn't know how to exec a shell script that doesn't start with #!/bin/sh but I don't want to add that line to the script generation because I'd have to explicitly specify bash/sh/mksh. On systems with the Defective Annoying SHell the /bin/sh symlink is simply broken and should not be used, but mksh sort of works and when your current shell is bash running a script from the command line will use bash even when it's not /bin/bash but /strange/freebsd/path/to/bash instead (and no, "env is at a known path but bash isn't" still doesn't make sense). NOT specifying which shell to use fixes more than it breaks, so far... --- scripts/test_mkroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test_mkroot.sh b/scripts/test_mkroot.sh index 06f6b847..e78a1f7b 100755 --- a/scripts/test_mkroot.sh +++ b/scripts/test_mkroot.sh @@ -39,7 +39,7 @@ do # Can't point two QEMU instances at same sqf because gratuitous file locking cp "$TEST"/init.{sqf,$BASHPID} && # When stdin is a tty QEMU will SIGTTOU itself here, so &1 + toybox timeout -i 10 bash -c "./run-qemu.sh -drive format=raw,file='$TEST'/init.$BASHPID < /dev/null 2>&1" rm -f "$TEST/init.$BASHPID" cd ../.. } | tee root/build/log/$Y-test.txt | { [ -z "$V" ] && cat >/dev/null || { [ "$V" -gt 1 ] && cat || grep '^=== '; } } & -- 2.39.2