This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
FYI: fix setup_kfail invocations
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 25 May 2010 15:01:34 -0600
- Subject: FYI: fix setup_kfail invocations
- Reply-to: tromey at redhat dot com
I am checking this in.
I happened to notice that many existing calls to setup_kfail have their
arguments reversed. This patch fixes all such calls. It also removes a
couple setup_kfail-calling utility functions that are unused.
Regtested on x86-64 (compile farm).
Tom
2010-05-25 Tom Tromey <tromey@redhat.com>
* gdb.arch/i386-prologue.exp (skip_breakpoint): Fix setup_kfail
argument order.
* gdb.base/macscp.exp: Fix setup_kfail argument order.
* gdb.base/long_long.exp (gdb_test_xxx): Fix setup_kfail argument
order.
* gdb.base/sigbpt.exp (stepi_out): Fix setup_kfail argument
order.
* gdb.base/call-sc.exp (setup_kfails): Remove.
(setup_compiler_kfails): Remove.
* gdb.base/callfuncs.exp (do_function_calls): Fix setup_kfail
argument order.
* gdb.base/siginfo.exp: Fix setup_kfail argument order.
* gdb.base/sigstep.exp (advance): Fix setup_kfail argument order.
(advancei): Fix setup_kfail argument order.
* gdb.base/radix.exp: Fix setup_kfail argument order.
* gdb.base/solib-weak.exp (do_test): Fix setup_kfail argument
order.
* gdb.base/structs.exp (setup_kfails): Remove.
(setup_compiler_kfails): Fix setup_kfail argument order.
* gdb.base/sigaltstack.exp (finish_test): Fix setup_kfail argument
order.
* gdb.java/jmain.exp: Fix setup_kfail argument order.
* gdb.pascal/types.exp (test_string_literal_types_accepted): Fix
setup_kfail argument order.
* gdb.cp/overload.exp: Fix setup_kfail argument order.
2010-05-25 Tom Tromey <tromey@redhat.com>
Index: gdb.arch/i386-prologue.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-prologue.exp,v
retrieving revision 1.21
diff -u -r1.21 i386-prologue.exp
--- gdb.arch/i386-prologue.exp 5 May 2010 18:06:57 -0000 1.21
+++ gdb.arch/i386-prologue.exp 25 May 2010 21:00:18 -0000
@@ -202,7 +202,7 @@
"#0\[ \t\]*$hex in gdb1718.*\r\n#1\[ \t\]*$hex in main.*" \
"backtrace in gdb1718"
-setup_kfail *-*-* gdb/1718
+setup_kfail gdb/1718 *-*-*
gdb_test "info frame" \
".*Saved registers:.*esi at.*ebx at.*eip at.*" \
"saved registers in gdb1718"
Index: gdb.base/call-sc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/call-sc.exp,v
retrieving revision 1.13
diff -u -r1.13 call-sc.exp
--- gdb.base/call-sc.exp 5 May 2010 18:06:57 -0000 1.13
+++ gdb.base/call-sc.exp 25 May 2010 21:00:18 -0000
@@ -43,22 +43,6 @@
return -1;
}
-# Use the file name, compiler and tuples to set up any needed KFAILs.
-
-proc setup_kfails { file tuples bug } {
- global testfile
- if [string match $file $testfile] {
- foreach f $tuples { setup_kfail $f $bug }
- }
-}
-
-proc setup_compiler_kfails { file compiler format tuples bug } {
- global testfile
- if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
- foreach f $tuples { setup_kfail $f $bug }
- }
-}
-
# Compile a variant of scalars.c using TYPE to specify the type of the
# parameter and return-type. Run the compiled program up to "main".
# Also updates the global "testfile" to reflect the most recent build.
@@ -134,22 +118,6 @@
}
-# Use the file name, compiler and tuples to set up any needed KFAILs.
-
-proc setup_kfails { file tuples bug } {
- global testfile
- if [string match $file $testfile] {
- foreach f $tuples { setup_kfail $f $bug }
- }
-}
-
-proc setup_compiler_kfails { file compiler format tuples bug } {
- global testfile
- if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
- foreach f $tuples { setup_kfail $f $bug }
- }
-}
-
# Test GDB's ability to make inferior function calls to functions
# returning (or passing) in a single scalar.
Index: gdb.base/callfuncs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/callfuncs.exp,v
retrieving revision 1.35
diff -u -r1.35 callfuncs.exp
--- gdb.base/callfuncs.exp 24 May 2010 22:03:58 -0000 1.35
+++ gdb.base/callfuncs.exp 25 May 2010 21:00:18 -0000
@@ -190,17 +190,17 @@
# function body. This results in the called function treating the
# first few instructions of the function proper as a descriptor
# and attempting a jump through that (a totally random address).
- setup_kfail "rs6000*-*-aix*" gdb/1457
- setup_kfail "powerpc*-*-aix*" gdb/1457
- setup_kfail hppa*-*-hpux* gdb/1457
+ setup_kfail gdb/1457 "rs6000*-*-aix*"
+ setup_kfail gdb/1457 "powerpc*-*-aix*"
+ setup_kfail gdb/1457 hppa*-*-hpux*
gdb_test "p t_func_values(add,func_val2)" " = 1"
- setup_kfail "rs6000*-*-aix*" gdb/1457
- setup_kfail "powerpc*-*-aix*" gdb/1457
- setup_kfail hppa*-*-hpux* gdb/1457
+ setup_kfail gdb/1457 "rs6000*-*-aix*"
+ setup_kfail gdb/1457 "powerpc*-*-aix*"
+ setup_kfail gdb/1457 hppa*-*-hpux*
gdb_test "p t_func_values(func_val1,doubleit)" " = 1"
- setup_kfail "rs6000*-*-aix*" gdb/1457
- setup_kfail "powerpc*-*-aix*" gdb/1457
- setup_kfail hppa*-*-hpux* gdb/1457
+ setup_kfail gdb/1457 "rs6000*-*-aix*"
+ setup_kfail gdb/1457 "powerpc*-*-aix*"
+ setup_kfail gdb/1457 hppa*-*-hpux*
gdb_test "p t_call_add(add,3,4)" " = 7"
gdb_test "p t_call_add(func_val1,3,4)" " = 7"
Index: gdb.base/long_long.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/long_long.exp,v
retrieving revision 1.31
diff -u -r1.31 long_long.exp
--- gdb.base/long_long.exp 24 May 2010 22:06:59 -0000 1.31
+++ gdb.base/long_long.exp 25 May 2010 21:00:18 -0000
@@ -85,7 +85,7 @@
proc gdb_test_xxx { test pat name } {
if { $pat == "" } {
- setup_kfail *-*-* gdb/1672
+ setup_kfail gdb/1672 *-*-*
gdb_test $test "xxx" $name
} else {
gdb_test $test $pat $name
Index: gdb.base/macscp.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/macscp.exp,v
retrieving revision 1.25
diff -u -r1.25 macscp.exp
--- gdb.base/macscp.exp 5 May 2010 18:06:58 -0000 1.25
+++ gdb.base/macscp.exp 25 May 2010 21:00:18 -0000
@@ -243,7 +243,7 @@
pass "info macro WHERE after `list macscp_4_2_from_macscp2'"
}
{macscp4.h macscp3.h macscp1.c {before macscp4_2_..., from macscp3.h}} {
- setup_kfail *-*-* "gdb/555"
+ setup_kfail"gdb/555" *-*-*
fail "info macro WHERE after `list macscp_4_2_from_macscp2' (gdb/555)"
}
timeout {
@@ -258,7 +258,7 @@
pass "info macro WHERE after `list macscp_4_2_from_macscp3'"
}
{macscp4.h macscp2.h macscp1.c {before macscp4_2_..., from macscp2.h}} {
- setup_kfail *-*-* "gdb/555"
+ setup_kfail"gdb/555" *-*-*
fail "info macro WHERE after `list macscp_4_2_from_macscp3' (gdb/555)"
}
timeout {
@@ -370,7 +370,7 @@
if {[string compare $result $expected] == 0} {
pass "info macro WHERE stopped in $func"
} elseif {[string compare $result $kfail_expected] == 0} {
- setup_kfail *-*-* "gdb/555"
+ setup_kfail"gdb/555" *-*-*
fail "info macro WHERE stopped in $func (gdb/555)"
} elseif {[string compare $result timeout] == 0} {
fail "info macro WHERE stopped in $func (timeout)"
Index: gdb.base/radix.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/radix.exp,v
retrieving revision 1.11
diff -u -r1.11 radix.exp
--- gdb.base/radix.exp 5 May 2010 18:06:58 -0000 1.11
+++ gdb.base/radix.exp 25 May 2010 21:00:18 -0000
@@ -133,7 +133,7 @@
test_one_output 8 "0xf" "17"
test_one_output 8 "10" "12"
test_one_output 8 "100" "144"
- setup_kfail *-*-* "gdb/1715"
+ setup_kfail "gdb/1715" *-*-*
test_one_output 8 "20." "24"
test_one_output 8 "(int) 20." "24"
@@ -150,7 +150,7 @@
test_one_output 16 "0xf" "f"
test_one_output 16 "10" "a"
test_one_output 16 "100" "64"
- setup_kfail *-*-* "gdb/1715"
+ setup_kfail "gdb/1715" *-*-*
test_one_output 16 "20." "14"
test_one_output 16 "(int) 20." "14"
Index: gdb.base/sigaltstack.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigaltstack.exp,v
retrieving revision 1.12
diff -u -r1.12 sigaltstack.exp
--- gdb.base/sigaltstack.exp 5 May 2010 18:06:58 -0000 1.12
+++ gdb.base/sigaltstack.exp 25 May 2010 21:00:18 -0000
@@ -83,8 +83,8 @@
# Some platforms use a special read-only page for signal
# trampolines. We can't set a breakpoint there, and we
# don't gracefully fall back to single-stepping.
- setup_kfail "i?86-*-linux*" gdb/1736
- setup_kfail "*-*-openbsd*" gdb/1736
+ setup_kfail gdb/1736 "i?86-*-linux*"
+ setup_kfail gdb/1736 "*-*-openbsd*"
fail "$msg (could not set breakpoint)"
}
-re "$pattern.*${gdb_prompt} $" {
Index: gdb.base/sigbpt.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigbpt.exp,v
retrieving revision 1.18
diff -u -r1.18 sigbpt.exp
--- gdb.base/sigbpt.exp 5 May 2010 18:06:58 -0000 1.18
+++ gdb.base/sigbpt.exp 25 May 2010 21:00:18 -0000
@@ -171,7 +171,7 @@
set test "${name}; stepi out of handler"
gdb_test_multiple "stepi" "$test" {
-re "Could not insert single-step breakpoint.*$gdb_prompt $" {
- setup_kfail "sparc*-*-openbsd*" gdb/1736
+ setup_kfail gdb/1736 "sparc*-*-openbsd*"
fail "$test (could not insert single-step breakpoint)"
}
-re "keeper.*$gdb_prompt $" {
Index: gdb.base/siginfo.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/siginfo.exp,v
retrieving revision 1.10
diff -u -r1.10 siginfo.exp
--- gdb.base/siginfo.exp 5 May 2010 18:06:58 -0000 1.10
+++ gdb.base/siginfo.exp 25 May 2010 21:00:18 -0000
@@ -73,7 +73,7 @@
set test "step out of handler"
gdb_test_multiple "step" "${test}" {
-re "Could not insert single-step breakpoint.*$gdb_prompt $" {
- setup_kfail sparc*-*-openbsd* gdb/1736
+ setup_kfail gdb/1736 sparc*-*-openbsd*
fail "$test (could not insert single-step breakpoint)"
}
-re "done = 1;.*${gdb_prompt} $" {
Index: gdb.base/sigstep.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigstep.exp,v
retrieving revision 1.20
diff -u -r1.20 sigstep.exp
--- gdb.base/sigstep.exp 5 May 2010 18:06:58 -0000 1.20
+++ gdb.base/sigstep.exp 25 May 2010 21:00:18 -0000
@@ -78,7 +78,7 @@
set test "$prefix; leave handler"
gdb_test_multiple "$i" "${test}" {
-re "Could not insert single-step breakpoint.*$gdb_prompt $" {
- setup_kfail "sparc*-*-openbsd*" gdb/1736
+ setup_kfail gdb/1736 "sparc*-*-openbsd*"
fail "$test (could not insert single-step breakpoint)"
}
-re "done = 1;.*${gdb_prompt} $" {
@@ -90,7 +90,7 @@
exp_continue -continue_timer
}
-re "Program exited normally.*${gdb_prompt} $" {
- setup_kfail powerpc-*-*bsd* gdb/1639
+ setup_kfail gdb/1639 powerpc-*-*bsd*
fail "$test (program exited)"
}
-re "(while ..done|done = 0).*${gdb_prompt} $" {
@@ -119,13 +119,13 @@
# Some platforms use a special read-only page for signal
# trampolines. We can't set a breakpoint there, and we
# don't gracefully fall back to single-stepping.
- setup_kfail "i?86-*-linux*" gdb/1736
- setup_kfail "*-*-openbsd*" gdb/1736
+ setup_kfail gdb/1736 "i?86-*-linux*"
+ setup_kfail gdb/1736 "*-*-openbsd*"
fail "$test (could not set breakpoint)"
return
}
-re "Could not insert single-step breakpoint.*$gdb_prompt $" {
- setup_kfail "sparc*-*-openbsd*" gdb/1736
+ setup_kfail gdb/1736 "sparc*-*-openbsd*"
fail "$test (could not insert single-step breakpoint)"
}
-re "Breakpoint \[0-9\]*, handler .*${gdb_prompt} $" {
Index: gdb.base/solib-weak.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/solib-weak.exp,v
retrieving revision 1.8
diff -u -r1.8 solib-weak.exp
--- gdb.base/solib-weak.exp 1 Jan 2010 07:32:01 -0000 1.8
+++ gdb.base/solib-weak.exp 25 May 2010 21:00:18 -0000
@@ -106,7 +106,7 @@
if {(${lib1opts} == "" && ${lib2opts} != "" && ${lib1first} == 1)
|| (${lib1opts} != "" && ${lib2opts} == "" && ${lib1first} == 0)} {
- setup_kfail *-*-* gdb/1824
+ setup_kfail gdb/1824 *-*-*
}
gdb_test "continue" "Breakpoint .* bar .*${expected_file}\\..*" \
Index: gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.31
diff -u -r1.31 structs.exp
--- gdb.base/structs.exp 5 May 2010 18:06:58 -0000 1.31
+++ gdb.base/structs.exp 25 May 2010 21:00:18 -0000
@@ -215,17 +215,10 @@
# Use the file name, compiler and tuples to set up any needed KFAILs.
-proc setup_kfails { file tuples bug } {
- global testfile
- if [string match $file $testfile] {
- foreach f $tuples { setup_kfail $f $bug }
- }
-}
-
proc setup_compiler_kfails { file compiler format tuples bug } {
global testfile
if {[string match $file $testfile] && [test_compiler_info $compiler] && [test_debug_format $format]} {
- foreach f $tuples { setup_kfail $f $bug }
+ foreach f $tuples { setup_kfail $bug $f }
}
}
Index: gdb.cp/overload.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/overload.exp,v
retrieving revision 1.19
diff -u -r1.19 overload.exp
--- gdb.cp/overload.exp 5 May 2010 18:06:58 -0000 1.19
+++ gdb.cp/overload.exp 25 May 2010 21:00:18 -0000
@@ -302,10 +302,10 @@
# And with filename and namespace... which does not work.
-setup_kfail *-*-* gdb/11289
+setup_kfail gdb/11289 *-*-*
gdb_test "list ${srcfile}:foo::overloadfnarg(int)" "int foo::overloadfnarg"
-setup_kfail *-*-* gdb/11289
+setup_kfail gdb/11289 *-*-*
gdb_test "list ${srcfile}:'foo::overloadfnarg(int)'" "int foo::overloadfnarg"
# Now some tests to see how overloading and namespaces interact.
Index: gdb.java/jmain.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmain.exp,v
retrieving revision 1.13
diff -u -r1.13 jmain.exp
--- gdb.java/jmain.exp 5 May 2010 18:07:01 -0000 1.13
+++ gdb.java/jmain.exp 25 May 2010 21:00:18 -0000
@@ -52,13 +52,13 @@
set earlybpmain "Breakpoint .* file .*jmain.java, line 4\."
gdb_load "${binfile}"
-setup_kfail *-*-* java/1567
+setup_kfail java/1567 *-*-*
gdb_test "break main" "${bpmain}"
# Check that an unqualified "main" works.
gdb_load "${binfile}"
-setup_kfail *-*-* java/1565
+setup_kfail java/1565 *-*-*
gdb_test "break jmain.main" "${bpmain}"
# Check that a fully qualified "main" works.
Index: gdb.pascal/types.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.pascal/types.exp,v
retrieving revision 1.6
diff -u -r1.6 types.exp
--- gdb.pascal/types.exp 5 May 2010 18:07:02 -0000 1.6
+++ gdb.pascal/types.exp 25 May 2010 21:00:18 -0000
@@ -61,7 +61,7 @@
# Test various character values.
- setup_kfail *-*-* gdb/2326
+ setup_kfail gdb/2326 *-*-*
gdb_test "pt 'a simple string'" "type = string"
}