Re: [PATCH 2/4] test-ww_mutex: Report errors from stress workers

From: John Stultz

Date: Thu Jun 18 2026 - 13:53:01 EST


On Wed, Jun 17, 2026 at 5:13 AM Håkon Bugge <haakon.bugge@xxxxxxxxxx> wrote:
>
> If any of stress_one_work(), stress_reorder_work(), or
> stress_inorder_work() fails, the error is not conveyed back to the
> test harness function stress().
>
> We may then see in the log:
>
> stress (stress_inorder_work) failed with -35
> Beginning ww (die) mutex selftests
> All ww mutex selftests passed
>
> Besides being a contradiction by terms, the failure to return error
> from said worker functions leads to false-positive results.
>
> We fix that by adding a *result* variable to *struct stress*, update
> it in said worker functions, and finally, in stress(), scan the
> *stress_array* and report the first error if any.
>
> Fixes: 2a0c11282881 ("locking/ww_mutex: Add kselftests for ww_mutex stress")
> Signed-off-by: Håkon Bugge <haakon.bugge@xxxxxxxxxx>

Acked-by: John Stultz <jstultz@xxxxxxxxxx>