From: Tom de Vries Date: Sat, 23 Aug 2025 06:44:34 +0000 (+0200) Subject: [gdb/testsuite] Require cooked index in two test-cases X-Git-Tag: gdb-17-branchpoint~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8a03d6406a14d5e8446ca8f213ff04243646261;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Require cooked index in two test-cases After running the testsuite with target board cc-with-gdb-index I ran found failures in test-cases: - gdb.dwarf2/backward-spec-inter-cu.exp - gdb.dwarf2/forward-spec-inter-cu.exp Fix this by requiring a cooked index. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp index b62f9288a77..1876849afd3 100644 --- a/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/backward-spec-inter-cu.exp @@ -20,6 +20,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support +require !readnow standard_testfile main.c -debug.S @@ -98,6 +99,11 @@ foreach_with_prefix worker_threads $worker_threads_list { gdb_load $binfile + set index [have_index $binfile] + if { ![string eq $index ""] } { + return + } + gdb_test "pipe maint print objfiles | grep ns::v" \ "$ws+qualified:$ws+ns::v" \ "v has parent ns" diff --git a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp index e92e582b68a..26d0af6706b 100644 --- a/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp +++ b/gdb/testsuite/gdb.dwarf2/forward-spec-inter-cu.exp @@ -20,6 +20,7 @@ load_lib dwarf.exp # This test can only be run on targets which support DWARF-2 and use gas. require dwarf2_support +require !readnow standard_testfile main.c -debug.S @@ -98,6 +99,11 @@ foreach_with_prefix worker_threads $worker_threads_list { gdb_load $binfile + set index [have_index $binfile] + if { ![string eq $index ""] } { + return + } + gdb_test "pipe maint print objfiles | grep ns::v" \ "$ws+qualified:$ws+ns::v" \ "v has parent ns"