Skip to content

Commit

Permalink
virttest.virt_vm: Use serial console to check dmesg when no nics
Browse files Browse the repository at this point in the history
Sometimes machines under testing are without network card, which leads
to crash during postprocess (and uncleaned VMs). Let's use serial
console (which is hopefully available) in such scenario.

Signed-off-by: Lukáš Doktor <[email protected]>
  • Loading branch information
ldoktor committed Oct 18, 2017
1 parent 512fc96 commit af804a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion virttest/virt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,10 @@ def verify_dmesg(self, dmesg_log_file=None):
"""
Verify guest dmesg
"""
session = self.wait_for_login()
if len(self.virtnet) > 0:
session = self.wait_for_login()
else:
session = self.wait_for_serial_login()
level = self.params.get("guest_dmesg_level", 3)
ignore_result = self.params.get("guest_dmesg_ignore", "no") == "yes"
utils_misc.verify_dmesg(dmesg_log_file=dmesg_log_file,
Expand Down

0 comments on commit af804a5

Please sign in to comment.