linux-next/samples/rust
Lee Jones 8d9b095b8f samples: rust_misc_device: Provide an example C program to exercise functionality
Here is the expected output (manually spliced together):

USERSPACE: Opening /dev/rust-misc-device for reading and writing
KERNEL: rust_misc_device: Opening Rust Misc Device Sample
USERSPACE: Calling Hello
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -> Hello from the Rust Misc Device
USERSPACE: Fetching initial value
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -> Copying data to userspace (value: 0)
USERSPACE: Submitting new value (1)
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -> Copying data from userspace (value: 1)
USERSPACE: Fetching new value
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -> Copying data to userspace (value: 1)
USERSPACE: Attempting to call in to an non-existent IOCTL
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -> IOCTL not recognised: 20992
USERSPACE: ioctl: Succeeded to fail - this was expected: Inappropriate ioctl for device
USERSPACE: Closing /dev/rust-misc-device
KERNEL: rust_misc_device: Exiting the Rust Misc Device Sample
USERSPACE: Success

Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20241213134715.601415-6-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-16 16:12:56 +01:00
..
hostprogs samples: add first Rust examples 2022-09-28 09:03:08 +02:00
Kconfig samples: rust: Provide example using the new Rust MiscDevice abstraction 2024-12-16 16:12:45 +01:00
Makefile samples: rust: Provide example using the new Rust MiscDevice abstraction 2024-12-16 16:12:45 +01:00
rust_minimal.rs rust: treewide: switch to the kernel Vec type 2024-10-15 23:10:32 +02:00
rust_misc_device.rs samples: rust_misc_device: Provide an example C program to exercise functionality 2024-12-16 16:12:56 +01:00
rust_print_events.c rust: samples: add tracepoint to Rust sample 2024-11-04 16:21:44 -05:00
rust_print_main.rs Rust changes for v6.13 2024-11-26 14:00:26 -08:00