]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/timers/posix_timers: Validate signal rules
authorThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jun 2024 16:42:09 +0000 (18:42 +0200)
committerFrederic Weisbecker <frederic@kernel.org>
Mon, 29 Jul 2024 19:57:34 +0000 (21:57 +0200)
commite65bb03e442751ccf1631382516dcca5b3a20122
tree770519d454ba61cbec30dc182a96390a1bd876a1
parent45c4225c3dcc7db2c0cdbf889cc7a9c72a53f742
selftests/timers/posix_timers: Validate signal rules

Add a test case to validate correct behaviour vs. timer reprogramming and
deletion.

The handling of queued signals in case of timer reprogramming or deletion
is inconsistent at best.

POSIX does not really specify the behaviour for that:

 - "The effect of disarming or resetting a timer with pending expiration
   notifications is unspecified."

 - "The disposition of pending signals for the deleted timer is
    unspecified."

In both cases it is reasonable to expect that pending signals are
discarded. Especially in the reprogramming case it does not make sense to
account for previous overruns or to deliver a signal for a timer which
has been disarmed.

Add tests to validate that no unexpected signals are delivered. They fail
for now until the signal and posix timer code is updated.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
tools/testing/selftests/timers/posix_timers.c