[PATCH] minor fixes for python finish breakpoint testcases
Edjunior Barbosa Machado
emachado@linux.vnet.ibm.com
Thu Dec 29 21:51:00 GMT 2011
Hi,
this patch fixes some minor issues found on these 2 new testcases. For
py-finish-breakpoint.exp, it expects the leading `.' found on ppc64's symbols
and adds the newline missing at the end of file. For py-finish-breakpoint2.exp,
it skips the tests if python support is not enabled.
BTW, py-finish-breakpoint2.exp still shows some failures on ppc64 when python
support is enabled but I still haven't figured out what is the problem.
FAIL: gdb.python/py-finish-breakpoint2.exp: check FinishBreakpoint in catch()
FAIL: gdb.python/py-finish-breakpoint2.exp: check finish BP removal
FAIL: gdb.python/py-finish-breakpoint2.exp: continue to second exception
FAIL: gdb.python/py-finish-breakpoint2.exp: set FinishBP after the exception
Thanks,
--
Edjunior
2011-12-29 Edjunior Machado <emachado@linux.vnet.ibm.com>
gdb/testsuite/
* gdb.python/py-finish-breakpoint.exp: Add `.' prefix for ppc64. Add
newline at end of file.
* gdb.python/py-finish-breakpoint2.exp: Skip testcase if python support
is not enabled.
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
index c7a42a2..42488ba 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp
@@ -118,7 +118,8 @@ if ![runto_main] then {
gdb_test "print do_nothing" "no debug info.*" "ensure that shared lib has no debug info"
gdb_breakpoint "do_nothing" {temporary}
-gdb_test "continue" "Temporary breakpoint .*in do_nothing.*" "continue to do_nothing"
+gdb_test "continue" "Temporary breakpoint .*in \\.?do_nothing.*" \
+ "continue to do_nothing"
gdb_test "python finishBP = SimpleFinishBreakpoint(gdb.newest_frame())" \
"SimpleFinishBreakpoint init" \
@@ -262,4 +263,4 @@ if ![runto "test_exec_exit"] then {
gdb_test_no_output "set var do_exit = 0" "switch to execve() test"
gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exec"
gdb_test "catch exec" "Catchpoint.*\(exec\).*" "catch exec"
-gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec"
\ No newline at end of file
+gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec"
diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
index 433d1e6..451cc90 100644
--- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
+++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
@@ -38,6 +38,9 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
if ![runto_main] then {
fail "Cannot run to main."
return 0
More information about the Gdb-patches
mailing list