]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[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)
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

index fe4178ebba79fb2ff6b6c9730c2641e1ea347aa4..e67779a26087266e5cc607a00a6d878b47eb98aa 100644 (file)
@@ -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