Skip to content

Commit 0292073

Browse files
committed
hotplug_gpu: updated since hotunplug is not supported for Nvidia GPUs
Signed-off-by: Julia Graham <[email protected]>
1 parent c799bf5 commit 0292073

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

libvirt/tests/src/gpu/hotplug_gpu.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
def run(test, params, env):
1111
"""
12-
Hotplug/unplug GPU device
12+
Hotplug GPU device
13+
Note: Hotunplug is not supported for nvidia GPUs
1314
"""
1415
vm_name = params.get("main_vm", "avocado-vt-vm1")
1516
vm = env.get_vm(vm_name)
@@ -33,24 +34,9 @@ def run(test, params, env):
3334
gpu_test.install_latest_driver(vm_session)
3435
gpu_test.nvidia_smi_check(vm_session)
3536

36-
test.log.info("TEST_STEP: Unplug a gpu device from vm")
37-
vm_hostdev = vm_xml.VMXML.new_from_dumpxml(vm.name)\
38-
.devices.by_device_tag("hostdev")[0]
39-
virsh.detach_device(vm.name, vm_hostdev.xml,
40-
wait_for_event=True, event_timeout=30,
41-
**virsh_args)
42-
gpu_test.check_gpu_dev(vm, True)
43-
44-
test.log.info("TEST_STEP: Hotplug back the gpu device")
45-
virsh.attach_device(vm.name, gpu_dev.xml, **virsh_args)
46-
gpu_test.check_gpu_dev(vm)
47-
gpu_test.nvidia_smi_check(vm_session)
48-
4937
test.log.info("TEST_STEP: Check gpu device exclusivity")
5038
res = virsh.attach_device(vm.name, gpu_dev.xml, debug=True)
5139
libvirt.check_result(res, "in use")
52-
gpu_test.check_gpu_dev(vm)
53-
gpu_test.nvidia_smi_check(vm_session)
5440
vm_session.close()
5541
finally:
5642
gpu_test.teardown_default()

0 commit comments

Comments
 (0)