[v2,1/2] testsuite, mi: fix indentation in get_mi_thread_list

Message ID 20240229154906.3354860-1-tankut.baris.aktemur@intel.com
State New
Headers
Series [v2,1/2] testsuite, mi: fix indentation in get_mi_thread_list |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 fail Testing failed

Commit Message

Aktemur, Tankut Baris Feb. 29, 2024, 3:49 p.m. UTC
  The `get_mi_thread_list` procedure's body is incorrectly indented.
Fix it.

One line is still too long, but we don't care to break it.  The next
patch will change it.
---
 gdb/testsuite/lib/mi-support.exp | 58 ++++++++++++++++----------------
 1 file changed, 29 insertions(+), 29 deletions(-)
  

Patch

diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index b3a27efb155..33a3a71b396 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1953,40 +1953,40 @@  proc mi_run_inline_test { testcase } {
 }
 
 proc get_mi_thread_list {name} {
-  global expect_out
+    global expect_out
 
-  # MI will return a list of thread ids:
-  #
-  # -thread-list-ids
-  # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
-  # (gdb)
-  mi_gdb_test "-thread-list-ids" \
-    {.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \
-    "-thread_list_ids ($name)"
+    # MI will return a list of thread ids:
+    #
+    # -thread-list-ids
+    # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N"
+    # (gdb)
+    mi_gdb_test "-thread-list-ids" \
+	{.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \
+	"-thread_list_ids ($name)"
 
-  set output {}
-  if {[info exists expect_out(buffer)]} {
-    set output $expect_out(buffer)
-  }
+    set output {}
+    if {[info exists expect_out(buffer)]} {
+	set output $expect_out(buffer)
+    }
 
-  set thread_list {}
-  if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
-    fail "finding threads in MI output ($name)"
-  } else {
-    pass "finding threads in MI output ($name)"
-
-    # Make list of console threads
-    set start [expr {[string first \{ $threads] + 1}]
-    set end   [expr {[string first \} $threads] - 1}]
-    set threads [string range $threads $start $end]
-    foreach thread [split $threads ,] {
-      if {[scan $thread {thread-id="%d"} num]} {
-	lappend thread_list $num
-      }
+    set thread_list {}
+    if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
+	fail "finding threads in MI output ($name)"
+    } else {
+	pass "finding threads in MI output ($name)"
+
+	# Make list of console threads
+	set start [expr {[string first \{ $threads] + 1}]
+	set end   [expr {[string first \} $threads] - 1}]
+	set threads [string range $threads $start $end]
+	foreach thread [split $threads ,] {
+	    if {[scan $thread {thread-id="%d"} num]} {
+		lappend thread_list $num
+	    }
+	}
     }
-  }
 
-  return $thread_list
+    return $thread_list
 }
 
 # Check that MI and the console know of the same threads.