public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix dw2-zero-range.exp when an index is in use
@ 2024-01-18 20:37 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-01-18 20:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d2cc8bd228bfbd649200f909ef69c0b02a375f77

commit d2cc8bd228bfbd649200f909ef69c0b02a375f77
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Dec 6 14:24:08 2023 -0700

    Fix dw2-zero-range.exp when an index is in use
    
    dw2-zero-range.exp looks for a certain complaint, but this won't be
    issued when an index is in use.  This patch changes the test to not
    fail in this case.

Diff:
---
 gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
index 811d3565dd5..79ccd620b8b 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp
@@ -132,7 +132,10 @@ foreach_with_prefix ranges_sect {ranges rnglists} {
 	    }
 	}
 
-	gdb_assert { $have_complaint } $test
+	# The complaint won't be seen if an index is in use.
+	if {[have_index $lib1] == ""} {
+	    gdb_assert { $have_complaint } $test
+	}
     }
 
     if { ! $readnow_p } {
@@ -149,7 +152,10 @@ foreach_with_prefix ranges_sect {ranges rnglists} {
 	gdb_load $lib1
 	set test "Zero address complaint - unrelocated - psymtab"
 	set have_complaint [regexp $re.* $gdb_file_cmd_msg]
-	gdb_assert { $have_complaint } $test
+	# The complaint won't be seen if an index is in use.
+	if {[have_index $lib1] == ""} {
+	    gdb_assert { $have_complaint } $test
+	}
     }
     gdb_test_no_output "maint set dwarf synchronous off"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-18 20:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 20:37 [binutils-gdb] Fix dw2-zero-range.exp when an index is in use Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).