Skip to content

Commit

Permalink
test: Debian 11 does not support target.hotplug either
Browse files Browse the repository at this point in the history
This was previously shadowed because the test got skipped on known issue
cockpit-project/bots#1543

Add an explicit failure check to remind us to change this once
debian-stable moves to Debian 12.
  • Loading branch information
martinpitt committed May 15, 2023
1 parent 3a0391d commit d818ebd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/check-machines-settings
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,15 @@ class TestMachinesSettings(VirtualMachinesCase):
# Check rebooting machine will not unexpectedly affect watchdog configuration
setWatchdogActionLive(action="poweroff", reboot_machine=True)

# Older libvirt in rhel-8-9 and centos-8-stream doesn't support target.hotplug=off
if not m.image.startswith("rhel-8") and m.image != "centos-8-stream":
m.execute("virsh destroy subVmTest1")

# Some OSes don't support target.hotplug=off
if m.image.startswith("rhel-8") or m.image in ["centos-8-stream", "debian-stable"]:
self.assertIn("Unknown --controller options", m.execute(
"! virt-xml subVmTest1 --edit model=pci-root --controller target.hotplug=off 2>&1")
)
else:
# Disable hotplugging for subVmTest1
m.execute("virsh destroy subVmTest1")
m.execute("virt-xml subVmTest1 --edit model=pci-root --controller target.hotplug=off")
# Cleanup watchdog configuration
m.execute("virt-xml subVmTest1 --remove-device --watchdog 1")
Expand Down

0 comments on commit d818ebd

Please sign in to comment.