Using double quotes in f-strings only works from python 3.12 onwards.
Use single quotes to make sure python 3.9 works as well.
Also clean up quotes a little in general.
config = json.load(sys.stdin)
-qemu = f"qemu-system-{os.environ["QEMU_ARCHITECTURE"]}"
-result = subprocess.run([qemu, '-device', 'help'], check=True, text=True, stdout=subprocess.PIPE)
+qemu = 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)
exit(77)
config = json.load(sys.stdin)
-qemu = f"qemu-system-{os.environ["QEMU_ARCHITECTURE"]}"
-result = subprocess.run([qemu, '-device', 'help'], check=True, text=True, stdout=subprocess.PIPE)
+qemu = 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)
exit(77)
config = json.load(sys.stdin)
-qemu = f"qemu-system-{os.environ["QEMU_ARCHITECTURE"]}"
-result = subprocess.run([qemu, '-device', 'help'], check=True, text=True, stdout=subprocess.PIPE)
+qemu = 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)
exit(77)