Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a param to force use serial session in case of failure #1961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shared/cfg/base.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ q35, arm64-pci, arm64-mmio:
serials = "serial0"
serial_type = "isa-serial"

# Enable this to "yes" if you want to force wait_for_login
# to give serial session incase of failure
force_use_serial_login = "no"

# Emulated machine type, run following command to see supported machine type.
# qemu-kvm -M ?
# machine_type = pc
Expand Down
2 changes: 2 additions & 0 deletions virttest/virt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,8 @@ def print_guest_network_info():
session.close()

error = None
if not serial:
serial = self.params.get("force_use_serial_login", "no") == "yes"
logging.debug("Attempting to log into '%s' (timeout %ds)",
self.name, timeout)
start_time = time.time()
Expand Down