public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tiezhu Yang <yangtiezhu@loongson.cn>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] gdb: testsuite: leave can_spawn_for_attach alone
Date: Wed, 16 Mar 2022 09:24:19 -0400	[thread overview]
Message-ID: <0f9491bf-ef50-7743-1ae4-fd12c48f198c@polymtl.ca> (raw)
In-Reply-To: <1647424709-23680-2-git-send-email-yangtiezhu@loongson.cn>



On 2022-03-16 05:58, Tiezhu Yang wrote:
> As Pedro Alves said, caching procs should not issue pass/fail [1],
> this commit removes gdb_test_multiple in can_spawn_for_attach.
> 
> [1] https://sourceware.org/pipermail/gdb-patches/2022-March/186311.html
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  gdb/testsuite/lib/gdb.exp | 48 +++++++----------------------------------------
>  1 file changed, 7 insertions(+), 41 deletions(-)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index a35d08a..8fafcc0 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -5081,7 +5081,7 @@ proc gdb_exit { } {
>  # Return true if we can spawn a program on the target and attach to
>  # it.
>  
> -gdb_caching_proc can_spawn_for_attach {
> +proc can_spawn_for_attach { } {
>      # We use exp_pid to get the inferior's pid, assuming that gives
>      # back the pid of the program.  On remote boards, that would give
>      # us instead the PID of e.g., the ssh client, etc.
> @@ -5098,46 +5098,6 @@ gdb_caching_proc can_spawn_for_attach {
>  	return 0
>      }

If we don't want can_spawn_for_attach to emit test results, we should
also remove the "unsupported" calls.  If you'd like to still get a trace
about why a test run doesn't support spawning for attach, you can
replace those with "verbose -log ...", instead of removing them.

Maybe change the subject to "remove attach test from
can_spawn_for_attach", that would be more precise than "leave
can_spawn_for_attach alone".

With those changed, this patch LGTM, it essentially reverts to the
original state.

Simon

  reply	other threads:[~2022-03-16 13:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16  9:58 [PATCH 0/3] gdb: add gdb_attach to fix failed testcases Tiezhu Yang
2022-03-16  9:58 ` [PATCH 1/3] gdb: testsuite: leave can_spawn_for_attach alone Tiezhu Yang
2022-03-16 13:24   ` Simon Marchi [this message]
2022-03-16  9:58 ` [PATCH 2/3] gdb: testsuite: add new gdb_attach to fix attach-pie-noexec.exp Tiezhu Yang
2022-03-16 14:03   ` Simon Marchi
2022-03-16  9:58 ` [PATCH 3/3] gdb: testsuite: enhance gdb_attach to fix jit-elf.exp Tiezhu Yang
2022-03-16 14:16   ` Simon Marchi

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=0f9491bf-ef50-7743-1ae4-fd12c48f198c@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=yangtiezhu@loongson.cn \
    /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).