Skip to content

Commit

Permalink
Merge pull request #5894 from yafu-1/hotunpulg_disks_discard_no_unref
Browse files Browse the repository at this point in the history
Wait for hotunplug event to ensure device removed successfully
  • Loading branch information
Yingshun committed Sep 19, 2024
2 parents 61f19e9 + 111c03a commit 59792ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def run_test_hotplug_disk(vm, params, test):
test.log.debug("STEP4: check the result.")
check_result(vm, params, test)
test.log.debug("STEP5: detach disk.")
virsh.detach_device(vm_name, disk_xml.xml, debug=True, ignore_status=False)
virsh.detach_device(vm_name, disk_xml.xml, debug=True,
wait_for_event=True, ignore_status=False)
domblklist_result = virsh.domblklist(vm_name, debug=True).stdout_text.strip()
if target_dev in domblklist_result:
test.fail("The target disk % can't be detached in guest." % target_dev)
Expand Down

0 comments on commit 59792ec

Please sign in to comment.