From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id B306E3858C2C for ; Thu, 17 Aug 2023 04:20:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B306E3858C2C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org From: Sam James To: binutils@sourceware.org Cc: Sam James , Nick Clifton Subject: [PATCH] ld: ld-lib.exp: log failed dump.out contents for debugging Date: Thu, 17 Aug 2023 05:19:44 +0100 Message-ID: <20230817042005.2985898-1-sam@gentoo.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: If we're using dump_prog in a test which fails, log the dump.out contents to ld.log to aid debugging. This avoids needing to ask reporters to manually run e.g. `objdump` commands when making bug reports. PR30722 * ld/testsuite/lib/ld-lib.exp: Log failed dump.out contents to aid debugging. Approved-by: Nick Clifton Signed-off-by: Sam James --- ld/testsuite/lib/ld-lib.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index 918464069a9..aca303e0728 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -640,7 +640,7 @@ proc run_ld_link_tests { ldtests args } { remote_upload host "dump.out" if { [regexp_diff "dump.out" "$srcdir/$subdir/$dumpfile"] } then { - verbose "output is [file_contents "dump.out"]" 2 + verbose -log "output is [file_contents "dump.out"]" 2 set failed 1 remote_file build delete "dump.out" remote_file host delete "dump.out" @@ -1067,7 +1067,7 @@ proc run_cc_link_tests { ldtests } { } if { [regexp_diff "dump.out" "$srcdir/$subdir/$dumpfile"] } then { - verbose "output is [file_contents "dump.out"]" 2 + verbose -log "output is [file_contents "dump.out"]" 2 set failed 1 break } -- 2.41.0