Skip to content

Commit

Permalink
add debugging info
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Prendes <[email protected]>
  • Loading branch information
jprendes committed Jan 30, 2025
1 parent a55530a commit 3adaa6e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ test-doc:
RUST_LOG=trace $(CARGO) test --doc -- --test-threads=1

test/stress-%: dist-%
RUST_LOG=trace $(CARGO) run -p stress-test $(TARGET_FLAG) -- $(PWD)/dist/bin/containerd-shim-$*-v1 --count=100 --parallel=$$(nproc || echo 10) --timeout=2s
RUST_BACKTRACE=1 $(CARGO) run -p stress-test $(TARGET_FLAG) -- $(PWD)/dist/bin/containerd-shim-$*-v1 --count=100 --parallel=$$(nproc || echo 10) --timeout=2s

generate-doc:
RUST_LOG=trace $(CARGO) doc --workspace --all-features --no-deps --document-private-items --exclude wasi-demo-app
Expand Down
3 changes: 3 additions & 0 deletions crates/stress-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ async fn main() -> Result<()> {
set_child_subreaper(true)?;
let res = main_impl().await;
let _ = reap_children().await?;
if let Err(err) = &res {
eprintln!("{err:?}");
}
res
}

Expand Down
2 changes: 2 additions & 0 deletions crates/stress-test/src/mocks/containerd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ impl Containerd {
let dir = tempdir()?;
let socket = dir.path().join("containerd.sock.ttrpc");

println!("Binding to {:?}", format!("unix://{}", socket.display()));
let _server = Server::new()
.register(service!(EventsService: Events))
.bind(format!("unix://{}", socket.display()))
.await?;
println!("Binding done!");

Ok(Self {
dir,
Expand Down
3 changes: 3 additions & 0 deletions crates/stress-test/src/mocks/shim.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::collections::HashMap;
use std::path::Path;

use anyhow::Result;
Expand Down Expand Up @@ -41,6 +42,8 @@ impl Shim {

info!("Starting shim");

println!("{:#?}", std::env::vars().collect::<HashMap<_, _>>());

let hash = hash(dir.path());
let output = Command::new(binary.as_ref())
.args([
Expand Down

0 comments on commit 3adaa6e

Please sign in to comment.