mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 02:56:18 +00:00
Merge pull request #4715 from Tim-Zhang/fix-ut-test_do_write_stream
agent: fix fd-double-close problem in ut test_do_write_stream
This commit is contained in:
commit
e764a726ab
@ -2262,6 +2262,7 @@ mod tests {
|
||||
if d.has_fd {
|
||||
Some(wfd)
|
||||
} else {
|
||||
unistd::close(wfd).unwrap();
|
||||
None
|
||||
}
|
||||
};
|
||||
@ -2296,13 +2297,14 @@ mod tests {
|
||||
if !d.break_pipe {
|
||||
unistd::close(rfd).unwrap();
|
||||
}
|
||||
unistd::close(wfd).unwrap();
|
||||
// XXX: Do not close wfd.
|
||||
// the fd will be closed on Process's dropping.
|
||||
// unistd::close(wfd).unwrap();
|
||||
|
||||
let msg = format!("{}, result: {:?}", msg, result);
|
||||
assert_result!(d.result, result, msg);
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_update_container_namespaces() {
|
||||
#[derive(Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user