diff --git a/README.md b/README.md index dcfe264..860f546 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ It reliably demonstrates the core concept — exposing `/dev/uinput` devices ins ### ✅ Goals for Production Readiness +* [ ] **Vibration/Force Feedback support:** + * [ ] **Steam input support:** Steam input is not supported, yet. For some strange reasons, steam creates 16 virtual devices. Maybe a race. diff --git a/vuinputd-tests/tests/integration_tests.rs b/vuinputd-tests/tests/integration_tests.rs index c88bc04..e0da2e0 100644 --- a/vuinputd-tests/tests/integration_tests.rs +++ b/vuinputd-tests/tests/integration_tests.rs @@ -193,3 +193,41 @@ fn test_keyboard_in_container_with_vuinput_placement_on_host() { assert!(out.status.success()); } + + +#[ignore = "not implemented yet"] +#[cfg(all( + feature = "requires-privileges", + feature = "requires-uinput", + feature = "requires-bwrap" +))] +#[test] +fn test_gamepad_with_ff_in_container() { + let _guard: run_vuinputd::VuinputdGuard = run_vuinputd::ensure_vuinputd_running(&[]); + + let test_scenarios = env!("CARGO_BIN_EXE_test-scenarios"); + + let (builder, _ipc) = bwrap::BwrapBuilder::new() + .unshare_net() + .ro_bind("/", "/") + .tmpfs("/tmp") + // dev needs to be writable for the new devices + .dev() + // run needs to be writable for the udev devices + .tmpfs("/run") + .dev_bind("/dev/vuinput-test", "/dev/uinput") + .die_with_parent() + .with_ipc() + .expect("failed to create IPC"); + + let out = builder + .command(test_scenarios, &["--ipc","ff-xbox-gamepad"]) + .run() + .unwrap_or_else(|e| panic!("failed to run bwrap!: {e}")); + + println!("Output"); + println!("stdout: {}", str::from_utf8(&out.stdout).unwrap()); + println!("stderr: {}", str::from_utf8(&out.stderr).unwrap()); + + assert!(out.status.success()); +} \ No newline at end of file