Skip to content

ostest: Fix ostest for CONFIG_ENABLE_PARTIAL_SIGNALS and CONFIG_DISABLE_ALL_SIGNALS#3538

Open
jlaitine wants to merge 1 commit into
apache:masterfrom
tiiuae:ostest_partial_signals
Open

ostest: Fix ostest for CONFIG_ENABLE_PARTIAL_SIGNALS and CONFIG_DISABLE_ALL_SIGNALS#3538
jlaitine wants to merge 1 commit into
apache:masterfrom
tiiuae:ostest_partial_signals

Conversation

@jlaitine

@jlaitine jlaitine commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Posix timers test doesn't really need signal actions, so we can change it to synchronously wait for the signal in sigwaitinfo, instead of registering a signal handler.

This has the following advantages:

  1. Posix timers test works also in CONFIG_ENABLE_PARTIAL_SIGNALS
  2. It gets implicitly tested that the signals can wake up threads also in CONFIG_ENABLE_PARTIAL_SIGNALS

The robust mutexes can't work withtout pthread_kill, which requires signals, so remove those if CONFIG_DISABLE_ALL_SIGNALS is defined

Impact

This corrects the functionality of ostest for other than CONFIG_ENABLE_ALL_SIGNALS.

Testing

Tested on qemu-armv8a:nsh , together with change in NuttX PR apache/nuttx#19116

  1. CONFIG_ENABLE_ALL_SIGNALS=y (unmodified defconfig): qemu-armv8a_nsh_ostest_all.txt
  2. +CONFIG_ENABLE_PARTIAL_SIGNALS=y: qemu-armv8a_nsh_ostest_partial.txt
  3. +CONFIG_DISABLE_ALL_SIGNALS=y: qemu-armv8a_nsh_ostest_disabled.txt

POSIX timers test doesn't really need signal actions, so we can change it
to synchronously wait for the signal in sigwaitinfo, instead of registering
a signal handler.

Also exclude the test from compilation with CONFIG_DISABLE_ALL_SIGNALS;
the test does require at least partial signal support.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
@jlaitine

Copy link
Copy Markdown
Contributor Author

I'll enable the robust mutex test back with CONFIG_DISABLE_ALL_SIGNALS, as soon as I get the pthread_kill with signo == 0 fixed right acc. to the comment in nuttx.

@cederom

cederom commented Jun 13, 2026 via email

Copy link
Copy Markdown
Contributor

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.

3 participants