* [patch] more gdb.c++/templates.exp failures
@ 2003-03-03 22:44 David Carlton
2003-03-04 1:01 ` David Carlton
0 siblings, 1 reply; 3+ messages in thread
From: David Carlton @ 2003-03-03 22:44 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Elizabeth Chastain, Daniel Jacobowitz
This patch converts some more gdb.c++/templates.exp failures (seen
under GCC 3.1, DWARF 2).
"ptype T5<int>" and "ptype t5i" give the same output; they suffer from
gdb/1111 and gdb/1113. I KFAILed them with respect to the former,
mentioning the latter in a comment.
"constructor breakpoint" triggers gdb/1062.
"destructor breakpoint" triggers gdb/1112. I changed this from
gdb_test into send_gdb/gdb_expect instead of gdb_test_multiple. I
realize this makes me a bad person; one of these days I'll play around
with gdb_test_multiple, honest I will.
"print Garply<Garply<char> >::garply" isn't a bug at all: as happened
with one of the classes.exp tests, GDB prints out a 'const' in a
situation where that's perfectly appropriate.
Tested on i686-pc-linux-gnu/GCC3.1/DWARF-2; on that platform, "runtest
gdb.c++/*.exp" prints the following happy output:
=== gdb Summary ===
# of expected passes 1608
# of known failures 25
/extra/gdb/mirror/src/gdb/testsuite/../../gdb/gdb version 2003-03-03-cvs -nx
I'm planning to commit these tomorrow unless somebody objects.
David Carlton
carlton@math.stanford.edu
2003-03-03 David Carlton <carlton@math.stanford.edu>
* gdb.c++/templates.exp (do_tests): Accept valid const in "print
Garply<Garply<char> >:: garply".
(test_ptype_of_templates): KFAIL "ptype T5<int>" and "ptype t5i"
with respect to PR c++/1111; note also PR c++/1113.
(test_template_breakpoints): KFAIL "constructor breakpoint" with
respect to PR c++/1062.
KFAIL "destructor breakpoint" with respect to PR c++/1112.
Index: templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.exp,v
retrieving revision 1.17
diff -u -p -r1.17 templates.exp
--- templates.exp 3 Mar 2003 18:39:47 -0000 1.17
+++ templates.exp 3 Mar 2003 22:35:31 -0000
@@ -61,6 +61,10 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int> (obsolescent gcc or gdb)"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ # This also triggers gdb/1113...
+ kfail "gdb/1111" "ptype T5<int>"
+ }
-re ".*$gdb_prompt $" {
fail "ptype T5<int>"
}
@@ -83,6 +87,10 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i (obsolescent gcc or gdb)"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ # This also triggers gdb/1113...
+ kfail "gdb/1111" "ptype T5<int>"
+ }
-re ".*$gdb_prompt $" {
fail "ptype t5i"
}
@@ -114,6 +122,12 @@ proc test_template_breakpoints {} {
"canceled" \
"constructor breakpoint"
}
+ -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5 at .*\[\r\n\]*.3. T5 at .*\[\r\n\]*> $" {
+ setup_kfail "gdb/1062" "*-*-*"
+ gdb_test "0" \
+ "nonsense intended to insure that this test fails" \
+ "constructor breakpoint"
+ }
-re ".*\n> $" {
gdb_test "0" \
"nonsense intended to insure that this test fails" \
@@ -125,9 +139,26 @@ proc test_template_breakpoints {} {
# See CLLbs14792
if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792}
- gdb_test "break T5<int>::~T5" \
- "Breakpoint.*at.* file .*${testfile}.cc, line.*" \
- "destructor breakpoint"
+
+ send_gdb "break T5<int>::~T5\n"
+ gdb_expect {
+ -re "Breakpoint.*at.* file .*${testfile}.cc, line.*$gdb_prompt $"
+ {
+ pass "destructor breakpoint"
+ }
+ -re "the class `T5<int>' does not have destructor defined\r\nHint: try 'T5<int>::~T5<TAB> or 'T5<int>::~T5<ESC-\\?>\r\n\\(Note leading single quote.\\)\r\n$gdb_prompt $"
+ {
+ kfail "gdb/1112" "destructor breakpoint"
+ }
+ -re ".*$gdb_prompt $"
+ {
+ fail "destructor breakpoint"
+ }
+ timeout
+ {
+ fail "destructor breakpoint (timeout)"
+ }
+ }
gdb_test "break T5<int>::value" \
"Breakpoint.*at.* file .*${testfile}.cc, line.*" \
@@ -479,7 +510,7 @@ gdb_expect {
send_gdb "print Garply<Garply<char> >::garply\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*, int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>\[ \t\]*>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
+ -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*(| const), int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>\[ \t\]*>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
-re ".*$gdb_prompt $" { fail "print Garply<Garply<char> >::garply" }
timeout { fail "print Garply<Garply<char> >::garply (timeout)" }
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] more gdb.c++/templates.exp failures
2003-03-03 22:44 [patch] more gdb.c++/templates.exp failures David Carlton
@ 2003-03-04 1:01 ` David Carlton
2003-03-04 17:03 ` David Carlton
0 siblings, 1 reply; 3+ messages in thread
From: David Carlton @ 2003-03-04 1:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Elizabeth Chastain, Daniel Jacobowitz
On 03 Mar 2003 14:44:38 -0800, David Carlton <carlton@math.Stanford.EDU> said:
> "destructor breakpoint" triggers gdb/1112. I changed this from
> gdb_test into send_gdb/gdb_expect instead of gdb_test_multiple. I
> realize this makes me a bad person; one of these days I'll play around
> with gdb_test_multiple, honest I will.
Daniel's given me enough hand-holding so that I'll use
gdb_test_multiple (which, after all, really is easier to use than
send_gdb/gdb_expect); new version of the patch is below.
David Carlton
carlton@math.stanford.edu
2003-03-03 David Carlton <carlton@math.stanford.edu>
* gdb.c++/templates.exp (do_tests): Accept valid const in "print
Garply<Garply<char> >:: garply".
(test_ptype_of_templates): KFAIL "ptype T5<int>" and "ptype t5i"
with respect to PR c++/1111; note also PR c++/1113.
(test_template_breakpoints): KFAIL "constructor breakpoint" with
respect to PR c++/1062.
KFAIL "destructor breakpoint" with respect to PR c++/1112.
Index: templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.exp,v
retrieving revision 1.17
diff -u -p -r1.17 templates.exp
--- templates.exp 3 Mar 2003 18:39:47 -0000 1.17
+++ templates.exp 4 Mar 2003 01:00:11 -0000
@@ -61,6 +61,10 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\((T5<int> const|const T5<int>) ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype T5<int> (obsolescent gcc or gdb)"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ # This also triggers gdb/1113...
+ kfail "gdb/1111" "ptype T5<int>"
+ }
-re ".*$gdb_prompt $" {
fail "ptype T5<int>"
}
@@ -83,6 +87,10 @@ proc test_ptype_of_templates {} {
-re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;((${ws}T5<int> & operator=\\(T5<int> const ?&\\);)|(${ws}T5\\(int\\);)|(${ws}T5\\(T5<int> const ?&\\);)|(${ws}~T5\\((void|)\\);)|(${ws}static void \\* operator new\\(unsigned( int| long)?\\);)|(${ws}static void operator delete\\(void ?\\*\\);)|(${ws}int value\\((void|)\\);))*${ws}\}\r\n$gdb_prompt $" {
pass "ptype t5i (obsolescent gcc or gdb)"
}
+ -re "type = class T5<int> \{${ws}public:${ws}static int X;${ws}int x;${ws}int val;${ws}void T5\\(int\\);${ws}void T5\\((T5<int> const|const T5<int>) ?&\\);${ws}~T5\\(int\\);${ws}static void \\* operator new\\(unsigned\\);${ws}static void operator delete\\(void ?\\*\\);${ws}int value\\((void|)\\);${ws}\}\r\n$gdb_prompt $" {
+ # This also triggers gdb/1113...
+ kfail "gdb/1111" "ptype T5<int>"
+ }
-re ".*$gdb_prompt $" {
fail "ptype t5i"
}
@@ -114,6 +122,12 @@ proc test_template_breakpoints {} {
"canceled" \
"constructor breakpoint"
}
+ -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5 at .*\[\r\n\]*.3. T5 at .*\[\r\n\]*> $" {
+ setup_kfail "gdb/1062" "*-*-*"
+ gdb_test "0" \
+ "nonsense intended to insure that this test fails" \
+ "constructor breakpoint"
+ }
-re ".*\n> $" {
gdb_test "0" \
"nonsense intended to insure that this test fails" \
@@ -125,9 +139,17 @@ proc test_template_breakpoints {} {
# See CLLbs14792
if {$hp_aCC_compiler} {setup_xfail hppa*-*-* CLLbs14792}
- gdb_test "break T5<int>::~T5" \
- "Breakpoint.*at.* file .*${testfile}.cc, line.*" \
- "destructor breakpoint"
+
+ gdb_test_multiple "break T5<int>::~T5" "destructor_breakpoint" {
+ -re "Breakpoint.*at.* file .*${testfile}.cc, line.*$gdb_prompt $"
+ {
+ pass "destructor breakpoint"
+ }
+ -re "the class `T5<int>' does not have destructor defined\r\nHint: try 'T5<int>::~T5<TAB> or 'T5<int>::~T5<ESC-\\?>\r\n\\(Note leading single quote.\\)\r\n$gdb_prompt $"
+ {
+ kfail "gdb/1112" "destructor breakpoint"
+ }
+ }
gdb_test "break T5<int>::value" \
"Breakpoint.*at.* file .*${testfile}.cc, line.*" \
@@ -479,7 +501,7 @@ gdb_expect {
send_gdb "print Garply<Garply<char> >::garply\n"
gdb_expect {
- -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*, int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>\[ \t\]*>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
+ -re "\\$\[0-9\]* = \\{(class |)Garply<char> \\((class |)Garply<Garply<char> > \\*(| const), int, (class |)Garply<char>\\)\\} $hex <Garply<Garply<char>\[ \t\]*>::garply\\(int, (class |)Garply<char>\\)>\r\n$gdb_prompt $" { pass "print Garply<Garply<char> >::garply" }
-re ".*$gdb_prompt $" { fail "print Garply<Garply<char> >::garply" }
timeout { fail "print Garply<Garply<char> >::garply (timeout)" }
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] more gdb.c++/templates.exp failures
2003-03-04 1:01 ` David Carlton
@ 2003-03-04 17:03 ` David Carlton
0 siblings, 0 replies; 3+ messages in thread
From: David Carlton @ 2003-03-04 17:03 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Elizabeth Chastain, Daniel Jacobowitz
On 03 Mar 2003 17:01:52 -0800, David Carlton <carlton@math.Stanford.EDU> said:
> Daniel's given me enough hand-holding so that I'll use
> gdb_test_multiple (which, after all, really is easier to use than
> send_gdb/gdb_expect); new version of the patch is below.
Committed. So now if anybody else needs a model for using
gdb_test_multiple, just look in gdb.c++/templates.exp.
David Carlton
carlton@math.stanford.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-04 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-03 22:44 [patch] more gdb.c++/templates.exp failures David Carlton
2003-03-04 1:01 ` David Carlton
2003-03-04 17:03 ` David Carlton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox