From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Sa6BD15cC2q97QUAWB0awg (envelope-from ) for ; Mon, 18 May 2026 14:37:18 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iRf0wvuB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 39D751E024; Mon, 18 May 2026 14:37:18 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9C92F1E024 for ; Mon, 18 May 2026 14:37:17 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CBCE94BA9017 for ; Mon, 18 May 2026 18:37:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBCE94BA9017 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iRf0wvuB Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by sourceware.org (Postfix) with ESMTPS id 4E0F74BABF3D for ; Mon, 18 May 2026 18:35:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E0F74BABF3D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4E0F74BABF3D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779129338; cv=none; b=cemoyQg5sXDi3XGRv9VP8UA2KRBEpG18mhxe05Yb3UMSuWRzk6enSZygzQUpblGStuU9PplXfp0acr46B6wCoscnaaPYvKnBMpQLnomqZDqzioxC2z+D7OU+lIS3jDKJ3IW6+Ida8OfTS7pzyaHiPoasK4tFpImipKGPmbhzl38= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779129338; c=relaxed/simple; bh=RNF4Haa8V2o2UARZ1ZA5J5a3QCWcSunLWcQkUWOaH+0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=N6emG8eDheg0KJ1P4QSCJG/nAqVkqdFtxOmtpSWSFKaLfjcrKMzTucrG5y+tctTkjr+uyI80AcSCj+iUC/FEeykCy8ZlNnXcw4h1bJ/kHhp1sVRM6D1NOao1suwIpItyZ464xBC2rNGaZIbYFi+LpiEqaWQeW1xAdbRnVit9Grw= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=iRf0wvuB DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E0F74BABF3D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779129338; x=1810665338; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RNF4Haa8V2o2UARZ1ZA5J5a3QCWcSunLWcQkUWOaH+0=; b=iRf0wvuBWFp5yAb1PVnDZ+SPxfT4eQwfX7jdquUV4CxU53y7ZVRoQMnC IgDXLKw9J2FxWzaf0ALdjzSROFca/wLk31W0/+B14j7TRNzfIdVSu2qxb Fn2WvTWiUlfsd2f3f12zh/dhZQpt8qtJgyJfAFb/6qkpETbrGRnB25P+P lD7RsrtC0iAl8MQKvjwO+/uFgp9fbeZRnNBk2FctecK4BkftEjCZ6QQdo u1bktYbBWUTgrTEOEqb05v1J844LFA+wEIzAhOflzfPHXls6bcQdiaJ26 +d1zPrEYAU+KhX3T+aWWkYIZf8kk5doSoZgiVcwBfSK57FF/G96xU6q8u A==; X-CSE-ConnectionGUID: fT750J0GRke0htEPF/DHNQ== X-CSE-MsgGUID: hGddaB3URZm/azF3FhANWA== X-IronPort-AV: E=McAfee;i="6800,10657,11790"; a="80112259" X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="80112259" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 11:35:37 -0700 X-CSE-ConnectionGUID: cfDUeirdQNCrUS7SgpLxxA== X-CSE-MsgGUID: DXwiPJolSB6IBH//XGHF6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="263290850" Received: from cwhite-mobl.ger.corp.intel.com (HELO localhost) ([10.245.114.180]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 11:35:36 -0700 From: Mohamed Bouhaouel To: gdb-patches@sourceware.org Cc: mohamed.bouhaouel@intel.com, stephan.rohr@intel.com, markus.t.metzger@intel.com Subject: [PATCH 08/11] gdb, testsuite: handle async close in monitor-exit-quit.exp Date: Mon, 18 May 2026 20:33:04 +0200 Message-ID: <20260518183316.127043-9-mohamed.bouhaouel@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260518183316.127043-1-mohamed.bouhaouel@intel.com> References: <20260518183316.127043-1-mohamed.bouhaouel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org From: "Bouhaouel, Mohamed" With non-stop remote targets, the "Remote connection closed" notification arrives asynchronously after "monitor exit" and may appear while processing the quit command, causing test failures. Fix by using "with confirm off -- quit" and handling the async notification in the quit sequence. --- gdb/testsuite/gdb.server/monitor-exit-quit.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.server/monitor-exit-quit.exp b/gdb/testsuite/gdb.server/monitor-exit-quit.exp index cb90169ef0c..f0db907576e 100644 --- a/gdb/testsuite/gdb.server/monitor-exit-quit.exp +++ b/gdb/testsuite/gdb.server/monitor-exit-quit.exp @@ -50,11 +50,16 @@ set gdbserver_gdbport [lindex $res 1] gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport gdb_test_no_output "monitor exit" -gdb_test_no_output "set confirm off" set do_cleanup 1 -gdb_test_multiple "quit" "" { +gdb_test_multiple "with confirm off -- quit" "" { + -re -wrap "Remote connection closed.*" { + # With non-stop remote targets, the "Remote connection closed" + # notification is delivered asynchronously and may appear while + # processing the quit command. + exp_continue + } -re -wrap "" { fail "$gdb_test_name (prompt)" # Let default_gdb_exit do the cleanup. -- 2.43.0 Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 89 991 430, www.intel.de Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell Chairperson of the Supervisory Board: Nicole Lau Registered Seat: Munich Commercial Register: Amtsgericht Muenchen HRB 186928