Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit fee1f7c

Browse files
committed
Ensure all PCI addresses are within range to avoid libvirt validation errors
1 parent 677ece5 commit fee1f7c

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/xmlparse-xml/change-hostdevs-in.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</hostdev>
3535
<hostdev mode="subsystem" type="pci" managed="yes">
3636
<source>
37-
<address domain="0x0" bus="0x11" slot="0x22" function="0x33"/>
37+
<address domain="0x0" bus="0x1" slot="0x2" function="0x3"/>
3838
</source>
3939
</hostdev>
4040
</devices>

tests/xmlparse-xml/change-hostdevs-out.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</hostdev>
3636
<hostdev mode="capabilities" type="pci" managed="yes">
3737
<source>
38-
<address domain="0x2" bus="0x99" slot="0x88" function="0x77"/>
38+
<address domain="0x4" bus="0x5" slot="0x6" function="0x7"/>
3939
</source>
4040
</hostdev>
4141
</devices>

tests/xmlparse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,10 @@ def testAlterHostdevs(self):
550550
check("type", "pci")
551551
check("managed", True, True)
552552
check("mode", "subsystem", "capabilities")
553-
check("domain", "0x0", "0x2")
554-
check("bus", "0x11", "0x99")
555-
check("slot", "0x22", "0x88")
556-
check("function", "0x33", "0x77")
553+
check("domain", "0x0", "0x4")
554+
check("bus", "0x1", "0x5")
555+
check("slot", "0x2", "0x6")
556+
check("function", "0x3", "0x7")
557557

558558
self._alter_compare(guest.get_config_xml(), outfile)
559559

0 commit comments

Comments
 (0)