Skip to content

graphics/input: Add monkey long-press exit and update Kconfig dependencies - #4035

Merged
xiaoxiang781216 merged 3 commits into
apache:masterfrom
terry0012:monkey-exit
Nov 13, 2026
Merged

xiaoxiang781216 merged 3 commits into
apache:masterfrom
terry0012:monkey-exit

Conversation

@terry0012

@terry0012 terry0012 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add long-press exit monitoring to monkey through the -e option
    (default: /dev/input0, threshold: 2500ms).
  • Use a poll loop with signalfd and timerfd for signal handling and
    event scheduling.
  • Make monkey/input-tool dependencies explicit, expose the input
    generator configuration, and retain automatic selection of
    LIBC_PRINT_EXTENSION for monkey logging.

Impact

The exit-monitor device is grabbed exclusively until monkey exits.
SIGTERM exits through normal cleanup; SIGTSTP/SIGCONT pause and resume
input generation.

Board configurations must explicitly enable the required dependencies.
A corresponding NuttX qemu-armv7a:full defconfig update is needed to
keep the input tool enabled. (apache/nuttx#21771)

Testing

  • Native simulator build and 28 runtime checks passed for the unchanged
    monkey C implementation, covering signals, multiple instances,
    pause/resume, short/long presses, grab release and restart.
  • Validated the final Kconfig dependencies and the updated QEMU defconfig.
  • Source formatting, commit-message and whitespace checks passed.
  • No QEMU ARM cross-build or hardware testing performed. Simultaneous
    signal/timer readiness remains unverified.

terry0012 and others added 3 commits November 12, 2026 15:56
Replace the separate monitor thread with a single-threaded
poll-based event loop using signalfd and timerfd.

Signed-off-by: rongyichang <[email protected]>
change kconfig from select to depends on for monkey

Signed-off-by: rongyichang <[email protected]>
LIBC_PRINT_EXTENSION has no prompt, so it cannot be turned on from a
defconfig and a board has no way to satisfy it as a dependency.  Monkey
needs it: monkey_log_printf() packs the va_list into a struct va_format
and hands it to syslog() with "%pV", which is only expanded when the
extension is enabled, otherwise every log line degrades to a raw pointer
value followed by a literal 'V'.  Select it instead so enabling monkey
pulls in the extension it actually uses.

Signed-off-by: liuchan3 <[email protected]>
Signed-off-by: rongyichang <[email protected]>
@xiaoxiang781216
xiaoxiang781216 merged commit 55528e9 into apache:master Nov 13, 2026
14 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants