1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-05-10 01:26:14 +02:00

remove ipc-channel dependency

This commit is contained in:
yihuaf 2021-10-15 05:45:04 +02:00
parent afa1b8c5f6
commit bf2b9654d1
2 changed files with 3 additions and 4 deletions

View File

@ -53,7 +53,6 @@ path-clean = "0.1.0"
oci-spec = { git = "https://github.com/containers/oci-spec-rs", rev = "3d5132a18c305be59d58187201429d8f0243b513", features = ["proptests"] }
quickcheck = "1"
serial_test = "0.5.1"
ipc-channel = "0.15.0"
[profile.release]
lto = true

View File

@ -262,9 +262,9 @@ pub fn create_temp_dir(test_name: &str) -> Result<TempDir> {
#[cfg(test)]
pub(crate) mod test_utils {
use crate::process::channel;
use anyhow::Context;
use anyhow::{bail, Result};
use ipc_channel::ipc;
use nix::sys::wait;
use serde::{Deserialize, Serialize};
@ -275,10 +275,10 @@ pub(crate) mod test_utils {
}
pub fn test_in_child_process<F: FnOnce() -> Result<()>>(cb: F) -> Result<()> {
let (sender, receiver) = ipc::channel::<TestResult>()?;
let (mut sender, mut receiver) = channel::channel::<TestResult>()?;
match unsafe { nix::unistd::fork()? } {
nix::unistd::ForkResult::Parent { child } => {
let res = receiver.recv().unwrap();
let res = receiver.recv()?;
wait::waitpid(child, None)?;
if !res.success {