From 0e6abf1d85b1f71c6d9e48022d94c2be483ef31b Mon Sep 17 00:00:00 2001 From: Johannes Leupolz Date: Sun, 14 Dec 2025 21:44:10 +0000 Subject: [PATCH] Fix integration test for vuinput. --- docs/USAGE.md | 9 +++++++++ vuinputd-tests/tests/integration_tests.rs | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/USAGE.md b/docs/USAGE.md index bdd8b48..005645d 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -235,6 +235,15 @@ Sample output from `journalctl` showing vuinputd output: | Device appears on host seat | udev rules not isolating | Add udev rules from vuinputd/udev-folder | | Input delayed or missing | CUSE layer error | Check host logs via `journalctl -u vuinputd` | + +``` +Dez 14 21:33:17 wohnzimmer vuinputd[2172719]: Create /dev/input +Dez 14 21:33:17 wohnzimmer vuinputd[2172719]: [2025-12-14T21:33:17Z DEBUG vuinputd::jobs::inject_in_container_job] Error creating input device /dev/input/event12: Read-o> +Dez 14 21:33:17 wohnzimmer vuinputd[2172719]: thread '' panicked at vuinputd/src/jobs/inject_in_container_job.rs:161:41: +Dez 14 21:33:17 wohnzimmer vuinputd[2172719]: called `Result::unwrap()` on an `Err` value: Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" } +``` + +Ensure /dev and /run are writable in the container. If in doubt, use tmpfs. --- ## 8. Notes and Advanced Topics diff --git a/vuinputd-tests/tests/integration_tests.rs b/vuinputd-tests/tests/integration_tests.rs index bab3bc1..915136d 100644 --- a/vuinputd-tests/tests/integration_tests.rs +++ b/vuinputd-tests/tests/integration_tests.rs @@ -95,7 +95,6 @@ fn test_keyboard_in_container_with_uinput() { } #[cfg(all(feature = "requires-root", feature = "requires-uinput", feature = "requires-bwrap"))] -#[ignore] #[test] fn test_keyboard_in_container_with_vuinput() { println!("Note that vuinputd needs to run for this test"); @@ -105,6 +104,10 @@ fn test_keyboard_in_container_with_vuinput() { .unshare_net() .ro_bind("/", "/") .tmpfs("/tmp") + // dev needs to be writable for the new devices + .tmpfs("/dev") + // run needs to be writable for the udev devices + .tmpfs("/run") .dev_bind("/dev/vuinput", "/dev/uinput") .die_with_parent() .command(keyboard_in_container,&[])