pub async fn assert_termination<F, Fut>(f: F, expected_code: i32) -> Result<()>where F: FnOnce() -> Fut, Fut: Future<Output = ()>,
Fork a child process, execute the given function in that process, and verify that the process exits with the given exit code.