From patchwork Fri Oct 19 10:02:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 29804 Received: (qmail 57465 invoked by alias); 19 Oct 2018 10:03:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 57450 invoked by uid 89); 19 Oct 2018 10:03:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:gdb_tes X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0074.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Oct 2018 10:03:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZJJe73Eq/4UHwhNWQfXvKkivQNyCvPZ+RYsxD0KWtoE=; b=d7hQgnMyj4WVIlszhYXqpOfRvOR5rcmZnvpNHQlUIbhNrgP72+EG8rWVJvRX0rX3tAw93JJnqIsLbx+h1pu7PkUfFM8Z00BCTgnCZbLQSEI0zd3UpNQrXDu7HpXVUVYed9nedE57heqHHielDViLd7yugw9guFgihFt75i0B/X0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Received: from C02TF0U7HF1T.manchester.arm.com (217.140.106.32) by AM4PR0802MB2129.eurprd08.prod.outlook.com (2603:10a6:200:5c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.22; Fri, 19 Oct 2018 10:03:06 +0000 From: Alan Hayward To: gdb-patches@sourceware.org Cc: nd@arm.com, Alan Hayward Subject: [PUSHED/OBV][PATCH] Testsuite: compile-cplus-print.exp: Start inferior before compiling Date: Fri, 19 Oct 2018 11:02:55 +0100 Message-Id: <20181019100255.30454-1-alan.hayward@arm.com> MIME-Version: 1.0 Return-Path: alan.hayward@arm.com Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-IsSubscribed: yes skip_compile_feature_tests is only valid if the inferior has already been started (see proc comments). Move the runto_main earlier. 2018-10-19 Alan Hayward * gdb.compile/compile-cplus-print.exp: Start inferior earlier. --- gdb/testsuite/gdb.compile/compile-cplus-print.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.compile/compile-cplus-print.exp b/gdb/testsuite/gdb.compile/compile-cplus-print.exp index 5b84b142f1..3427cddf08 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-print.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-print.exp @@ -33,6 +33,10 @@ if { [eval build_executable_from_specs ${testfile}.exp $testfile {$options} ${sr clean_restart ${testfile} +if ![runto_main] { + return -1 +} + if {[skip_compile_feature_tests]} { untested "compile command not supported (could not find libcc1 shared library?)" return -1 @@ -41,10 +45,6 @@ if {[skip_compile_feature_tests]} { gdb_test_no_output "set language c++" \ "Set language to C++" -if ![runto_main] { - return -1 -} - gdb_test "compile print varint" " = 10" gdb_test "compile print vararray" " = \\{1, 2, 3, 4, 5\\}"