]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Fix silent timeout in allow_aarch64_gcs_tests
authorTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 06:37:30 +0000 (08:37 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 5 Sep 2025 06:37:30 +0000 (08:37 +0200)
commit957e3edfc02311bffebbea79c2e09f2b7b4cb8cb
tree3d53a87cc4abf57927d44e1ccee53028ef0f73d3
parent496e01123d85e3a8c3d8fabae11867206e15cc1e
[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
gdb/testsuite/lib/gdb.exp