From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id CC555385DC0F for ; Mon, 20 Jul 2020 09:20:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC555385DC0F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 09DAFB9C1 for ; Mon, 20 Jul 2020 09:20:16 +0000 (UTC) Date: Mon, 20 Jul 2020 11:20:08 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix valgrind-infcall-2.exp without libc debug info Message-ID: <20200720092007.GA8888@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 09:20:12 -0000 Hi, When running test-case gdb.base/valgrind-infcall-2.exp on a system without libc debug info installed, I run into: ... (gdb) p printf ("bla")^M 'printf' has unknown return type; cast the call to its declared return type^M (gdb) FAIL: gdb.base/valgrind-infcall-2.exp: do printf ... Fix this by casting the result of the printf call to int. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix valgrind-infcall-2.exp without libc debug info gdb/testsuite/ChangeLog: 2020-07-20 Tom de Vries * gdb.base/valgrind-infcall-2.exp: Handle printf unknown return type. --- gdb/testsuite/gdb.base/valgrind-infcall-2.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp index a3983f7564..9d0a6f56a6 100644 --- a/gdb/testsuite/gdb.base/valgrind-infcall-2.exp +++ b/gdb/testsuite/gdb.base/valgrind-infcall-2.exp @@ -60,7 +60,7 @@ gdb_test_multiple "bt 1" "do printf" { # Thread status is VgTs_WaitSys # ' # (gdb) - gdb_test "p printf (\"bla\")" \ + gdb_test "p (int)printf (\"bla\")" \ "can only be accepted if the thread is .*" \ $gdb_test_name }