Re: [PATCH] kill all threadapply processes at end of test

Simon Marchi via Gdb-patches
2021-05-29T01:48:27Z

On 2021-05-24 11:30 a.m., Carl Love wrote:
> Simon, Tom, Pedro, GCC maintainers:
>
> I have implemented the test changes to use pthread barrier rather then
> the spin loop. The changes only require changing the test with no
> changes to the expect scripts.
>
> The threadsapply test runs fine with no errors and no processes running
> after the test with just the changes to threadapply.c. This approach
> seems to work well and would be better then the previous patches to
> kill the processes in the expect script.
>
> The patch has been tested on Power. Please let me know if you have any
> additional comments or concern. Thanks.
>
> Carl Love
> ----------------------------------------------------------------------
> Change test to use barrier wait
>
> gdb/testsuite/ChangeLog:
>
> 2021-05-22 Carl Love <cel@us.ibm.com>
>
> * gdb.threads/threadapply.c: Add global mybarrier.
> (main): Add pthread_barrier_init.
> (thread_function): Replace while loop with myp increment and
> pthread_barrier_wait.

Hi,

The code looks good to me, but please add a suitable commit message, it
should contain a description and explanation of the observed problem and
the chosen solution, such that somebody not familiar with the issue can
understand the rationale of the patch.

Simon