Skip to content

Commit

Permalink
fix CI failure in signals test
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Prendes <[email protected]>
  • Loading branch information
jprendes committed Dec 27, 2024
1 parent 8dab678 commit 400d99c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions crates/containerd-shim-wasm/src/test/signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -87,12 +88,18 @@ fn test_handling_signals() -> Result<()> {
let mut containers = vec![];

for i in 0..20 {
let container = WasiTest::<SomeInstance>::builder()?
let builder = WasiTest::<SomeInstance>::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));
}

Expand Down

0 comments on commit 400d99c

Please sign in to comment.