]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Look for qemu in /usr/libexec/qemu-kvm as well
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 21 Jan 2025 11:29:56 +0000 (12:29 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 21 Jan 2025 11:29:56 +0000 (12:29 +0100)
On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.

test/TEST-64-UDEV-STORAGE/nvme_basic.configure
test/TEST-64-UDEV-STORAGE/nvme_subsystem.configure
test/TEST-64-UDEV-STORAGE/virtio_scsi_identically_named_partitions.configure

index 948003e4dee7633cc0542b3e77c0b740b292accf..ed8304d804355a5fe993d2fe090af0d1e038704f 100755 (executable)
@@ -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)
index 029d4360ba95fd2e198e214fbbedfd385f30d51f..ed8b39ac5ff94171abeb2ef72dfa3c4caed1d198 100755 (executable)
@@ -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)
index dce6b1503ffabb26387adfe97f98dcc06df54ef4..5ffade58005b464d967f94ce9aa163fd879596bb 100755 (executable)
@@ -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)