Skip to content
Snippets Groups Projects
Commit 59132fd9 authored by Tom Tromey's avatar Tom Tromey Committed by Tom Tromey
Browse files

Handle SIGSEGV in gdb selftests

The gdb.gdb self-tests were timing out for me, which turned out to be
PR testsuite/29325.  Looking into it, the problem is that the version
of the Boehm GC that is used by Guile on my machine causes a SEGV
during stack probing.  This unexpected stop confuses the tests and
causes repeated timeouts.

This patch adapts the two failing tests.  This makes them work for me,
and reduces the running time of gdb.gdb from 20 minutes to about 11
seconds.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29325
parent b19d96d1
No related branches found
No related tags found
No related merge requests found
...@@ -93,6 +93,12 @@ proc test_python_helper {} { ...@@ -93,6 +93,12 @@ proc test_python_helper {} {
# here. # here.
gdb_test_multiple "continue" "start inner gdb" { gdb_test_multiple "continue" "start inner gdb" {
-i "$inferior_spawn_id" -i "$inferior_spawn_id"
-re "received signal SIGSEGV.* in GC_.*$outer_prompt_re" {
# Some versions of the GC used by Guile cause a SEGV
# during stack probing. Ignore this and carry on.
send_gdb "continue\n"
exp_continue
}
-re "\r\n$gdb_prompt $" { -re "\r\n$gdb_prompt $" {
pass $gdb_test_name pass $gdb_test_name
} }
......
...@@ -75,6 +75,12 @@ proc test_with_self { } { ...@@ -75,6 +75,12 @@ proc test_with_self { } {
set test "xgdb is at prompt" set test "xgdb is at prompt"
gdb_test_multiple "continue" $test { gdb_test_multiple "continue" $test {
-i "$inferior_spawn_id" -i "$inferior_spawn_id"
-re "received signal SIGSEGV.* in GC_.*$gdb_prompt" {
# Some versions of the GC used by Guile cause a SEGV
# during stack probing. Ignore this and carry on.
send_gdb "continue\n"
exp_continue
}
-re "$banner" { -re "$banner" {
pass $test pass $test
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment