public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Question on the gdb.cp/no-dmgl-verbose.exp test
@ 2022-03-30 21:48 Carl Love
  0 siblings, 0 replies; only message in thread
From: Carl Love @ 2022-03-30 21:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: cel, Will Schmidt, Rogerio Alves


GDB maintainers:

I was looking at the gdb.cp/no-dmgl-verbose.exp.  It fails on both
Powerpc and on Intel.  The test was added on July 1, 2011.  

The syntax of the gdb_test doesn't look correct to me.  I tried
contacting the original author (jan.kratochvil@redhat.com) but he is no
longer with Red Hat.  I put together the following patch to fix the
test.  I was hoping to check with the original author to make sure the
changes are consistent with the intent of the test.  I think they are. 

The patch fixes the failures on both Intel and Power.  Please let me
know if you agree that this is a valid fix or if you think this patch
is not consistent with the intent of the patch.   Thanks.

                      Carl Love
-----------------------------------------------------------------
Fix gdb.cp/no-dmgl-verbose.exp test

The test tries to check that setting a break point on f (std::string) fails
since the function is not defined.  The test is not correctly defined.

This patch fixes the test to set the breakpoint and verify that it fails
since the function is not defined.
---
 gdb/testsuite/gdb.cp/no-dmgl-verbose.exp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp b/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp
index 14f11ddcf04..d4ec88f3b6d 100644
--- a/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp
+++ b/gdb/testsuite/gdb.cp/no-dmgl-verbose.exp
@@ -28,8 +28,5 @@ clean_restart ${testfile}.o
 
 gdb_test_no_output "set breakpoint pending off"
 
-gdb_breakpoint {'f(std::string)'}
-
-gdb_test {break 'f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'} \
-	 {Function ".*" not defined\.} \
+gdb_test "break 'f(std::string)'" ".*Function.*not defined." \
 	 "DMGL_VERBOSE-demangled f(std::string) is not defined"
-- 
2.31.1



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-30 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30 21:48 Question on the gdb.cp/no-dmgl-verbose.exp test Carl Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).