From: Tom de Vries <tdevries@suse.de>
To: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] [gdb/testsuite] Use try instead of catch
Date: Fri, 23 Oct 2026 13:11:26 +0200 [thread overview]
Message-ID: <71d772a5-5ff8-4363-9ca1-8a1df30a11c1@suse.de> (raw)
In-Reply-To: <4d525a62-ba57-48fa-8bfa-7840c575a425@redhat.com>
On 10/22/26 4:22 PM, Keith Seitz wrote:
> Hi,
>
> On 9/25/26 7:01 AM, Tom de Vries wrote:
>> Use try instead of catch in a few places in lib/gdb.exp.
>
> I think this series looks good, but I did want to point out
> one little thing.
>
>> ---
>> gdb/testsuite/lib/gdb.exp | 230 +++++++++++++++++++++++---------------
>> 1 file changed, 139 insertions(+), 91 deletions(-)
>>
>> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
>> index 2cfdbdda09d..3496ddd4132 100644
>> --- a/gdb/testsuite/lib/gdb.exp
>> +++ b/gdb/testsuite/lib/gdb.exp
>> @@ -12380,7 +12425,10 @@ gdb_caching_proc have_startup_shell {} {
>> proc dwz_version { } {
>> set dwz_program "dwz"
>> - set res [catch {exec $dwz_program --version} output]
>> + try {
>> + set output [exec $dwz_program --version]
>> + } trap CHILDSTATUS {output} {
>> + }
>> # Don't check the exit value of 'dwz' process as 'dwz' doesn't
>> # exit immediately after displaying the version number, and for
>
> This is a subtle behavioral change. In the case where dwz does not exist
> on the system, `dwz_version' used to return {}. With this change, it now
> will propogate an error. IIUC this will cause issues with any test on
> such a host that does "require dwz_version N". That will now issue an
> error instead of eliciting the usual UNSUPPORTED from dejagnu.
>
Hi Keith,
thanks for the review.
The Linaro CI did run into this problem, so I've already addressed this
in a v2.
Thanks,
- Tom
> Reviewed-By: Keith Seitz <keiths@redhat.com>
>
> Keith
>
next prev parent reply other threads:[~2026-10-23 11:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 14:01 [PATCH 0/2] " Tom de Vries
2026-09-25 14:01 ` [PATCH 1/2] [gdb/testsuite] Simplify core_find Tom de Vries
2026-09-25 14:01 ` [PATCH 2/2] [gdb/testsuite] Use try instead of catch Tom de Vries
2026-10-22 14:22 ` Keith Seitz
2026-10-23 11:11 ` Tom de Vries [this message]
2026-10-23 13:26 ` Keith Seitz
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=71d772a5-5ff8-4363-9ca1-8a1df30a11c1@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/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