Skip to content

Introducing kvm_subprocess

Michael Goldish kvm 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Add new module kvm_subprocessclient/tests/kvm/kvm_subprocess.py+870 -00 replies
2/5Modify kvm_vm and kvm_preprocessing to use the new kvm_subprocess moduleclient/tests/kvm/kvm_preprocessing.py client/tests/kvm/kvm_vm.py+44 -760 replies
3/5Modify remote_login and remote_scp in kvm_utils to use kvm_subprocessclient/tests/kvm/kvm_utils.py+8 -50 replies
4/5Modify run_autotest() in kvm_tests.py to use the new kvm_subprocess module.client/tests/kvm/kvm_tests.py+5 -40 replies
5/5Remove kvm_spawn and run_bg() from kvm_utils.py.client/tests/kvm/kvm_utils.py+2 -4750 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [KVM-AUTOTEST PATCH 0/5] Introducing kvm_subprocess

The following patches replace the run_bg() function and the kvm_spawn class with kvm_subprocess. The new module is intended to solve a problem with run_bg() (which loses track of the child process when the parent process exits) and allows for more flexibility in handling SSH/Telnet sessions (allows reusing sessions started in previous tests).

kvm_subprocess defines a class 'kvm_spawn' and two functions: run_bg() and run_fg(). Its main job is to run a process in the background and allow the user to control it interactively and/or monitor its output on the fly. Its most important feature in the context of KVM tests is that it allows to control child processes left behind by processes that no longer exist. This means that if QEMU is started by the 'boot' test, its output will be logged in the following 'reboot' test as well.

See kvm_spawn's docstring for more details.