From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QfsgHTkcY2Ys6ykAWB0awg (envelope-from ) for ; Fri, 07 Jun 2024 10:42:01 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=aKKl2oK9; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=VyEhrQP3; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nq3pQY5I; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=3Xz2AR99; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6AF031E0C1; Fri, 7 Jun 2024 10:42:01 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 33BC81E092 for ; Fri, 7 Jun 2024 10:41:59 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF57039317FA for ; Fri, 7 Jun 2024 14:41:42 +0000 (GMT) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id E41F939015E6 for ; Fri, 7 Jun 2024 14:41:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E41F939015E6 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E41F939015E6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717771281; cv=none; b=IZSixrAd8F48pt4iBMtPLJLa/l41VKJkA9zHEv/gfWGDA/cN3cXFpFk4p2bhNPs4xjGE+y+vc1wPkntR08m0hDPzXnfZ7zYuHrs/7d4vHG5YVjzu5F2bHUdtfEfNnJjNTf54nfH2lD31kCRZfTSe5MgjvroPLfAxOwEE9wPkg0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717771281; c=relaxed/simple; bh=TWb2dDqLw6IP+SW7/98T5Rn/Y22lFtyCqDs9YBKaY2o=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=wPLoIcH3HXqy7EzKNFHD4oFiRCl3R33xRVCnxPgphAAJYxlqz8ijRY78KzPagb0nVrY9PaMtmXVo7J6uLz3NWInuDZdoSq94/7/yIaFIzgfmYg8tM2Pb2oK8+oRXWVjRV4S96qh64Pph+cTBYZ9e1/hoNQeJ63HGye9COGtvxSw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 65B2621B5F for ; Fri, 7 Jun 2024 14:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717771269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=D3QGbWO0M/5RRHiaRU3k3Z/NCLtxiirYR9pMWZBGzrM=; b=aKKl2oK9BMh2+Ap7crxuepjiaA1/AR72HM+unH9X/Jhi0LyEZsCXJPGzaduhtVPY+Osw7/ v8laL1WigFa5C5fTPRj/NgFFEgRlfM1/d0q8oj/D7SRVL8PX9NHHEioTn+dSZGSXnA9nPn FTGFRgBk+vYLRhJTaYd07WN7kEy8T24= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717771269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=D3QGbWO0M/5RRHiaRU3k3Z/NCLtxiirYR9pMWZBGzrM=; b=VyEhrQP3GJsM0od4nT18WafqitLqsnEn1sEWo+449jNKhGDaGOeFNJFGToIode188O/uNd wzLQ80Km5uZmnvBQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1717771268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=D3QGbWO0M/5RRHiaRU3k3Z/NCLtxiirYR9pMWZBGzrM=; b=nq3pQY5I/M8FczOSCsHv+mPM8aJ/W+qJuqK+AeI4aI1b/6A8rayo2T02F6uDjtC0p95El4 i0kv9bWLfeP1DLUqIiD08nqpJDj3FNl5Wvgnp6w56FroMOkMnKAluBqDQDzmLmBZVWs1By umDJBVrjwa6WvfLvudS7aC6FIxqJHWA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1717771268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=D3QGbWO0M/5RRHiaRU3k3Z/NCLtxiirYR9pMWZBGzrM=; b=3Xz2AR99SVnpfficI1xie9hiVdILJlLaQ6T3Q7Eh1qouOBzWJofKr84dL7CuIS+H5X77VW Q43SJFgvwC+PEgCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 46121133F3 for ; Fri, 7 Jun 2024 14:41:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id unPBDwQcY2aHDgAAD6G6ig (envelope-from ) for ; Fri, 07 Jun 2024 14:41:08 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Don't use set auto-solib-add off Date: Fri, 7 Jun 2024 16:41:35 +0200 Message-Id: <20240607144135.32128-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[ld.so:url,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -2.80 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org In test-case gdb.mi/mi-var-child-f.exp, we have: ... mi_gdb_test "-gdb-set auto-solib-add off" "\\^done" mi_runto prog_array mi_gdb_test "nosharedlibrary" ".*\\^done" ... This was added to avoid a name clash between the array variable as defined in gdb.mi/array.f90 and debug info in shared libraries, and used in other places in the testsuite. The same workaround is also used to ignore symbols from shared libraries when excercising for instance a command that print all symbols. However, this approach can cause problems for targets like arm that require symbol info for some libraries like ld.so and libc to fully function. While absense of debug info for shared libraries should be handled gracefully (which does need fixing, see PR31817), failure to do so should not result in failures in unrelated test-cases. Fix this by removing "set auto-solib-add off". This ensures that we don't run into PR31817, while the presence of nosharedlibrary still ensures that in the rest of the test-case we're not bothered by shared library symbols. Likewise in other test-cases. Tested on arm-linux. --- gdb/testsuite/gdb.base/gold-gdb-index.exp | 4 ++-- gdb/testsuite/gdb.base/info-types.exp.tcl | 3 ++- gdb/testsuite/gdb.base/print-symbol-loading.exp | 4 +++- gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp | 6 ++---- gdb/testsuite/gdb.fortran/allocated.exp | 3 --- gdb/testsuite/gdb.fortran/array-slices-bad.exp | 3 --- gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp | 3 --- gdb/testsuite/gdb.fortran/array-slices.exp | 3 --- gdb/testsuite/gdb.fortran/info-modules.exp | 3 --- gdb/testsuite/gdb.fortran/lbound-ubound.exp | 3 --- gdb/testsuite/gdb.fortran/module.exp | 3 --- gdb/testsuite/gdb.fortran/subarray.exp | 3 --- gdb/testsuite/gdb.mi/mi-fortran-modules.exp | 3 --- gdb/testsuite/gdb.mi/mi-var-child-f.exp | 3 --- 14 files changed, 9 insertions(+), 38 deletions(-) diff --git a/gdb/testsuite/gdb.base/gold-gdb-index.exp b/gdb/testsuite/gdb.base/gold-gdb-index.exp index c9c6598c3fa..0309dd353ad 100644 --- a/gdb/testsuite/gdb.base/gold-gdb-index.exp +++ b/gdb/testsuite/gdb.base/gold-gdb-index.exp @@ -32,12 +32,12 @@ if { [have_index $binfile] != "gdb_index" } { return -1 } -gdb_test_no_output "set auto-solib-add off" - if {![runto_main]} { return 0 } +gdb_test_no_output "nosharedlibrary" + gdb_test_no_output "set breakpoint pending off" gdb_test "break N1::misspelled" "Function \"N1::misspelled\" not defined\." diff --git a/gdb/testsuite/gdb.base/info-types.exp.tcl b/gdb/testsuite/gdb.base/info-types.exp.tcl index 69d53b9f8de..0a33afedf86 100644 --- a/gdb/testsuite/gdb.base/info-types.exp.tcl +++ b/gdb/testsuite/gdb.base/info-types.exp.tcl @@ -32,12 +32,13 @@ proc run_test { lang } { "${testfile}" $srcfile "debug $lang"]} { return -1 } - gdb_test_no_output "set auto-solib-add off" if ![runto_main] then { return 0 } + gdb_test_no_output "nosharedlibrary" + set file_re "File .*[string_to_regexp $srcfile]:" if { $lang == "c++" } { diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp index b61dba33377..b3520f1e032 100644 --- a/gdb/testsuite/gdb.base/print-symbol-loading.exp +++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp @@ -95,10 +95,12 @@ proc test_load_shlib { print_symbol_loading } { global gdb_prompt with_test_prefix "shlib ${print_symbol_loading}" { clean_restart ${binfile} - gdb_test_no_output "set auto-solib-add off" if ![runto_main] { return -1 } + + gdb_test_no_output "nosharedlibrary" + gdb_test_no_output "set print symbol-loading $print_symbol_loading" set test_name "load shared-lib" set libc_re \ diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp index 59840b8d0e2..e2e4f240c88 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp @@ -29,14 +29,12 @@ proc_with_prefix test_relocated { exec_path lib_path complaint_re readnow_p } { clean_restart $exec_path gdb_load_shlib $lib_path - # Don't load the symbols for $lib_path during runto_main. - # Instead, we do this afterwards using "sharedlibrary $lib_path". - gdb_test_no_output "set auto-solib-add off" - if { ![runto_main] } { return } + gdb_test_no_output "nosharedlibrary" + # Test for presence of complaint. with_complaints 1 { set have_complaint 0 diff --git a/gdb/testsuite/gdb.fortran/allocated.exp b/gdb/testsuite/gdb.fortran/allocated.exp index d8aee441d7f..1d87bf76244 100644 --- a/gdb/testsuite/gdb.fortran/allocated.exp +++ b/gdb/testsuite/gdb.fortran/allocated.exp @@ -25,9 +25,6 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if ![fortran_runto_main] { return -1 } diff --git a/gdb/testsuite/gdb.fortran/array-slices-bad.exp b/gdb/testsuite/gdb.fortran/array-slices-bad.exp index 8f23b38599f..ac4a77d2e39 100644 --- a/gdb/testsuite/gdb.fortran/array-slices-bad.exp +++ b/gdb/testsuite/gdb.fortran/array-slices-bad.exp @@ -30,9 +30,6 @@ if {![runto [gdb_get_line_number "First Breakpoint"]]} { return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - # Avoid libc symbols, in particular the 'array' type. gdb_test_no_output "nosharedlibrary" diff --git a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp index 5bdc7d59f16..5a0f0406afe 100644 --- a/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices-sub-slices.exp @@ -25,9 +25,6 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if ![fortran_runto_main] { return -1 } diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp index f2928676bf3..919a2c6e7eb 100644 --- a/gdb/testsuite/gdb.fortran/array-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices.exp @@ -58,9 +58,6 @@ proc run_test { repack } { clean_restart ${binfile} - # Avoid shared lib symbols. - gdb_test_no_output "set auto-solib-add off" - if ![fortran_runto_main] { return -1 } diff --git a/gdb/testsuite/gdb.fortran/info-modules.exp b/gdb/testsuite/gdb.fortran/info-modules.exp index e6c515ff70f..c8ae7362223 100644 --- a/gdb/testsuite/gdb.fortran/info-modules.exp +++ b/gdb/testsuite/gdb.fortran/info-modules.exp @@ -28,9 +28,6 @@ if { [prepare_for_testing "failed to prepare" $testfile \ return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if { ![fortran_runto_main] } { perror "Could not run to main." return diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp index 01597ca23ff..781d3614f4c 100644 --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp @@ -25,9 +25,6 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \ return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if ![fortran_runto_main] { return -1 } diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index eea83ad71f1..df7ee3b9605 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -31,9 +31,6 @@ gdb_test "p modmany::var_i" " = 14" "stopped language detection" gdb_test "print mod1::var_const" " = 20" "fully qualified name of DW_TAG_constant" -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if {![fortran_runto_main]} { return } diff --git a/gdb/testsuite/gdb.fortran/subarray.exp b/gdb/testsuite/gdb.fortran/subarray.exp index 1ec80e78fe4..70a7a2345ba 100644 --- a/gdb/testsuite/gdb.fortran/subarray.exp +++ b/gdb/testsuite/gdb.fortran/subarray.exp @@ -27,9 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90}]} { return -1 } -# Avoid shared lib symbols. -gdb_test_no_output "set auto-solib-add off" - if {![fortran_runto_main]} { return } diff --git a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp index 13996b9547f..5441d8f15e5 100644 --- a/gdb/testsuite/gdb.mi/mi-fortran-modules.exp +++ b/gdb/testsuite/gdb.mi/mi-fortran-modules.exp @@ -30,9 +30,6 @@ if {[build_executable "failed to prepare" ${testfile} \ mi_clean_restart $binfile -# Avoid shared lib symbols. -mi_gdb_test "-gdb-set auto-solib-add off" "\\^done" - mi_runto_main # Avoid libc symbols. diff --git a/gdb/testsuite/gdb.mi/mi-var-child-f.exp b/gdb/testsuite/gdb.mi/mi-var-child-f.exp index 258cbe7cb40..441c3a09366 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child-f.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child-f.exp @@ -32,9 +32,6 @@ if {[mi_clean_restart $binfile]} { return } -# Avoid shared lib symbols. -mi_gdb_test "-gdb-set auto-solib-add off" "\\^done" - mi_runto prog_array # Avoid libc symbols, in particular the 'array' type. base-commit: 1e5354d0c9a89a31d3ae6f2d87b55c442bfac008 -- 2.35.3