• Thomas Gleixner's avatar
    selftests/timers/posix_timers: Validate signal rules · e65bb03e
    Thomas Gleixner authored
    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: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
    e65bb03e
posix_timers.c 11 KB