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 <tim@hyper.sh>
This commit is contained in:
Tim Zhang 2021-02-03 21:57:47 +08:00
parent b25575b430
commit 254b98dd2f

View File

@ -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;