KVM test: kvm_vm.py: log serial console output and allow serial login
Log serial console output to files in the debug dir.
Also, add VM.serial_login() which attempts to log in via the serial console.
Note:
- Tests must NOT close() a serial console session, because it needs to remain
open for the following tests to use.
- Instead, tests must use session.sendline("exit") for serial console sessions:
session = vm.serial_login()
try:
...
finally:
session.sendline("exit")
- Only one serial console session per VM is available at a time.
Calling serial_login() twice for the same VM, without an "exit" between the
calls, will probably fail and/or do bad stuff.
Signed-off-by: Michael Goldish <mgoldish@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4666 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed