From patchwork Tue Oct 9 12:44:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Hayward X-Patchwork-Id: 29677 Received: (qmail 41146 invoked by alias); 9 Oct 2018 12:45:40 -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 41036 invoked by uid 89); 9 Oct 2018 12:45:27 -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=Hx-languages-length:911 X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr50067.outbound.protection.outlook.com (HELO EUR03-VE1-obe.outbound.protection.outlook.com) (40.107.5.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Oct 2018 12:45:26 +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=y79n0fCryS2XS7TtQ+eQD4qRi+FmPR3vy8V1qmsPxik=; b=f0Hrof+OiQn+FDZ+vEKVaOgGrl8iAg9P+BksQj6IOa98VbGT5FN/LKGkJBfigzoN4hP/TKyqs5yZ3nykIjW7ep0HqMOKsE6/52hmYDqgDBaGGLMbkj4B4WCw2Lm0ezm0YI+QzxckgtQw4pFehCtxz2iw/ebx+8eqVQDPc2A+ccY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alan.Hayward@arm.com; Received: from C02TF0U7HF1T.manchester.arm.com (217.140.106.32) by DB6PR0802MB2136.eurprd08.prod.outlook.com (2603:10a6:4:83::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.23; Tue, 9 Oct 2018 12:45:04 +0000 From: Alan Hayward To: gdb-patches@sourceware.org Cc: nd@arm.com, Alan Hayward Subject: [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp Date: Tue, 9 Oct 2018 13:44:57 +0100 Message-Id: <20181009124457.81037-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 target_supports_scheduler_locking does not wait for the gdb prompt after calling gdb_start_cmd. Fix by replacing with runto_main. This removes the racy behaviour of mi-cmd-param-changed.exp. gdb/testsuite/ChangeLog: 2018-10-09 Alan Hayward * lib/gdb.exp (target_supports_scheduler_locking): Call runto_main. --- gdb/testsuite/lib/gdb.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9284291ccd..6a99eca6f9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5957,7 +5957,9 @@ gdb_caching_proc target_supports_scheduler_locking { } clean_restart $obj - gdb_start_cmd + if ![runto_main] { + return 0 + } set supports_schedule_locking -1 set current_schedule_locking_mode ""