From: Tom de Vries Date: Wed, 27 Aug 2025 08:49:19 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.server/non-existing-program.exp on msys2-ucrt64 X-Git-Tag: gdb-17-branchpoint~163 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23cdb9da3b64a1b396e6053d0b13f9da9abfb44c;p=thirdparty%2Fbinutils-gdb.git [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). --- diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index 7119723ce52..ec9c044c018 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 }