test: don't use `-cpu max` in GH Actions
There appears to be an issue with newer QEMU versions (spotted with Arch Linux and C9S containers) which causes the respective GH Action to hang when booting a QEMU VM in combination with the `-cpu max` parameter. During (a particularly painful) debugging session I once managed to get some output from such "frozen" machine (using `earlycon` and `earlyprintk` kernel cmdline options), and in that particular case the VM died with a trap caused by an invalid opcode. I couldn't reproduce this locally, only in GH Actions environment with Arch Linux and C9S containers. Also, so far I haven't found out which specific CPUID flag causes this, but using the `IvyBridge-v2` feature set seems to mitigate the issue.master
parent
5c2f72f152
commit
3f56d481e8
|
@ -3,13 +3,14 @@
|
||||||
# We prefer kvm, kqemu, userspace in that order.
|
# We prefer kvm, kqemu, userspace in that order.
|
||||||
|
|
||||||
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
QEMU_CPU="${QEMU_CPU:-max}"
|
||||||
|
|
||||||
[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS=(-cpu max)
|
[[ -x /usr/bin/qemu ]] && BIN=/usr/bin/qemu && ARGS=(-cpu "$QEMU_CPU")
|
||||||
(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS=(-kernel-kqemu -cpu host)
|
(lsmod | grep -q '^kqemu ') && BIN=/usr/bin/qemu && ARGS=(-kernel-kqemu -cpu host)
|
||||||
[[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS=(-cpu host)
|
[[ -c /dev/kvm && -x /usr/bin/kvm ]] && BIN=/usr/bin/kvm && ARGS=(-cpu host)
|
||||||
[[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS=(-cpu host)
|
[[ -c /dev/kvm && -x /usr/bin/qemu-kvm ]] && BIN=/usr/bin/qemu-kvm && ARGS=(-cpu host)
|
||||||
[[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS=(-cpu host)
|
[[ -c /dev/kvm && -x /usr/libexec/qemu-kvm ]] && BIN=/usr/libexec/qemu-kvm && ARGS=(-cpu host)
|
||||||
[[ -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-cpu max)
|
[[ -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-cpu "$QEMU_CPU")
|
||||||
[[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-enable-kvm -cpu host)
|
[[ -c /dev/kvm && -x /usr/bin/qemu-system-$(uname -m) ]] && BIN=/usr/bin/qemu-system-$(uname -m) && ARGS=(-enable-kvm -cpu host)
|
||||||
|
|
||||||
[[ $BIN ]] || {
|
[[ $BIN ]] || {
|
||||||
|
|
|
@ -41,6 +41,7 @@ else
|
||||||
cd /lib/modules
|
cd /lib/modules
|
||||||
ls -1 | tail -1
|
ls -1 | tail -1
|
||||||
)" \
|
)" \
|
||||||
|
QEMU_CPU="IvyBridge-v2" \
|
||||||
DRACUT_NO_XATTR=1 \
|
DRACUT_NO_XATTR=1 \
|
||||||
TEST_RUN_ID="$RUN_ID" \
|
TEST_RUN_ID="$RUN_ID" \
|
||||||
${TESTS:+TESTS="$TESTS"} \
|
${TESTS:+TESTS="$TESTS"} \
|
||||||
|
|
Loading…
Reference in New Issue