[PATCH] Fixes for gdb.mi/mi-break.exp

Carl Love cel@us.ibm.com
Thu Oct 21 16:28:04 GMT 2021


GDB maintainers:

The gdb.mi/mi-break.exp test has 8 fails on Intel and PowerPC.  The
following patch fixes the failures on both architectures.  Two of the
expected test strings are updated in the patch.  The other issue is
matching the \" pattern doesn't work.  The \" is replaced with .* to
match the characters in those locations.

Please let me know if the patch is acceptable for mainline.  Thanks.

                 Carl Love

-----------------------------------------------------------------
Fixes for gdb.mi/mi-break.exp

Update the expected pattern for two of the tests.

Matching pattern \" doesn't work.  Use .*  to match the \* pattern.
---
 gdb/testsuite/gdb.mi/mi-break.exp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp
index 86916c42c16..b72909146aa 100644
--- a/gdb/testsuite/gdb.mi/mi-break.exp
+++ b/gdb/testsuite/gdb.mi/mi-break.exp
@@ -389,7 +389,7 @@ proc_with_prefix test_explicit_breakpoints {} {
     # linespecs.
     mi_gdb_test \
 	"-break-insert -c \"foo == 3\" --source $srcfile --function main --label label" \
-	".*No symbol \"foo\" in current context.*"
+	".*No label .*label.* defined in function .*main.*"
 
     mi_gdb_test \
 	"-break-insert --source foobar.c --line 3" \
@@ -397,15 +397,15 @@ proc_with_prefix test_explicit_breakpoints {} {
 
     mi_gdb_test \
 	"-break-insert --source $srcfile --function foobar" \
-	".*Function \"foobar\" not defined in \"$srcfile\".*"
+	".*Function .*foobar.* not defined in .*$srcfile.*"
 
     mi_gdb_test \
 	"-break-insert --source $srcfile --function main --label foobar" \
-	".*No label \"foobar\" defined in function \"main\".*"
+	".*No label .*foobar.* defined in function .*main.*"
 
     mi_gdb_test \
 	"-break-insert --source $srcfile" \
-	".*Source filename requires function, label, or line offset.*"
+	".*-break-insert: --source option requires --function, --label, or --line.*"
 }
 
 # Test forcing an invalid condition.
-- 
2.30.2




More information about the Gdb-patches mailing list