From: Tom de Vries Date: Fri, 5 Sep 2025 06:37:30 +0000 (+0200) Subject: [gdb/testsuite] Fix silent timeout in allow_aarch64_gcs_tests X-Git-Tag: gdb-17-branchpoint~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=957e3edfc02311bffebbea79c2e09f2b7b4cb8cb;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix silent timeout in allow_aarch64_gcs_tests I noticed on M1 aarch64-linux that test-case gdb.testsuite/gdb-caching-proc-consistency.exp took a long time. I saw lack of progress in gdb.log for proc allow_aarch64_gcs_tests. This gdb_expect only handles the case that gcs support is detected: ... gdb_expect { -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { verbose -log "\n$me: gcs support detected" set allow_gcs_tests 1 } } ... but in my case, I get: ... (gdb) run ^M Starting program: allow_aarch64_gcs_tests.x ^M [Thread debugging using libthread_db enabled]^M Using host libthread_db library "/lib64/libthread_db.so.1".^M [Inferior 1 (process 3336556) exited with code 01]^M (gdb) ... so the gdb_expect times out quietly, taking 10 seconds. In the test-case, it does so 11 times. Fix this by adding a gdb_expect clause handling the "with code 01" case. Tested on aarch64-linux. PR testsuite/33378 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33378 --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index fe4178ebba7..e67779a2608 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5376,6 +5376,9 @@ gdb_caching_proc allow_aarch64_gcs_tests {} { verbose -log "\n$me: gcs support detected" set allow_gcs_tests 1 } + -re ".*$inferior_exited_re with code 01.*${gdb_prompt} $" { + verbose -log "\n$me: gcs support not detected" + } } gdb_exit remote_file build delete $obj