[01/11,gdb/testsuite] Normalize indentation in with_test_prefix

Message ID 20260824135855.1195963-2-tdevries@suse.de
State New
Headers
Series Refactor exception handling |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed

Commit Message

Tom de Vries Aug. 24, 2026, 1:58 p.m. UTC
  Normalize indentation in proc with_test_prefix to 4 spaces.
---
 gdb/testsuite/lib/gdb.exp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
  

Comments

Tom Tromey Sept. 2, 2026, 7:41 p.m. UTC | #1
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Normalize indentation in proc with_test_prefix to 4 spaces.

Thanks.  This kind of thing can be done as obvious FWIW.
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Tom de Vries Sept. 4, 2026, 9:48 a.m. UTC | #2
On 9/2/26 9:41 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> Normalize indentation in proc with_test_prefix to 4 spaces.
> 
> Thanks.  This kind of thing can be done as obvious FWIW.
> Approved-By: Tom Tromey <tom@tromey.com>
> 

Hi Tom,

thanks for the review(s).

I've pushed this patch.

I've also submitted an RFC to do the same at a larger scope (
https://sourceware.org/pipermail/gdb-patches/2026-September/230047.html ).

Thanks,
- Tom

> Tom
  

Patch

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1a6438f36a5..09c89624f2e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3290,19 +3290,19 @@  gdb_caching_proc allow_tui_tests {} {
 # Returns the result of BODY.
 #
 proc with_test_prefix { prefix body } {
-  global pf_prefix
+    global pf_prefix
 
-  set saved $pf_prefix
-  append pf_prefix " " $prefix ":"
-  set code [catch {uplevel 1 $body} result]
-  set pf_prefix $saved
+    set saved $pf_prefix
+    append pf_prefix " " $prefix ":"
+    set code [catch {uplevel 1 $body} result]
+    set pf_prefix $saved
 
-  if {$code == 1} {
-      global errorInfo errorCode
-      return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
-  } else {
-      return -code $code $result
-  }
+    if {$code == 1} {
+	global errorInfo errorCode
+	return -code $code -errorinfo $errorInfo -errorcode $errorCode $result
+    } else {
+	return -code $code $result
+    }
 }
 
 # Wrapper for foreach that calls with_test_prefix on each iteration,