[PATCH v5 06/15] do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.
John Baldwin
jhb@FreeBSD.org
Wed Feb 23 00:07:34 GMT 2022
On 2/22/22 2:38 PM, Simon Marchi wrote:
>
>
> On 2022-01-21 15:16, John Baldwin wrote:
>> Previously, TARGET_WNOHANG was cleared if a target supported async
>> mode even if async mode wasn't currently enabled. This change only
>> permits TARGET_WNOHANG if async mode is enabled.
>> ---
>> gdb/infrun.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/infrun.c b/gdb/infrun.c
>> index 5959c3e6658..f8ccafd287d 100644
>> --- a/gdb/infrun.c
>> +++ b/gdb/infrun.c
>> @@ -3629,7 +3629,7 @@ do_target_wait_1 (inferior *inf, ptid_t ptid,
>>
>> /* We can't ask a non-async target to do a non-blocking wait, so this will be
>> a blocking wait. */
>> - if (!target_can_async_p ())
>> + if (!target_is_async_p ())
>> options &= ~TARGET_WNOHANG;
>>
>> if (deprecated_target_wait_hook)
>
> Hi John,
>
> Starting with this patch I see a bunch of multi-target tests start
> to fail, for instance gdb.multi/multi-target-info-inferiors.exp.
>
> This is on plain Ubuntu 20.04 amd64.
>
> I don't have much time now, but I can provide more info later if
> needed.
Hmmm, I had tested this in a Ubuntu amd64 VM and hadn't seen any regressions.
However, this change can be easily reverted without reverting the rest of
the series I believe.
Looking at my logs from before, it seems that all of the gdb.multi/multi-target*
tests didn't report a status (either on stock master or in the branch with these
changes) which explains why I didn't see a regression earlier:
(gdb) PASS: gdb.multi/multi-re-run.exp: re_run_inf=2: iter=2: print re_run_var_2
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-re-run.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-continue.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-continue.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-info-inferiors.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-interrupt.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-interrupt.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-no-resumed.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-no-resumed.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-ping-pong-next.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-thread-find.exp ...
testcase /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-target-thread-find.exp completed in 0 seconds
Running /home/john/work/git/gdb/obj/gdb/testsuite/../../../gdb/testsuite/gdb.multi/multi-term-settings.exp ...
I have no idea why these tests didn't run in my VM. If you revert just this
commit and keep the rest of the series do you see any other regressions?
--
John Baldwin
More information about the Gdb-patches
mailing list