mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
test_infra: panic when killing with SIGKILL
Killing process with SIGKILL will miss the information since CLH process needs to end normally to export code coverage information. Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
parent
0a3ad6153a
commit
7eb70730d1
@ -809,8 +809,12 @@ pub fn kill_child(child: &mut Child) {
|
||||
}
|
||||
|
||||
// The timeout period elapsed without the child exiting
|
||||
if child.wait_timeout(Duration::new(5, 0)).unwrap().is_none() {
|
||||
if child.wait_timeout(Duration::new(10, 0)).unwrap().is_none() {
|
||||
let _ = child.kill();
|
||||
let rust_flags = env::var("RUSTFLAGS").unwrap_or_default();
|
||||
if rust_flags.contains("-Cinstrument-coverage") {
|
||||
panic!("Wait child timeout, please check the reason.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user