Expand description
This implements a VFS device named wakeup_test. It is used as a way to expose setting a wakeup timer and when it goes off, send a specified input event to to wakeup the rest of the system.
It is modeled after a similar approach that is implemented as a loadable custom linux kernel module. Since Starnix does not support loadable kernel modules, this is implemented as a built-in module, that can be optionally enabled via feature configuration.
An example of using it would be to write a command line tool that runs in the container and opens the /dev/wakeup_test device, and issues ioctls to set wakeup timers and specify the input event to send when the timer goes off.
To set a timer to wake up the system via swiping after 2 seconds, you could run a command like this:
wakeup_test -a timers -e 2 -t cuj_tile -m swipe-right -o 7 -i 4 -u 456 -v 456
See go/fuchsia-wakeup-latency-test for more details.