From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ecRMFxIN4WnAbxwAWB0awg (envelope-from ) for ; Thu, 16 Apr 2026 12:23:46 -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=RKFgJT+5; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 58DB71E0C3; Thu, 16 Apr 2026 12:23:46 -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 D0E7C1E04F for ; Thu, 16 Apr 2026 12:23:44 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 4F6AB4BAE7C7 for ; Thu, 16 Apr 2026 16:23:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F6AB4BAE7C7 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=RKFgJT+5 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by sourceware.org (Postfix) with ESMTPS id 05C3C4BA9000 for ; Thu, 16 Apr 2026 16:23:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05C3C4BA9000 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 05C3C4BA9000 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776356599; cv=none; b=EzBFW0KffTfC4iy+lXWRBU+E5lv1d1GuIQp49yx5WT9dbYAA64KYCU5Xjg0AQH211cZ4vEqilRTl5Ld1kNj3pWkq7F1alBlab/t+b9TUTg5xGi+1uTKRgAOyu+JuJLPTsTBJ5GibWdMMRv4ZmcvoDC5iCVJwMqKSEkV3KPMspS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776356599; c=relaxed/simple; bh=f6+UMQW0oROHcxdJe84yCfs7jgLTzdqGU8SwsegrJro=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=E/ACaLk1hNnfeo8EKp+dRt0wYQApyr4EiJ/2o4NmIu2GEgoQ9xzRVtgpsp26qA8T3YIyfEn3tECGF++DyvYTapFOMMTFVBSYdMdfy3Bf9uKVKhZn0a2wIix/ASVURJ8zdczC4kH+V+aplUqQYpB/4J7WK92kVjThu/PH/LSC5BY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05C3C4BA9000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1776356599; x=1807892599; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=f6+UMQW0oROHcxdJe84yCfs7jgLTzdqGU8SwsegrJro=; b=RKFgJT+5OSPnKns1LrSPYsOZLG9rtOjMHginXbDafmea6KHNDVZERihz CCxvguv5IM7+LC2FASH4y4JJIsSt/CuiPL3+u0EwAVotON17aMSGZ0ahU RfKx6KSuAOPVMHM3PBMmUGn4rOhrLFdyrR1kt0YsNY5XxukfmfBE3bqvL g4iiStdxmSIJv7YXMK99khM+UgzY1ZlcYjfBLK9N9iIPZi9R5G/yCyO4E H8L+5MQf9vFzbFPWYcXuOza0ZLb0nR/P96Z5CMK0DaYjwtLhKtAIbK7ci YaYOaSFM9N8VRAfVlY7zbWk1bsPozRC7GHwansgtdxfDTvt18tWQTQXVq g==; X-CSE-ConnectionGUID: KBlq5gExTpWoiOSvONNp1g== X-CSE-MsgGUID: I3IwbNpWQgqn6GFFS6AODA== X-IronPort-AV: E=McAfee;i="6800,10657,11761"; a="88747031" X-IronPort-AV: E=Sophos;i="6.23,181,1770624000"; d="scan'208";a="88747031" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2026 09:23:18 -0700 X-CSE-ConnectionGUID: Q3GP4A26TnurlCta1KtkMw== X-CSE-MsgGUID: hLJq42b7R/mNxxvjQlid6Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,181,1770624000"; d="scan'208";a="268780132" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2026 09:23:17 -0700 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [PATCH] gdb, testsuite: fix gdb.multi/remove-inferiors.exp for remote targets Date: Thu, 16 Apr 2026 18:23:03 +0200 Message-Id: <20260416162303.2764834-1-tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.34.1 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 When running gdb.multi/remove-inferiors.exp with the native-gdbserver board file, we see WARNING: Timed out waiting for EOF in server after monitor exit Fix this by switching back to inferior 2 at the end of the test. When running with native-extended-gdbserver, we see FAIL: gdb.multi/remove-inferiors.exp: runto: run to main Fix this by setting remote exec-file before running to main. After this patch, we see # of expected passes 10 for all three of default, native-gdbserver, native-extended-gdbserver board files. --- gdb/testsuite/gdb.multi/remove-inferiors.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.multi/remove-inferiors.exp b/gdb/testsuite/gdb.multi/remove-inferiors.exp index c991ea59193..75402e26974 100644 --- a/gdb/testsuite/gdb.multi/remove-inferiors.exp +++ b/gdb/testsuite/gdb.multi/remove-inferiors.exp @@ -21,7 +21,7 @@ if { [build_executable ${testfile}.exp ${binfile} "${srcfile}" {debug}] != 0 } { proc switch_to_inferior { num message } { gdb_test "inferior ${num}" \ - "\\\[Switching to inferior ${num} \\\[\\\] \\\(\\\)\\\]" \ + "\\\[Switching to inferior ${num} .*" \ "${message}" } @@ -52,6 +52,8 @@ proc test_remove_inferiors { } { [multi_line "Reading symbols from ${binfile_re}\.\.\.(" \ "Expanding full symbols from ${binfile_re}\.\.\.)?" ] \ "load binary" + gdb_test_no_output "set remote exec-file ${binfile}" \ + "set remote exec-file" if {![runto_main]} { return @@ -65,6 +67,10 @@ proc test_remove_inferiors { } { gdb_test "remove-inferiors 2" \ "warning: Can not remove active inferior 2." \ "can't remove active inferior" + + # Back to inferior 2 for the target to be exited properly, in case + # it is remote. + switch_to_inferior 2 "back to second inferior" } test_remove_inferiors -- 2.34.1 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