From: Daan De Meyer Date: Tue, 21 Jan 2025 11:29:56 +0000 (+0100) Subject: test: Look for qemu in /usr/libexec/qemu-kvm as well X-Git-Tag: v258-rc1~1540^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34da8dd345935d461a62db5787cfbc35e8be2b4b;p=thirdparty%2Fsystemd.git test: Look for qemu in /usr/libexec/qemu-kvm as well On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use that if it's available. --- diff --git a/test/TEST-64-UDEV-STORAGE/nvme_basic.configure b/test/TEST-64-UDEV-STORAGE/nvme_basic.configure index 948003e4dee..ed8304d8043 100755 --- a/test/TEST-64-UDEV-STORAGE/nvme_basic.configure +++ b/test/TEST-64-UDEV-STORAGE/nvme_basic.configure @@ -3,13 +3,14 @@ import json import os +import shutil import subprocess import sys config = json.load(sys.stdin) -qemu = f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" +qemu = shutil.which("/usr/libexec/qemu-kvm") or f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" result = subprocess.run([qemu, "-device", "help"], check=True, text=True, stdout=subprocess.PIPE) if 'name "nvme"' not in result.stdout: print("nvme device driver is not available, skipping test...", file=sys.stderr) diff --git a/test/TEST-64-UDEV-STORAGE/nvme_subsystem.configure b/test/TEST-64-UDEV-STORAGE/nvme_subsystem.configure index 029d4360ba9..ed8b39ac5ff 100755 --- a/test/TEST-64-UDEV-STORAGE/nvme_subsystem.configure +++ b/test/TEST-64-UDEV-STORAGE/nvme_subsystem.configure @@ -3,13 +3,14 @@ import json import os +import shutil import subprocess import sys config = json.load(sys.stdin) -qemu = f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" +qemu = shutil.which("/usr/libexec/qemu-kvm") or f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" result = subprocess.run([qemu, "-device", "help"], check=True, text=True, stdout=subprocess.PIPE) if 'name "nvme"' not in result.stdout: print("nvme device driver is not available, skipping test...", file=sys.stderr) diff --git a/test/TEST-64-UDEV-STORAGE/virtio_scsi_identically_named_partitions.configure b/test/TEST-64-UDEV-STORAGE/virtio_scsi_identically_named_partitions.configure index dce6b1503ff..5ffade58005 100755 --- a/test/TEST-64-UDEV-STORAGE/virtio_scsi_identically_named_partitions.configure +++ b/test/TEST-64-UDEV-STORAGE/virtio_scsi_identically_named_partitions.configure @@ -3,13 +3,14 @@ import json import os +import shutil import subprocess import sys config = json.load(sys.stdin) -qemu = f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" +qemu = shutil.which("/usr/libexec/qemu-kvm") or f"qemu-system-{os.environ['QEMU_ARCHITECTURE']}" result = subprocess.run([qemu, "-device", "help"], check=True, text=True, stdout=subprocess.PIPE) if 'name "virtio-scsi-pci"' not in result.stdout: print("virtio-scsi-pci device driver is not available, skipping test...", file=sys.stderr)