Skip to content

Commit 666d514

Browse files
committed
Support testing vsock driver in installer related test cases
1.repaire virtio-win drivers via installer. 2.uninstall virtio-win drivers via installer. 3.Check viosock device works well if driver installed via installer. 4.Upgrade virtio-win drivers via installer from the old driver version. 5.Upgrade virtio-win drivers via installer from the previous installer version. ID:4312,4877,4878,4879,4883 Signed-off-by: Leidong Wang <leidwang@redhat.com>
1 parent 89b4300 commit 666d514

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

provider/win_driver_installer_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"vioinput",
2929
"fwcfg",
3030
"viomem",
31+
"viosock",
3132
]
3233

3334
device_hwid_list = [
@@ -42,6 +43,7 @@
4243
'"PCI\\VEN_1AF4&DEV_1052"',
4344
'"ACPI\\VEN_QEMU&DEV_0002"',
4445
r'"PCI\VEN_1AF4&DEV_1002" "PCI\VEN_1AF4&DEV_1058"',
46+
r'"PCI\VEN_1AF4&DEV_1053" "PCI\VEN_1AF4&DEV_1012"',
4547
]
4648

4749
device_name_list = [
@@ -449,3 +451,14 @@ def viomem_test(test, params, vm):
449451
virtio_mem_utils.check_memory_devices(
450452
device_id, requested_size, threshold, vm, test
451453
)
454+
455+
456+
def viosock_test(test, params, vm):
457+
"""
458+
Connect VM via vsock bridge service
459+
460+
:param test: kvm test object.
461+
:param params: the dict used for parameters.
462+
:param vm: vm object.
463+
"""
464+
# TODO

qemu/tests/cfg/win_virtio_driver_install_by_installer.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
driver_test_name_balloon = "balloon"
114114
iozone_cmd_opitons = " -azR -r 64k -n 512M -g 1G -M -I -i 0 -i 1 -b iozone.xls -f %s:\testfile"
115115
read_rng_cmd = "WIN_UTILS:\\random_%PROCESSOR_ARCHITECTURE%.exe"
116+
vsocks = vhost_vsock0
116117
x86_64:
117118
# virtio-mem is not supported on 32-bit systems
118119
# and viomem is supported from 1.9.40-0
@@ -265,6 +266,16 @@
265266
device_name = "VirtIO Viomem Driver"
266267
device_hwid = '"PCI\VEN_1AF4&DEV_1002" "PCI\VEN_1AF4&DEV_1058"'
267268
driver_test_names = 'viomem'
269+
- with_viosock:
270+
no Host_RHEL.m6 Host_RHEL.m7 Host_RHEL.m8
271+
#TODO
272+
required_virtio_win = [1.9.51.0, )
273+
vsocks = vhost_vsock0
274+
driver_name = viosock
275+
device_name = VirtIO Socket Driver
276+
device_hwid = '"PCI\VEN_1AF4&DEV_1053" "PCI\VEN_1AF4&DEV_1012"'
277+
driver_test_names = ${driver_name}
278+
268279
variants:
269280
- installer_version_check:
270281
only all_drivers

qemu/tests/win_virtio_driver_installer_uninstall.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ def run(test, params, env):
9696
if params.get("boot_with_viomem", "no") == "no":
9797
no_need_uninstall_dev_list.append("VirtIO Viomem Driver")
9898

99+
if params.get("boot_with_viosock", "no") == "no":
100+
no_need_uninstall_dev_list.append("VirtIO Socket Driver")
101+
99102
need_uninstall_dev_list = [
100103
item for item in device_name_list if item not in no_need_uninstall_dev_list
101104
]

qemu/tests/win_virtio_driver_update_by_installer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ def check_network_config(session_serial):
123123
if params.get("boot_with_viomem", "no") == "no":
124124
if driver_name == "viomem":
125125
continue
126+
if params.get("boot_with_viosock", "no") == "no":
127+
if driver_name == "viosock":
128+
continue
126129
win_driver_utils.install_driver_by_virtio_media(
127130
session, test, devcon_path, media_type, driver_name, device_hwid
128131
)

0 commit comments

Comments
 (0)