Project

General

Profile

action #68938

Updated by okurz over 3 years ago

## Motivation 
 https://github.com/os-autoinst/os-autoinst/pull/1456 especially https://github.com/os-autoinst/os-autoinst/pull/1456/commits/dd04130e665df2cb908c6712728da7879cb79d8d and https://github.com/os-autoinst/os-autoinst/pull/1456/commits/20d11554af1cb70af99dfee70a8d35b42fba04ef showed us again that the handling of the qemu process is problematic regarding detecting early-exits or maybe exits in general. We waste time within a loop potentially even in cases when the qemu process has stopped already. We should try to reduce the waiting time in case of qemu (early-)exits. 

 ## Acceptance criteria 
 * **AC1:** There is no sleeping in case the qemu process is already stopped 

 ## Suggestions 

 * Look into https://github.com/os-autoinst/os-autoinst/blob/master/OpenQA/Qemu/Proc.pm , especially https://github.com/os-autoinst/os-autoinst/blob/master/OpenQA/Qemu/Proc.pm#L421 if we look for the qemu process to be active. Maybe we just sleep and should do `waitpid(…, W_NOHANG)` to detect early exits 
 * Use t/18-qemu-options.t (or maybe one of t/17-backend-qemu.t or t/18-qemu.t or t/14-isotovideo.t) to check if the problem actually exists or extend Improve tests accordingly 
 as well

Back