From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wBmeLb/vVWGIXQAAWB0awg (envelope-from ) for ; Thu, 30 Sep 2021 13:11:27 -0400 Received: by simark.ca (Postfix, from userid 112) id B88F51EE28; Thu, 30 Sep 2021 13:11:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 06DE31EDF7 for ; Thu, 30 Sep 2021 13:11:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7F93E3858434 for ; Thu, 30 Sep 2021 17:11:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F93E3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633021886; bh=TeUSXlRnlTxJwY0BKNYoba5PMcU8UkxHWW7SZTnSZGc=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Q4A98De46rv+gw2wnGJ2MdK03gDihMBEs/qKTJiHqe020OJCelKP0bqtbggBPaxPJ Rf2zH/1EIdW1Jtap9sc81QPCgZO4Fa1Rl4wfyFqSDamH5mUu/wPCjGJ+PEJJTbvk47 wHjCdmRSMXct6Ewasph6HY64TTqYx9AcXLt+Ma+I= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 922413857C5E for ; Thu, 30 Sep 2021 17:10:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 922413857C5E Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9CC1A1FD3F for ; Thu, 30 Sep 2021 17:10:10 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8A2E613AF5 for ; Thu, 30 Sep 2021 17:10:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HFiDIHLvVWFsWwAAMHmgww (envelope-from ) for ; Thu, 30 Sep 2021 17:10:10 +0000 Date: Thu, 30 Sep 2021 19:10:09 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp Message-ID: <20210930171007.GA25157@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-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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.dwarf2/dw2-opt-structptr.exp with target board unix/-bad, I get: ... gdb compile failed, gcc: error: unrecognized command line option '-bad' UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: dw2-opt-structptr.exp UNTESTED: gdb.dwarf2/dw2-opt-structptr.exp: failed to compile ERROR: (dw2-opt-structptr) No such file or directory UNRESOLVED: gdb.dwarf2/dw2-opt-structptr.exp: console: set print object on ... Merge the two UNTESTEDs. Fix the UNRESOLVED by checking result of compilation. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Check compilation result in gdb.dwarf2/dw2-opt-structptr.exp --- gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp index 6883b086b89..82a53a3d2ea 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-opt-structptr.exp @@ -123,8 +123,7 @@ proc build_test_program {} { } set sources "$srcfile $asm_file" - if {[build_executable $testfile.exp $testfile $sources {nodebug}]} { - untested "failed to compile" + if {[build_executable "failed to compile" $testfile $sources {nodebug}]} { return -1 } } @@ -245,6 +244,9 @@ proc do_mi_test {} { } } -build_test_program +if { [build_test_program] == -1 } { + return -1 +} + do_console_test do_mi_test