Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [RFC 5/5] [gdb/testsuite] Reformat gdb.ada
Date: Fri,  4 Sep 2026 11:38:55 +0200	[thread overview]
Message-ID: <20260904093858.359604-5-tdevries@suse.de> (raw)
In-Reply-To: <20260904093858.359604-1-tdevries@suse.de>

The gdb/testsuite/gdb.ada directory was recently (Dec 2025) reindented by
commit 6779faa9cea ("Reindent gdb.ada tests").

So this is a good candidate to see the impact of the indent-exp approach.

Run:
...
$ pre-commit run \
    --hook-stage manual \
    indent-exp \
    --files $(find gdb/testsuite/gdb.ada -type f -name "*.exp*")
...

In gdb.ada/ptype_field.exp, a comment looking like this is fixed:
...
 # foo \
    #     bar
...
to:
...
 # foo \
 #     bar
...

The change results in excessive indentation in gdb.ada/var_shadowing.exp.
Manually fix this using:
...
-gdb_test "info locals" [multi_line \
+gdb_test "info locals" \
+    [multi_line \
...
and reformat the same test to be more typical.
---
 gdb/testsuite/gdb.ada/non-ascii-latin-3.exp |  2 +-
 gdb/testsuite/gdb.ada/ptype_field.exp       |  8 ++++----
 gdb/testsuite/gdb.ada/var_shadowing.exp     | 13 +++++++------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
index fd4cd5f064c..8dd422cfb7b 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
@@ -67,4 +67,4 @@ gdb_test break_2 "Breakpoint $decimal .*" \
     "gdb_breakpoint: set breakpoint at func_ż"
 
 gdb_test print_3 "warning: charset conversion failure.*" \
-     "print var_𝕯"
+    "print var_𝕯"
diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp
index e808b8492bb..4e326a7ca98 100644
--- a/gdb/testsuite/gdb.ada/ptype_field.exp
+++ b/gdb/testsuite/gdb.ada/ptype_field.exp
@@ -64,10 +64,10 @@ gdb_test "complete ptype pck.c" "ptype pck\\.circle"
 
 # We can't query the members of a package yet, and this yields a bit
 # too much output, so comment out for now instead of kfailing.
-# gdb_test "complete ptype pck." \
-    #     [multi_line \
-    # 	 "ptype pck\\.circle" \
-    # 	 "ptype pck\\.position"]
+# gdb_test "complete ptype pck." \#
+#     [multi_line \#
+# 	 "ptype pck\\.circle" \#
+# 	 "ptype pck\\.position"]
 
 gdb_test "complete ptype circle.pos." \
     [multi_line \
diff --git a/gdb/testsuite/gdb.ada/var_shadowing.exp b/gdb/testsuite/gdb.ada/var_shadowing.exp
index ffa96b049cf..468485b118f 100644
--- a/gdb/testsuite/gdb.ada/var_shadowing.exp
+++ b/gdb/testsuite/gdb.ada/var_shadowing.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
 standard_ada_testfile var_shadowing
 
 if {[gdb_compile_ada "${srcfile}" "${binfile}" \
-    executable [list debug]] != "" } {
+	 executable [list debug]] != "" } {
     return
 }
 
@@ -32,8 +32,9 @@ set i_level3 [gdb_get_line_number "I-Level3"]
 set bp_location [gdb_get_line_number "BREAK"]
 runto "var_shadowing.adb:$bp_location"
 
-gdb_test "info locals" [multi_line \
-    "i = 111\t<$testfile.adb:$i_level3>"  \
-    "i = 11\t<$testfile.adb:$i_level2, shadowed>"  \
-    "i = 1\t<$testfile.adb:$i_level1, shadowed>"  \
-] "info locals at innermost level"
+gdb_test "info locals" \
+    [multi_line \
+	 "i = 111\t<$testfile.adb:$i_level3>"  \
+	 "i = 11\t<$testfile.adb:$i_level2, shadowed>"  \
+	 "i = 1\t<$testfile.adb:$i_level1, shadowed>"] \
+    "info locals at innermost level"
-- 
2.51.0


      parent reply	other threads:[~2026-09-04  9:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  9:38 [RFC 1/5] [pre-commit] Add indent-exp Tom de Vries
2026-09-04  9:38 ` [RFC 2/5] [gdb/testsuite] Make lib/gdb.exp emacs indent compatible Tom de Vries
2026-09-04  9:38 ` [RFC 3/5] [gdb/testsuite] Update regexp in string_to_regexp Tom de Vries
2026-09-04  9:38 ` [RFC 4/5] [gdb/testsuite] Reformat lib/gdb.exp Tom de Vries
2026-09-04  9:38 ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260904093858.359604-5-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox