Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH] Remove "readnow" from two tests
Date: Tue, 27 Jan 2026 08:48:45 -0700	[thread overview]
Message-ID: <20260127154845.2163457-1-tom@tromey.com> (raw)

These tests both claim that -readnow is needed for proper operation,
but (1) this isn't true, and (2) if it were true it would be a bug in
gdb.  So, remove the use of readnow.
---
 gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp |  7 +------
 gdb/testsuite/gdb.dwarf2/symtab-producer.exp     | 12 +++---------
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
index 5057ff2c2d8..5bfd0099b11 100644
--- a/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
+++ b/gdb/testsuite/gdb.dwarf2/opt-out-not-implptr.exp
@@ -91,12 +91,7 @@ if {[build_executable ${testfile}.exp ${testfile} \
     return -1
 }
 
-# We need --readnow because otherwise we never read in the CU we
-# created above.
-save_vars { GDBFLAGS } {
-    append set GDBFLAGS " -readnow"
-    clean_restart ${testfile}
-}
+clean_restart ${testfile}
 
 if {![runto_main]} {
     return -1
diff --git a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
index 49bc2c25635..c90bf77518c 100644
--- a/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
+++ b/gdb/testsuite/gdb.dwarf2/symtab-producer.exp
@@ -71,15 +71,9 @@ Dwarf::assemble $asm_file {
     }
 }
 
-# We need --readnow because otherwise we never read in the CUs we
-# created above.
-save_vars { GDBFLAGS } {
-    set GDBFLAGS "$GDBFLAGS -readnow"
-
-    if { [prepare_for_testing "failed to prepare" ${testfile} \
-	      [list $srcfile $asm_file] {nodebug}] } {
-	return -1
-    }
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+	  [list $srcfile $asm_file] {nodebug}] } {
+    return
 }
 
 gdb_py_test_silent_cmd "python with_producer = gdb.lookup_global_symbol(\"with_producer\")" \
-- 
2.49.0


             reply	other threads:[~2026-01-27 15:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 15:48 Tom Tromey [this message]
2026-02-02 17:48 ` Kevin Buettner

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=20260127154845.2163457-1-tom@tromey.com \
    --to=tom@tromey.com \
    --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