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
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