This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [gdb/testsuite] XFAIL under Clang tests using label debug info
- From: Pedro Alves <palves at redhat dot com>
- To: David Blaikie <dblaikie at gmail dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 24 Apr 2014 11:42:23 +0100
- Subject: Re: [patch] [gdb/testsuite] XFAIL under Clang tests using label debug info
- Authentication-results: sourceware.org; auth=none
- References: <CAENS6EtFF4hPJe3uqJBkPf4q8c0n4RvV1_jO=6mWWEp=X2HbnA at mail dot gmail dot com>
Hi David,
On 04/14/2014 12:25 AM, David Blaikie wrote:
>
> +if {[test_compiler_info {clang-*-*}]} { setup_xfail clang/14500 *-*-* }
> gdb_test "break here" \
> "Breakpoint.*at.*" \
> "breakpoint here"
>
> +if {[test_compiler_info {clang-*-*}]} { setup_xfail clang/14500 *-*-* }
A suggestion -- in these cases where we have a bunch of similar
setup_xfails for a single bug, it's good to do as e.g.,
gdb.cp/temargs.exp does. That is, something like
set have_clang_14500_bug [test_compiler_info {clang-*-*}]
# Short description of bug here.
proc setup_xfail_clang_14500 {} {
global have_clang_14500_bug
if { $have_clang_14500_bug } {
setup_xfail clang/14500 *-*-*
}
}
And then:
+ setup_xfail_clang_14500
gdb_test "break main:there" \
"Breakpoint.*at.*" \
"breakpoint there"
etc.
A style like that adds less clutter, and, is less typo prone than:
> +if {[test_compiler_info {clang-*-*}]} { setup_xfail clang/14500 *-*-* }
all over. And it's a single place to change the condition to be
dependent on clang version, in the future, if you want to.
--
Pedro Alves