]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: use gdb_test_no_output when dumping in gdb.base/dump.exp
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 25 Aug 2025 15:44:22 +0000 (11:44 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 28 Aug 2025 17:36:30 +0000 (13:36 -0400)
I don't know if this is true on all platforms, but from what I can see
on Linux, the dump commands don't output anything.  Use
gdb_test_no_output, which should be a bit more robust than checking for
some specific error patterns.

Change-Id: Idc82298c4752ba7808659dfea2f8324c8a97052d
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/dump.exp

index a55e5b060db75af49f99c43f6438412c71b35d45..7c84056dfa69cf2b78b6892736f6f51cadc9e8c7 100644 (file)
@@ -107,14 +107,7 @@ set endian [get_endianness]
 # Now generate some dump files.
 
 proc make_dump_file { command msg } {
-  global gdb_prompt
-
-    gdb_test_multiple "${command}" "$msg" {
-       -re ".*\[Ee\]rror.*$gdb_prompt $"      { fail $msg }
-       -re ".*\[Ww\]arning.*$gdb_prompt $"    { fail $msg }
-       -re ".*\[Uu\]ndefined .*$gdb_prompt $" { fail $msg }
-       -re ".*$gdb_prompt $"                  { pass $msg }
-    }
+    gdb_test_no_output "${command}" "$msg"
 }
 
 make_dump_file "dump val [set intarr1.bin] intarray" \