Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg

Pedro Alves
2025-06-06T15:27:55Z

On 2025-06-06 16:14, Pedro Alves wrote:
> On 2025-06-06 08:12, Tom de Vries wrote:
>
>> FWIW, I've ran the testsuite again, and got stuck this time at gdb.base/catch-fork-kill.exp.  In this case, the problem didn't seem to be gdb, but lingering test execs.  After killing those manually using "kill -9", the test-case finished.
>>
>> The hang can be fixed by adding a missing "require supports_catch_syscall".
>>
>> I was wondering, I saw you mention "I've got another series of patches to improve such tests and skip others, and that's what I've been testing with".  Do you have similar fixes in that series?  If so, can you submit them, or share them in a branch?
>>
>
> For fork-related tests, I added allow_fork_tests to be used with require, and
> sprinkled that throughout. There is no way currently for the debugger to be notified
> of forks and execs. There is no protocol between debugger and Cygwin for that.
> So all fork tests fail.
>
> So for gdb.base/catch-fork-kill.exp in particular, that's what I did:
>
> diff --git a/gdb/testsuite/gdb.base/catch-fork-kill.exp b/gdb/testsuite/gdb.base/catch-fork-kill.exp
> index 0fd853b9085..224a8dfec89 100644
> --- a/gdb/testsuite/gdb.base/catch-fork-kill.exp
> +++ b/gdb/testsuite/gdb.base/catch-fork-kill.exp
> @@ -32,6 +32,8 @@
>
> standard_testfile
>
> +require allow_fork_tests
>
>

OK, I've sent that patch now:

https://inbox.sourceware.org/gdb-patches/20250606152500.947489-1-pedro@palves.net/T/#u

Pedro Alves