Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/7] gdb/testsuite: Don't build a program for cvexpr.exp's last tests
Date: Tue, 11 Aug 2026 02:45:52 +0100	[thread overview]
Message-ID: <20260811014558.3606251-2-pedro@palves.net> (raw)
In-Reply-To: <20260811014558.3606251-1-pedro@palves.net>

The final "nodebug" block of gdb.base/cvexpr.exp exercises GDB's type
parser -- "ptype _Atomic int", "ptype int * restrict", and the C++
equivalents.  These tests don't reference any symbol from the test
program, so its test program is compiled with no debug info.  However,
there really is no reason to compile and load a program at all.

Replace the prepare_for_testing call with a plain clean_restart, and
change the block's test prefix from "nodebug" to "type parsing", which
describe better what the tests do.

This is preparation for a following commit that renames the "nodebug"
option to "symtab".  Compiling the test program here with "symtab"
made it a bit more obvious that semantically something was off.

Change-Id: I9b7c3eceb19f857c258b37342a8000d96552a29b
---
 gdb/testsuite/gdb.base/cvexpr.exp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gdb/testsuite/gdb.base/cvexpr.exp b/gdb/testsuite/gdb.base/cvexpr.exp
index f556d38803b..8660289addb 100644
--- a/gdb/testsuite/gdb.base/cvexpr.exp
+++ b/gdb/testsuite/gdb.base/cvexpr.exp
@@ -515,11 +515,10 @@ foreach testspec $specs {
     }
 }
 
-# These tests don't rely on the debug format.
-with_test_prefix nodebug {
-    if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
-	return
-    }
+# These tests don't rely on the debug format, nor on any program
+# symbol, only on GDB's type parser.
+with_test_prefix "type parsing" {
+    clean_restart
 
     gdb_test "ptype _Atomic int" "type = _Atomic int"
     gdb_test "ptype int * restrict" "type = int \\* restrict"
-- 
2.54.0


  reply	other threads:[~2026-08-11  1:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  1:45 [PATCH 0/7] gdb_compile nodebug => symtab Pedro Alves
2026-08-11  1:45 ` Pedro Alves [this message]
2026-08-11  1:45 ` [PATCH 2/7] gdb/testsuite: Remove gdb_can_simple_compile_nodebug Pedro Alves
2026-08-11  1:45 ` [PATCH 3/7] gdb/testsuite: Let gdb_simple_compile take empty default flags Pedro Alves
2026-08-11  1:45 ` [PATCH 4/7] gdb/testsuite: Don't pass "nodebug" to object compilations Pedro Alves
2026-08-11  1:45 ` [PATCH 5/7] gdb/testsuite: Rename nodebug => symtab Pedro Alves
2026-08-11  1:45 ` [PATCH 6/7] gdb/testsuite: Pass "symtab" to testcases that rely on minsyms Pedro Alves
2026-08-12 21:41   ` Luis
2026-08-11  1:45 ` [PATCH 7/7] gdb/testsuite: Handle "symtab" option on windows-msvc Pedro Alves

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=20260811014558.3606251-2-pedro@palves.net \
    --to=pedro@palves.net \
    --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