public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Aaron Merey <amerey@redhat.com>, simon.marchi@polymtl.ca
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/debuginfod: Prevent out_of_range exception
Date: Mon, 18 Apr 2022 17:25:35 +0100	[thread overview]
Message-ID: <00e0f16f-cd16-c143-e901-802015fc629c@palves.net> (raw)
In-Reply-To: <20220414185631.28493-1-amerey@redhat.com>

On 2022-04-14 19:56, Aaron Merey via Gdb-patches wrote:
> +    # Test that URLs are printed correctly for the first-use notice
> +    set testname "Notice empty URL"
> +    set url ""
> +    setenv DEBUGINFOD_URLS $url

With remote-host testing, this will only change the environment on the build machine,
while GDB runs on the host machine.  Looking at the file, I see it is already
doing a bunch of things that won't work in remote-host scenario, so we can ignore it
for this patch, but really the testcase should have an early exit if [is_remote host].

> +    clean_restart
> +    send_gdb "file $binfile\n"
> +    gdb_expect {
> +	-re ".*Enable debuginfod.*" { fail $testname }
> +	-re ".*$gdb_prompt" { pass $testname }
> +	timeout { fail $testname }
> +    }
> +

We really shouldn't be adding plain gdb_expect uses for GDB matches.  E.g., why not gdb_test here?

  parent reply	other threads:[~2022-04-18 16:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 22:50 Aaron Merey
2022-04-09 15:41 ` Simon Marchi
2022-04-14 18:56   ` Aaron Merey
2022-04-18 14:13     ` Tom Tromey
2022-04-18 16:25     ` Pedro Alves [this message]
2022-04-19 20:38       ` Aaron Merey
2022-04-19 20:44         ` Pedro Alves
2022-04-19 21:11           ` Aaron Merey
2022-04-20 19:24             ` Pedro Alves
2022-04-20 22:09               ` Aaron Merey
2022-04-21 12:49               ` [pushed] gdb.debuginfod/fetch_src_and_symbols.exp: Fix "notice empty URL" test Pedro Alves
2022-04-12 16:09 ` [PATCH] gdb/debuginfod: Prevent out_of_range exception Tom Tromey

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=00e0f16f-cd16-c143-e901-802015fc629c@palves.net \
    --to=pedro@palves.net \
    --cc=amerey@redhat.com \
    --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).