39 lines
1.8 KiB
Diff
39 lines
1.8 KiB
Diff
|
|
From e72471b34c285b6eb70860be23a87dfaea928280 Mon Sep 17 00:00:00 2001
|
||
|
|
From: zhouli57 <zhouli57@huawei.com>
|
||
|
|
Date: Thu, 6 Jan 2022 15:27:59 +0800
|
||
|
|
Subject: [PATCH 04/10] tests: fix the test_standvm_quickstart
|
||
|
|
|
||
|
|
Currently, device IDs are used to distinguish devices in snapshot.
|
||
|
|
Therefore, ensure that IDs before and after shapshot are consistent.
|
||
|
|
|
||
|
|
Signed-off-by: zhouli57 <zhouli57@huawei.com>
|
||
|
|
---
|
||
|
|
tests/hydropper/virt/standvm.py | 8 ++++----
|
||
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/tests/hydropper/virt/standvm.py b/tests/hydropper/virt/standvm.py
|
||
|
|
index 5208ddd..ae6cc43 100644
|
||
|
|
--- a/tests/hydropper/virt/standvm.py
|
||
|
|
+++ b/tests/hydropper/virt/standvm.py
|
||
|
|
@@ -205,13 +205,13 @@ class StandVM(BaseVM):
|
||
|
|
# only one device is supported(pcie root port)
|
||
|
|
if self.pcie_root_port_remain <= 0:
|
||
|
|
raise PcierootportError
|
||
|
|
- _temp_device_args = "virtio-net-pci,netdev=%s,id=%s,bus=pcie.%s,addr=0x0"\
|
||
|
|
- % (tapname, tapname, self.pcie_root_port_remain + 4)
|
||
|
|
+ _temp_device_args = "virtio-net-pci,netdev=%s,id=net-%s,bus=pcie.%s,addr=0x0"\
|
||
|
|
+ % (tapname, i, self.pcie_root_port_remain + 4)
|
||
|
|
self.pcie_root_port_remain -= 1
|
||
|
|
self.pcie_root_port["net"] = False
|
||
|
|
else:
|
||
|
|
- _temp_device_args = "virtio-net-pci,netdev=%s,id=%s,bus=pcie.0,addr=%s.0x0"\
|
||
|
|
- % (tapname, tapname, hex(i))
|
||
|
|
+ _temp_device_args = "virtio-net-pci,netdev=%s,id=net-%s,bus=pcie.0,addr=%s.0x0"\
|
||
|
|
+ % (tapname, i, hex(i))
|
||
|
|
if self.multifunction["net"]:
|
||
|
|
_temp_device_args += ",multifunction=on"
|
||
|
|
if self.net_iothread:
|
||
|
|
--
|
||
|
|
2.25.1
|
||
|
|
|