public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH v5 06/15] do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.
Date: Tue, 22 Feb 2022 16:07:34 -0800	[thread overview]
Message-ID: <c06b4d93-86e1-f759-7570-a8ac14cb32d9@FreeBSD.org> (raw)
In-Reply-To: <2a4bc2e5-a7b9-a448-1988-75c53dd61c83@polymtl.ca>

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

  reply	other threads:[~2022-02-23  0:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 20:16 [PATCH v5 00/15] FreeBSD target async mode and related refactoring John Baldwin
2022-01-21 20:16 ` [PATCH v5 01/15] gdbsupport: Add an event-pipe class John Baldwin
2022-01-21 20:16 ` [PATCH v5 02/15] gdb linux-nat: Convert linux_nat_event_pipe to the event_pipe class John Baldwin
2022-01-21 20:16 ` [PATCH v5 03/15] gdbserver linux-low: Convert linux_event_pipe " John Baldwin
2022-01-21 20:16 ` [PATCH v5 04/15] Enable async mode on supported targets in target_resume John Baldwin
2022-02-20 10:47   ` Joel Brobecker
2022-01-21 20:16 ` [PATCH v5 05/15] Don't enable async mode at the end of target ::resume methods John Baldwin
2022-02-20 10:49   ` Joel Brobecker
2022-01-21 20:16 ` [PATCH v5 06/15] do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async John Baldwin
2022-02-22 22:38   ` Simon Marchi
2022-02-23  0:07     ` John Baldwin [this message]
2022-02-23  1:40       ` Simon Marchi
2022-02-23 15:51         ` Simon Marchi
2022-02-23 16:12           ` John Baldwin
2022-02-24  2:46             ` Simon Marchi
2022-02-24 19:02               ` John Baldwin
2022-02-24 19:16                 ` Simon Marchi
2022-01-21 20:16 ` [PATCH v5 07/15] inf-ptrace: Return an IGNORE event if waitpid() fails John Baldwin
2022-02-20 11:38   ` Joel Brobecker
2022-01-21 20:16 ` [PATCH v5 08/15] inf-ptrace: Support async targets in inf_ptrace_target::wait John Baldwin
2022-01-21 20:16 ` [PATCH v5 09/15] fbsd-nat: Implement async target support John Baldwin
2022-01-21 20:16 ` [PATCH v5 10/15] fbsd-nat: Include ptrace operation in error messages John Baldwin
2022-01-21 20:16 ` [PATCH v5 11/15] fbsd-nat: Various cleanups to the ::resume entry debug message John Baldwin
2022-01-21 20:16 ` [PATCH v5 12/15] fbsd-nat: Return nullptr rather than failing ::thread_name John Baldwin
2022-01-21 20:16 ` [PATCH v5 13/15] Enable async mode in the target in attach_cmd John Baldwin
2022-01-21 20:16 ` [PATCH v5 14/15] inf-ptrace: Add an event_pipe to be used for async mode in subclasses John Baldwin
2022-01-21 20:16 ` [PATCH v5 15/15] NEWS: Note that the FreeBSD async target supports async mode John Baldwin
2022-01-22  6:28   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c06b4d93-86e1-f759-7570-a8ac14cb32d9@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).