MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_reaper_status

Function test_reaper_status

tests/process/procctl.rs:15–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14#[test]
15fn test_reaper_status() {
16 match set_reaper_status(false).unwrap_err() {
17 io::Errno::INVAL => (),
18 io::Errno::PERM => return, // FreeBSD 12 doesn't support this
19 err => panic!("{:?}", err),
20 };
21 set_reaper_status(true).unwrap();
22 let status_while_acq = dbg!(get_reaper_status(None).unwrap());
23 set_reaper_status(false).unwrap();
24 let status_while_rel = dbg!(get_reaper_status(None).unwrap());
25 assert!(status_while_acq.flags.contains(ReaperStatusFlags::OWNED));
26 assert!(!status_while_rel.flags.contains(ReaperStatusFlags::OWNED));
27}
28
29#[test]
30fn test_reaper_pids() {

Callers

nothing calls this directly

Calls 1

set_reaper_statusFunction · 0.85

Tested by

no test coverage detected