mirror of
https://github.com/systemd/systemd
synced 2024-10-01 13:55:20 +00:00
cd57920fbf
This feature has been deprecated since QEMU 5.0 and finally removed in
QEMU 9.1 [0] which now causes issues when running the storage tests on
latest Arch:
------ testcase_long_sysfs_path: BEGIN ------
...
qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,bus=pci_bridge25: Property 'virtio-blk-pci.scsi' not found
E: qemu failed with exit code 1
[0] a271b8d7b2
32 lines
885 B
Python
Executable file
32 lines
885 B
Python
Executable file
#!/usr/bin/python3
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
import json
|
|
import sys
|
|
|
|
|
|
config = json.load(sys.stdin)
|
|
|
|
config["QemuDrives"] += [
|
|
{
|
|
"Id": "drive0",
|
|
"Size": "64M",
|
|
"Options": "cache=unsafe",
|
|
}
|
|
]
|
|
config["QemuArgs"] += ["-device", "pci-bridge,id=pci_bridge0,chassis_nr=64"]
|
|
|
|
# Create 25 additional PCI bridges, each one connected to the previous one
|
|
# (basically a really long extension cable), and attach a virtio drive to
|
|
# the last one. This should force udev into attempting to create a device
|
|
# unit with a _really_ long name.
|
|
for bridge in range(1, 26):
|
|
config["QemuArgs"] += [
|
|
"-device",
|
|
f"pci-bridge,id=pci_bridge{bridge},bus=pci_bridge{bridge - 1},chassis_nr={64 + bridge},addr=1",
|
|
]
|
|
|
|
config["QemuArgs"] += ["-device", f"virtio-blk-pci,drive=drive0,bus=pci_bridge25,addr=1"]
|
|
|
|
json.dump(config, sys.stdout)
|