[dictionary] testsuite tweaks
David Carlton
carlton@bactrian.org
Sat May 10 00:21:00 GMT 2003
This contains some minor tweaks to the new tests I've added on the
branch recently, and makes sure that I run them frequently.
David Carlton
carlton@bactrian.org
2003-05-09 David Carlton <carlton@bactrian.org>
* carlton_runnamespace: Run gdb.c++/rtti.exp, too.
* carlton_runtest (FASTTESTS): Add gdb.c++/breakpoint.exp and
gdb.c++/rtti.exp.
* gdb.c++/breakpoint.exp (test_breakpoint): Run to main for every
breakpoint.
* gdb.c++/rtti.exp: Add more KFAIL branches.
Index: testsuite/carlton_runnamespace
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/Attic/carlton_runnamespace,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 carlton_runnamespace
--- testsuite/carlton_runnamespace 28 Nov 2002 00:53:25 -0000 1.1.2.4
+++ testsuite/carlton_runnamespace 10 May 2003 00:19:46 -0000
@@ -6,13 +6,14 @@
# stabs info, too?
EXTRADEBUGPATH=/usr/local/testbed/gcc3/bin
+TESTS="gdb.c++/namespace.exp gdb.c++/rtti.exp"
echo "Running tests using regular compiler."
-runtest gdb.c++/namespace.exp > /dev/null 2>&1
+runtest ${TESTS} > /dev/null 2>&1
grep -v "^Test Run By" gdb.sum > /tmp/namespaceout
diff -u {carlton_,/tmp/}namespaceout
echo "Running tests using compiler with extra debug info."
-PATH=${EXTRADEBUGPATH}:${PATH} runtest gdb.c++/namespace.exp > /dev/null 2>&1
+PATH=${EXTRADEBUGPATH}:${PATH} runtest ${TESTS} > /dev/null 2>&1
grep -v "^Test Run By" gdb.sum > /tmp/namespacedebugout
diff -u {carlton_,/tmp/}namespacedebugout
Index: testsuite/carlton_runtest
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/Attic/carlton_runtest,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 carlton_runtest
--- testsuite/carlton_runtest 28 Nov 2002 00:53:25 -0000 1.1.2.3
+++ testsuite/carlton_runtest 10 May 2003 00:19:46 -0000
@@ -24,7 +24,9 @@ FASTTESTS="gdb.base/assign.exp \
gdb.c++/local.exp \
gdb.c++/m-data.exp \
gdb.c++/m-static.exp \
- gdb.c++/method.exp"
+ gdb.c++/method.exp \
+ gdb.c++/breakpoint.exp \
+ gdb.c++/rtti.exp"
# 6 seconds or more (usually around 10).
MEDTESTS="gdb.base/exprs.exp \
Index: testsuite/gdb.c++/breakpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/Attic/breakpoint.exp,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 breakpoint.exp
--- testsuite/gdb.c++/breakpoint.exp 9 May 2003 18:28:53 -0000 1.1.2.1
+++ testsuite/gdb.c++/breakpoint.exp 10 May 2003 00:19:46 -0000
@@ -53,13 +53,15 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
proc test_breakpoint {name} {
- gdb_breakpoint "${name}"
- gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
-}
-
-if ![runto_main] then {
- perror "couldn't run to breakpoint"
- continue
+ # Restart the program every time, so that a single failure doesn't
+ # lead to a cascade.
+ if ![runto_main] then {
+ perror "couldn't run to main when testing ${name}"
+ continue
+ } else {
+ gdb_breakpoint "${name}"
+ gdb_test "continue" "Continuing.\r\n\r\nBreakpoint \[0-9\]*, ${name}.*" "continue to ${name}"
+ }
}
test_breakpoint "C1::Nested::foo"
Index: testsuite/gdb.c++/rtti.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/Attic/rtti.exp,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 rtti.exp
--- testsuite/gdb.c++/rtti.exp 2 May 2003 17:55:19 -0000 1.1.2.1
+++ testsuite/gdb.c++/rtti.exp 10 May 2003 00:19:46 -0000
@@ -88,13 +88,21 @@ gdb_test_multiple "print *e1" "print *e1
-re "\\$\[0-9\]* = {<n1::Base1> = .*}\r\n$gdb_prompt $" {
pass "print *e1"
}
+ -re "\\$\[0-9\]* = {<.*Base1> = .*}\r\n$gdb_prompt $" {
+ # NOTE: carlton/2003-05-09: Sometimes, the DWARF reader gets
+ # confused about names. I've seen just Base1 or
+ # n1::D1::C1::Base1.
+ kfail "gdb/TBA" "print *e2"
+ }
}
# NOTE: carlton/2003-05-02: This test fails on my branch because,
# within rtt1.cc, GDB has no way of knowing that the class is called
# 'n2::D2' instead of just 'D2'. This is an artifical test case,
# though: if we were using these classes in a more substantial way,
-# G++ would emit more debug info.
+# G++ would emit more debug info. Arguably, the "incomplete type"
+# kfail should really be an xfail, because it works using a compiler
+# that generates DW_TAG_namespace tags.
gdb_test_multiple "print *e2" "print *e2" {
-re "warning: can't find class named `n2::D2', as given by C\\+\\+ RTTI.*$gdb_prompt $" {
@@ -105,6 +113,9 @@ gdb_test_multiple "print *e2" "print *e2
}
-re "\\$\[0-9\]* = {<n2::Base2> = .*}\r\n$gdb_prompt $" {
pass "print *e2"
+ }
+ -re "\\$\[0-9\]* = {<.*Base2> = .*}\r\n$gdb_prompt $" {
+ kfail "gdb/TBA" "print *e2"
}
}
More information about the Gdb-patches
mailing list