From 254b98dd2f1b03605c820a9a6a363b894be1cad8 Mon Sep 17 00:00:00 2001 From: Tim Zhang Date: Wed, 3 Feb 2021 21:57:47 +0800 Subject: [PATCH] rustjail: fix unit test test_process test_process has a assertion that waitpid(-1) will fail because there is no child process in most cases. But if there is any child process forked by other unit test, the test test_process will fail. Because waitpid(-1) will wait for any child process including the process created by other unit tests. Signed-off-by: Tim Zhang --- src/agent/rustjail/src/process.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/agent/rustjail/src/process.rs b/src/agent/rustjail/src/process.rs index 56ed1c0417..fb1f4d7c1d 100644 --- a/src/agent/rustjail/src/process.rs +++ b/src/agent/rustjail/src/process.rs @@ -253,7 +253,6 @@ mod tests { // -1 by default assert_eq!(process.pid, -1); - assert!(process.wait().is_err()); // signal to every process in the process // group of the calling process. process.pid = 0;