diff --git a/crates/containerd-shim-wasm/src/test/signals.rs b/crates/containerd-shim-wasm/src/test/signals.rs index 48197a62e..0eee5a64b 100644 --- a/crates/containerd-shim-wasm/src/test/signals.rs +++ b/crates/containerd-shim-wasm/src/test/signals.rs @@ -18,6 +18,7 @@ //! Once #755 is fixed we can remove the libc based implementation and //! remove the ignore attribute from the test. +use std::fs::canonicalize; use std::future::pending; use std::io::{stderr, Write as _}; use std::sync::mpsc::channel; @@ -87,12 +88,18 @@ fn test_handling_signals() -> Result<()> { let mut containers = vec![]; for i in 0..20 { - let container = WasiTest::::builder()? + let builder = WasiTest::::builder()? .with_name(format!("test-{i}")) .with_start_fn(format!("test-{i}")) - .with_stdout("/proc/self/fd/1")? - .with_wasm(HELLO_WORLD)? - .build()?; + .with_wasm(HELLO_WORLD)?; + + // In CI /proc/self/fd/1 doesn't seem to be available + let builder = match canonicalize("/proc/self/fd/1") { + Ok(stdout) => builder.with_stdout(stdout)?, + _ => builder, + }; + + let container = builder.build()?; containers.push(Arc::new(container)); }