On Wed, Apr 3, 2024 at 9:32 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote: > Subject: selftests/timers/posix_timers: Make signal distribution test less fragile > From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > > The signal distribution test has a tendency to hang for a long time as the > signal delivery is not really evenly distributed. In fact it might never be > distributed across all threads ever in the way it is written. > > Address this by: > > 1) Adding a timeout which aborts the test > > 2) Letting the test threads exit once they got a signal instead of > running continuously. That ensures that the other threads will > have a chance to expire the timer and get the signal. > > 3) Adding a detection whether all signals arrvied at the main thread, > which allows to run the test on older kernels and emit 'SKIP'. > > While at it get rid of the pointless atomic operation on a the thread local > variable in the signal handler. > > Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Thanks for this, Thomas! Just FYI: testing with 6.1, the test no longer hangs, but I don't see the SKIP behavior. It just fails: not ok 6 check signal distribution # Totals: pass:5 fail:1 xfail:0 xpass:0 skip:0 error:0 I've not had time yet to dig into what's going on, but let me know if you need any further details. thanks -john