[RFA] XFAILing stepping out of signal handler tests on OpenBSD/mips64

Mark Kettenis mark.kettenis@xs4all.nl
Tue May 10 14:06:00 GMT 2011


Like many other OpenBSD hardware platforms the 64-bit MIPS varieties
don't support stepping into the signal handler because it is on a
read-only page.  But because single-stepping is "emulated" by the
kernel, the failure manifests itself a little bit differently than on
SPARC.  Given that these failures lead to an infinite loop I'd like to
XFAIL or KFAIL these tests.  The diff below XFAILs them, since this
really is a limitation caused by the OpenBSD kernel.  However if
people think KFAIL is more appropriate here, I can change the diff
accordingly.


2011-05-10  Mark Kettenis  <kettenis@gnu.org>

	* gdb.base/sigbpt.exp (stepi_out): Add xfail for mips*-*-openbsd*
	where we can't single step into the signal trampoline.
	* gdb.base/sigstep.exp (advance, advancei): Likewise.
	* gdb.base/siginfo.exp: Likewise.


Index: gdb.base/sigbpt.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigbpt.exp,v
retrieving revision 1.22
diff -u -p -r1.22 sigbpt.exp
--- gdb.base/sigbpt.exp	1 Jan 2011 15:33:42 -0000	1.22
+++ gdb.base/sigbpt.exp	10 May 2011 13:50:58 -0000
@@ -174,6 +174,10 @@ proc stepi_out { name args } {
 	    setup_kfail gdb/1736 "sparc*-*-openbsd*"
 	    fail "$test (could not insert single-step breakpoint)"
 	}
+	-re "ptrace: Bad address.*$gdb_prompt $" {
+	    setup_xfail "mips*-*-openbsd*"
+	    fail "$test (could not single-step into trampoline)"
+	}
 	-re "keeper.*$gdb_prompt $" {
 	    send_gdb "stepi\n"
 	    exp_continue
Index: gdb.base/siginfo.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/siginfo.exp,v
retrieving revision 1.14
diff -u -p -r1.14 siginfo.exp
--- gdb.base/siginfo.exp	7 Mar 2011 16:03:02 -0000	1.14
+++ gdb.base/siginfo.exp	10 May 2011 13:50:58 -0000
@@ -75,6 +75,10 @@ gdb_test_multiple "step" "${test}" {
 	setup_kfail gdb/1736 sparc*-*-openbsd*
 	fail "$test (could not insert single-step breakpoint)"
     }
+    -re "ptrace: Bad address.*$gdb_prompt $" {
+	setup_xfail "mips*-*-openbsd*"
+	fail "$test (could not single-step into trampoline)"
+    }
     -re "done = 1;.*${gdb_prompt} $" {
 	send_gdb "$i\n"
 	exp_continue
Index: gdb.base/sigstep.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigstep.exp,v
retrieving revision 1.25
diff -u -p -r1.25 sigstep.exp
--- gdb.base/sigstep.exp	7 Mar 2011 16:03:02 -0000	1.25
+++ gdb.base/sigstep.exp	10 May 2011 13:50:58 -0000
@@ -80,6 +80,10 @@ proc advance { i } {
 	    setup_kfail gdb/1736 "sparc*-*-openbsd*"
 	    fail "$test (could not insert single-step breakpoint)"
 	}
+	-re "ptrace: Bad address.*$gdb_prompt $" {
+	    setup_xfail "mips*-*-openbsd*"
+	    fail "$test (could not single-step into trampoline)"
+	}
 	-re "done = 1;.*${gdb_prompt} $" {
 	    send_gdb "$i\n"
 	    exp_continue -continue_timer
@@ -127,6 +131,10 @@ proc advancei { i } {
 	    setup_kfail gdb/1736 "sparc*-*-openbsd*"
 	    fail "$test (could not insert single-step breakpoint)"
 	}
+	-re "ptrace: Bad address.*$gdb_prompt $" {
+	    setup_xfail "mips*-*-openbsd*"
+	    fail "$test (could not single-step into trampoline)"
+	}
 	-re "Breakpoint \[0-9\]*, handler .*${gdb_prompt} $" {
 	    fail "$test (hit breakpoint again)"
 	}
@@ -156,6 +164,10 @@ proc advancei { i } {
 
     set test "$prefix; leave signal trampoline"
     gdb_test_multiple "$i" "${test}" {
+	-re "ptrace: Bad address.*$gdb_prompt $" {
+	    setup_xfail "mips*-*-openbsd*"
+	    fail "$test (could not single-step into trampoline)"
+	}
 	-re "while .*${gdb_prompt} $" {
 	    pass "$test (in main)"
 	}



More information about the Gdb-patches mailing list