Skip to content

Commit

Permalink
workaround VM first start failure due to swtpm
Browse files Browse the repository at this point in the history
Signed-off-by: chunfuwen <[email protected]>
  • Loading branch information
chunfuwen committed Oct 22, 2024
1 parent e92e761 commit 1a84f58
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libvirt/tests/src/virtual_device/tpm_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,12 @@ def check_swtpmpidfile(vm_name, test_stage):
logging.debug("Expected failure: %s", detail)
return
else:
test.fail(detail)
# workaround VM first start failure due to swtpm
swtpm_error_msg = "internal error: Could not run '/usr/bin/swtpm_setup'"
if re.search(r'%s' % swtpm_error_msg, str(detail)):
vm.start()
else:
test.fail(detail)
if undefine_flag:
time.sleep(5)
vm.destroy()
Expand Down

0 comments on commit 1a84f58

Please sign in to comment.