From: Andrew Burgess <aburgess@redhat.com>
To: Bratislav Filipovic <bfilipov@amd.com>, gdb-patches@sourceware.org
Cc: simon.marchi@efficios.com, Bratislav Filipovic <bfilipov@amd.com>
Subject: Re: [PATCH] test: basename filenames in dwarf2 frame checks
Date: Thu, 02 Apr 2026 11:11:34 +0100 [thread overview]
Message-ID: <87a4vl659l.fsf@redhat.com> (raw)
In-Reply-To: <20260325163234.3377436-1-bfilipov@amd.com>
Bratislav Filipovic <bfilipov@amd.com> writes:
> Some gdb.dwarf2 tests match the output of commands like frame and
> expect to see locations printed as fission-base.c:LINE (no directory
> prefix). When the test programs are built with clang as CC_FOR_TARGET,
> GDB can print an absolute source path instead, causing FAILs.
Thanks for taking a look at this, it's always nice to see tests being
improved like this.
This is fine, with two minor nits fixed...
>
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
> index 32ddaf4a..5b47c84c 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-undefined-ret-addr.exp
> @@ -30,6 +30,11 @@ if {![runto "stop_frame"]} {
> return -1
> }
>
> +# If test is compiled with clang, GDB would display absolute path
> +# This command keeps output consistent across toolchains.
This comment needs to be one complete sentence (add a comma after
'path', and change 'This' to 'this'), or two sentences (add a full stop
after 'path').
> +
> +gdb_test_no_output "set filename-display basename"
> +
> # stop_frame should be the outermost frame.
>
> # Check that backtrace shows only frame #0.
> diff --git a/gdb/testsuite/gdb.dwarf2/fission-base.exp b/gdb/testsuite/gdb.dwarf2/fission-base.exp
> index 035fe731..a73cab48 100644
> --- a/gdb/testsuite/gdb.dwarf2/fission-base.exp
> +++ b/gdb/testsuite/gdb.dwarf2/fission-base.exp
> @@ -46,6 +46,11 @@ if {![runto_main]} {
> gdb_test "ptype main" "type = int \\(\\)"
> gdb_test "ptype func" "type = int \\(int\\)"
>
> +# If test is compiled with clang, GDB would display absolute path
> +# This command keeps output consistent across toolchains.
Same issue here.
With both of those fixed:
Approved-By: Andrew Burgess <aburgess@redhat.com>
thanks,
Andrew
next prev parent reply other threads:[~2026-04-02 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 16:32 Bratislav Filipovic
2026-04-01 14:54 ` [PING][PATCH] " Filipovic, Bratislav
2026-04-02 10:11 ` Andrew Burgess [this message]
2026-04-02 10:24 ` [PATCH] " Bratislav Filipovic
2026-04-02 12:52 ` Andrew Burgess
2026-04-02 13:01 ` Filipovic, Bratislav
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=87a4vl659l.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=bfilipov@amd.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.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