From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 4B85C3858C51 for ; Fri, 1 Jul 2022 23:11:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B85C3858C51 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from reform (deer0x0e.wildebeest.org [172.31.17.144]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id A65AA302AB2C; Sat, 2 Jul 2022 01:11:10 +0200 (CEST) Received: by reform (Postfix, from userid 1000) id 6FBB22E832E5; Sat, 2 Jul 2022 01:11:10 +0200 (CEST) From: Mark Wielaard To: dwz@sourceware.org Cc: Mark Wielaard Subject: [PATCH] Redirect stder in gdb-add-index.sh test Date: Sat, 2 Jul 2022 01:11:00 +0200 Message-Id: <20220701231100.105315-1-mark@klomp.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, 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: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2022 23:11:13 -0000 gdb-add-index might produce an error message on stderr when trying to disable debuginfod support. Any message to stderr makes the testcase fail. This looks like a gdb bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29316 But it is easy to workaround by redirecting stderr to stdout. --- testsuite/dwz.tests/gdb-add-index.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testsuite/dwz.tests/gdb-add-index.sh b/testsuite/dwz.tests/gdb-add-index.sh index 5a91b23..3095efb 100644 --- a/testsuite/dwz.tests/gdb-add-index.sh +++ b/testsuite/dwz.tests/gdb-add-index.sh @@ -1,6 +1,8 @@ cp $execs/hello 1 -gdb-add-index 1 +# Redirect gdb-add-index stderr to stdout. +# https://sourceware.org/bugzilla/show_bug.cgi?id=29316 +gdb-add-index 1 2>&1 readelf -S 1 | grep -q '\.gdb_index' -- 2.30.2