This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] [gdb/testsuite] XFAIL under Clang tests using label debug info


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]