aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-03-11 10:57:31 +0100
committerTom de Vries <tdevries@suse.de>2024-03-11 10:57:31 +0100
commit85041a8d518b4e0625b2bb1d007838dfd5cbe421 (patch)
treec8a0b4a4118f59dad808acce7bde906bdd1b6586
parent06360a5cbd9b3fbe177aa5892ce26dcda6960fb5 (diff)
downloadbinutils-85041a8d518b4e0625b2bb1d007838dfd5cbe421.zip
binutils-85041a8d518b4e0625b2bb1d007838dfd5cbe421.tar.gz
binutils-85041a8d518b4e0625b2bb1d007838dfd5cbe421.tar.bz2
gdb/testsuite: Reduce indentation in gdb.threads/threadcrash.exp
In test-case gdb.threads/threadcrash.exp we have an unnecessarily indented gdb_test_multiple: ... gdb_test_multiple "thread apply all backtrace" \ "Get thread information" -lbl { -re "#\[0-9\]+\\\?\\\?\[^\n\]*" { ... Fix this by moving the command into a variable, allowing the "gdb_test_multiple ... {" to fit on a single 80 chars line. Tested on arm-linux and x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.threads/threadcrash.exp116
1 files changed, 58 insertions, 58 deletions
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 996e020..3d269ec 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -53,64 +53,64 @@ proc thread_apply_all {} {
set unwind_fail false
- gdb_test_multiple "thread apply all backtrace" \
- "Get thread information" -lbl {
- -re "#\[0-9\]+\\\?\\\?\[^\n\]*" {
- set unwind_fail true
- exp_continue
- }
- -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
- lappend test_list [multi_line ".*sleep.*" \
- ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
- ".*signal_handler.*" \
- ".*signal handler called.*" \
- ".*pthread_kill.*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" {
- lappend test_list [multi_line ".*sleep.*" \
- ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
- ".*signal_handler.*" \
- ".*signal handler called.*" \
- ".*pthread_kill.*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" {
- lappend test_list [multi_line ".*sleep.*" \
- ".*do_syscall_task .location=NORMAL.*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*spin_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
- lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \
- ".*signal_handler.*" \
- ".*signal handler called.*" \
- ".*pthread_kill.*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*spin_task .location=SIGNAL_HANDLER\[^\n\]*" {
- lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \
- ".*signal_handler.*" \
- ".*signal handler called.*" \
- ".*pthread_kill.*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*spin_task .location=NORMAL\[^\n\]*" {
- lappend test_list [multi_line ".*do_spin_task .location=NORMAL..*" \
- ".*thread_function.*"]
- exp_continue
- }
- -re "\[^\n\]*main\[^\n\]*" {
- lappend test_list ".*main.*"
- exp_continue
- }
- -re "$::gdb_prompt " {
- pass $gdb_test_name
- }
+ set cmd "thread apply all backtrace"
+ gdb_test_multiple $cmd "Get thread information" -lbl {
+ -re "#\[0-9\]+\\\?\\\?\[^\n\]*" {
+ set unwind_fail true
+ exp_continue
+ }
+ -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
+ lappend test_list [multi_line ".*sleep.*" \
+ ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \
+ ".*signal_handler.*" \
+ ".*signal handler called.*" \
+ ".*pthread_kill.*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" {
+ lappend test_list [multi_line ".*sleep.*" \
+ ".*do_syscall_task .location=SIGNAL_HANDLER.*" \
+ ".*signal_handler.*" \
+ ".*signal handler called.*" \
+ ".*pthread_kill.*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" {
+ lappend test_list [multi_line ".*sleep.*" \
+ ".*do_syscall_task .location=NORMAL.*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*spin_task .location=SIGNAL_ALT_STACK\[^\n\]*" {
+ lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \
+ ".*signal_handler.*" \
+ ".*signal handler called.*" \
+ ".*pthread_kill.*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*spin_task .location=SIGNAL_HANDLER\[^\n\]*" {
+ lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \
+ ".*signal_handler.*" \
+ ".*signal handler called.*" \
+ ".*pthread_kill.*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*spin_task .location=NORMAL\[^\n\]*" {
+ lappend test_list [multi_line ".*do_spin_task .location=NORMAL..*" \
+ ".*thread_function.*"]
+ exp_continue
+ }
+ -re "\[^\n\]*main\[^\n\]*" {
+ lappend test_list ".*main.*"
+ exp_continue
+ }
+ -re "$::gdb_prompt " {
+ pass $gdb_test_name
+ }
}
gdb_assert {$unwind_fail == false}