From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EKkqJlPvVWGIXQAAWB0awg (envelope-from ) for ; Thu, 30 Sep 2021 13:09:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 9A6B51EE28; Thu, 30 Sep 2021 13:09:39 -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 07D581EDF7 for ; Thu, 30 Sep 2021 13:09:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7F853857C53 for ; Thu, 30 Sep 2021 17:09:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7F853857C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633021778; bh=4F4ObGEvu2+55kawoffOr52HVBnWCBjIQnmhMUv5Jq4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gV6gPewyQ5FVvo71+gLqbTHVXxeHK0JtubqTJ03yeTbrpGLKwpHipJIbek4dTJ4/q jbNcSEORo218yYVMpqqTMis+JHa2UTSYbxK253jlV7Q+Z+g7Pc3l7t/04BX5ZybzGF KCIZ4nCQxEHWNqvEedMJXgpZZdEDP/brywG6oghc= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 1C48D3858C2C for ; Thu, 30 Sep 2021 17:09:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1C48D3858C2C 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 29B64203F4 for ; Thu, 30 Sep 2021 17:09:08 +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 182E313AF5 for ; Thu, 30 Sep 2021 17:09:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HR3WBDTvVWHIWgAAMHmgww (envelope-from ) for ; Thu, 30 Sep 2021 17:09:08 +0000 Date: Thu, 30 Sep 2021 19:09:06 +0200 To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Check compilation result in gdb.base/call-sc.exp Message-ID: <20210930170904.GA25013@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.base/call-sc.exp with target board unix/-bad, I get: ... gdb compile failed, gcc: error: unrecognized command line option '-bad' UNTESTED: gdb.base/call-sc.exp: failed to prepare ERROR: tcl error sourcing src/gdb/testsuite/gdb.base/call-sc.exp. ERROR: can't read "use_gdb_stub": no such variable ... Fix this by checking the compilation result. Fix the resulting DUPLICATE: ... DUPLICATE: gdb.base/call-sc.exp: failed to prepare ... using with_test_prefix. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Check compilation result in gdb.base/call-sc.exp --- gdb/testsuite/gdb.base/call-sc.exp | 45 +++++++++++++++----------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp index 6b712a39ac6..5ba72a54a1f 100644 --- a/gdb/testsuite/gdb.base/call-sc.exp +++ b/gdb/testsuite/gdb.base/call-sc.exp @@ -393,10 +393,17 @@ proc test_scalar_returns { } { # Test every single char struct from 1..17 in size. This is what the # original "scalars" test was doing. -start_scalars_test tc -test_scalar_calls -test_scalar_returns +proc test { type } { + with_test_prefix $type { + if { [start_scalars_test $type] == -1 } { + return + } + test_scalar_calls + test_scalar_returns + } +} +test tc # Let the fun begin. @@ -413,45 +420,29 @@ test_scalar_returns # naturally aligned. Padding being added where needed. # Approx size: 2, 4, ... -start_scalars_test ts -test_scalar_calls -test_scalar_returns +test ts # Approx size: 4, 8, ... -start_scalars_test ti -test_scalar_calls -test_scalar_returns +test ti # Approx size: 4, 8, ... -start_scalars_test tl -test_scalar_calls -test_scalar_returns +test tl # Approx size: 8, 16, ... -start_scalars_test tll -test_scalar_calls -test_scalar_returns +test tll if {!$skip_float_test} { # Approx size: 4, 8, ... - start_scalars_test tf - test_scalar_calls - test_scalar_returns + test tf # Approx size: 8, 16, ... - start_scalars_test td - test_scalar_calls - test_scalar_returns + test td # Approx size: 16, 32, ... - start_scalars_test tld - test_scalar_calls - test_scalar_returns + test tld } # Approx size: 4, 8, ... -start_scalars_test te -test_scalar_calls -test_scalar_returns +test te return 0