From d79563d948dee0376fd3daa49c535e9efdd930bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 25 Mar 2026 23:02:24 +0100 Subject: [PATCH] Add integration test for /dev/input/ being hidden in blacklist mode --- tests/integration.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index edcb9da..5719b14 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -407,6 +407,20 @@ fn blacklist_runuser_is_tmpfs() { ); } +#[test] +fn blacklist_dev_input_hidden() { + let output = sandbox(&[]) + .args(["--", "bash", "-c", "ls /dev/input/ 2>/dev/null | wc -l"]) + .output() + .expect("agent-sandbox binary failed to execute"); + + let stdout = String::from_utf8_lossy(&output.stdout).trim().to_string(); + assert_eq!( + stdout, "0", + "expected /dev/input/ to be empty in blacklist mode, got {stdout} entries" + ); +} + #[test] fn rw_missing_path_errors() { let output = sandbox(&["--rw", "/nonexistent/xyz"])