aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-08-27 10:49:19 +0200
committerTom de Vries <tdevries@suse.de>2025-08-27 10:49:19 +0200
commit23cdb9da3b64a1b396e6053d0b13f9da9abfb44c (patch)
treefca5f620fb9203b062da766474ec3975d5368c56
parent793534c26924c986069b03ab1bd6659aead5065b (diff)
downloadbinutils-23cdb9da3b64a1b396e6053d0b13f9da9abfb44c.zip
binutils-23cdb9da3b64a1b396e6053d0b13f9da9abfb44c.tar.gz
binutils-23cdb9da3b64a1b396e6053d0b13f9da9abfb44c.tar.bz2
[gdb/testsuite] Fix gdb.server/non-existing-program.exp on msys2-ucrt64
On msys2-ucrt64, with test-case gdb.server/non-existing-program.exp I get: ... (gdb) quit^M gdb_caching_proc allow_xml_test caused gdb_exit to be called gdb_caching_proc allow_xml_test marked as called gdb_caching_proc get_mount_point_map marked as called builtin_spawn gdbserver stdio non-existing-program^M Error creating process "non-existing-program " (error 2): \ The system cannot find the file specified.^M^M Exiting^M^M FAIL: gdb.server/non-existing-program.exp: gdbserver exits cleanly ... This happens because this regexp fails to match: ... # This is what we get on Windows. -re "Error creating process\r\n\r\nExiting\r\n" { ... Fix this by updating the regexp. Tested on x86_64-w64-mingw32 (msys2-ucrt64).
-rw-r--r--gdb/testsuite/gdb.server/non-existing-program.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp
index 7119723..ec9c044 100644
--- a/gdb/testsuite/gdb.server/non-existing-program.exp
+++ b/gdb/testsuite/gdb.server/non-existing-program.exp
@@ -34,6 +34,8 @@ if { $gdbserver == "" } {
# to spawn the program before opening the connection.
set spawn_id [remote_spawn target "$gdbserver stdio non-existing-program"]
+set eol {[\r\n]}
+
set msg "gdbserver exits cleanly"
set saw_exiting 0
expect {
@@ -51,7 +53,7 @@ expect {
exp_continue
}
# This is what we get on Windows.
- -re "Error creating process\r\n\r\nExiting\r\n" {
+ -re "Error creating process.*$eol+Exiting$eol+" {
set saw_exiting 1
exp_continue
}