Repeat the process tree walk and spare processes started by signal handlers
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn proc_children_check_accepts_existing_file() {
|
||||
assert!(check_proc_children(Path::new(PROC_CHILDREN)).is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn proc_children_check_rejects_missing_file() {
|
||||
let result = check_proc_children(Path::new("/proc/thread-self/no-such-file"));
|
||||
assert!(matches!(result, Err(SandboxError::ProcChildrenMissing)));
|
||||
}
|
||||
Reference in New Issue
Block a user