]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: fix check for unset BIN
authorBenjamin Drung <benjamin.drung@canonical.com>
Tue, 14 Oct 2025 16:03:05 +0000 (18:03 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 28 Oct 2025 23:57:18 +0000 (19:57 -0400)
`test/run-qemu` uses `set -u` and therefore will fail with:

```
test/run-qemu: line 57: BIN: unbound variable
```

test/run-qemu

index c12f72820374b13d1e0da9854acc148747575a67..7e95816cd7b678c239a690cd6de5b0ffb1ce6ac8 100755 (executable)
@@ -54,7 +54,7 @@ set_vmlinux_env() {
 [[ -x "/usr/bin/qemu-system-${ARCH}" ]] && BIN="/usr/bin/qemu-system-${ARCH}" && ARGS=(-cpu "$QEMU_CPU")
 [[ -z ${NO_KVM-} && -c /dev/kvm && -x "/usr/bin/qemu-system-${ARCH}" ]] && BIN="/usr/bin/qemu-system-${ARCH}" && ARGS=(-enable-kvm -cpu host)
 
-[[ $BIN ]] || {
+[[ ${BIN-} ]] || {
     echo "Could not find a working KVM or QEMU to test with!" >&2
     echo "Please install kvm or qemu." >&2
     exit 1