From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wfFXHlXWKmqOswEAWB0awg (envelope-from ) for ; Thu, 11 Jun 2026 11:37:57 -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=JUHMM+WM; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 77AE51E070; Thu, 11 Jun 2026 11:37:57 -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 F1AB71E070 for ; Thu, 11 Jun 2026 11:37:56 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1A1414BA799F for ; Thu, 11 Jun 2026 15:37:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A1414BA799F 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=JUHMM+WM Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by sourceware.org (Postfix) with ESMTPS id D19544BA2E0A for ; Thu, 11 Jun 2026 15:35:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D19544BA2E0A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=tempfail smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D19544BA2E0A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781192120; cv=none; b=Cszte0cv3osTWzGDaRJBb6Y0cyVrFfwy2VAcBQ2dtW7VzDCM5M3V3OL8IQaUaY+q1U5HMbY+nzdT6MkXA1qAf11ohmxPsRBKbhxovCCLF5lTbuuwkjFXugIJfqYYkpwIdOR98wx7ahAPKFOt8Pq2B0P7XDcTm5Y02O4BetOphrs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781192120; c=relaxed/simple; bh=M331E4fVHWIAkdEdFzff6kmAz+PhOh3t5X4EsKOYCcM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EdM7BI+lnpNRxDtE5RrZyi3jEFa4E4Tjt2QhlaCQOQIb6An6FEBpAB53EDGVsmlKsyLcWCyX6JVVQoQbJuX3HVLT2XKNHJPC/dVrg8Izqrqlu9tO0dLSwFaaBc0FAssmvGmYJPId+xUaZHE8EVGp7iC1YOk0UKZ6DXNh/FdMNkg= 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=JUHMM+WM DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D19544BA2E0A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781192120; x=1812728120; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M331E4fVHWIAkdEdFzff6kmAz+PhOh3t5X4EsKOYCcM=; b=JUHMM+WM/PRz3FJ0IgHKcsdCGKn95P1xzSRkbPaL18beA9DAgonyVDM1 FxqSzgDrTM9QggNtI2pTG0KVHbTgPvIAUjSuw0/iAX7F1F/t84MhtVeBd BssRwTCnrA/8yqIgHHt9VtxSyior3wyU4f3S3YtFYano5wDwc5fRRP39l w54WUTpSTLfVi4859b149nEb0z9yrDNZB/ck1s0JwWCDG4cKTnl7+tvZh A7No9bSqP7698/1IsTNiCHFXzVqYrH9fgI9Eco5LB9K/aXY53/N0+oNbP MuKpSDkJksXdmreZukTFW9hCaoDlXjG+wu/yCPuLL3wNkG3MTjFXZ/Jne Q==; X-CSE-ConnectionGUID: T7Yx1fWiTCixLna6pMtGZQ== X-CSE-MsgGUID: DB6cIoWkQZiBjOAQ4pBi6A== X-IronPort-AV: E=McAfee;i="6800,10657,11813"; a="81915903" X-IronPort-AV: E=Sophos;i="6.24,199,1774335600"; d="scan'208";a="81915903" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2026 08:35:19 -0700 X-CSE-ConnectionGUID: m3QLvJmiTk6HVMt3tk4aog== X-CSE-MsgGUID: ODwvGOBLRA+rblSuwu2NkQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,199,1774335600"; d="scan'208";a="270538917" Received: from womilian-mobl.ger.corp.intel.com (HELO localhost) ([10.245.82.28]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2026 08:35:17 -0700 From: Mohamed Bouhaouel To: gdb-patches@sourceware.org Cc: markus.t.metzger@intel.com, stephan.rohr@intel.com, aburgess@redhat.com, mohamed.bouhaouel@intel.com Subject: [PATCH v2 08/11] gdb, testsuite: handle async close in monitor-exit-quit.exp Date: Thu, 11 Jun 2026 17:32:28 +0200 Message-ID: <20260611153232.3011-9-mohamed.bouhaouel@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260611153232.3011-1-mohamed.bouhaouel@intel.com> References: <20260611153232.3011-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