From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UPS9L7y8NWcYcTEAWB0awg (envelope-from ) for ; Thu, 14 Nov 2024 04:02:52 -0500 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=g06AfbZE; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id BDA7E1E18C; Thu, 14 Nov 2024 04:02:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.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 autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 185051E11C for ; Thu, 14 Nov 2024 04:02:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B22023858C42 for ; Thu, 14 Nov 2024 09:02:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B22023858C42 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=g06AfbZE Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by sourceware.org (Postfix) with ESMTPS id 68DFF3858CD1 for ; Thu, 14 Nov 2024 09:01:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68DFF3858CD1 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 68DFF3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731574861; cv=none; b=AcvUe+/KTrIRslgcddkau8pkjslVCDCysF8Dt9iB8F2hCrHv8PVughI+Ggp9wUPmJ4FHe6tHwFehpVJ0tFIm/SftUKS5DIMuE8k1EhYCcy8MooCoZGDmWH2ewnrB2ZH5Z34bsevV6XD3MBWf81gIWH40MOp8/DntfoRsFIa2AUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1731574861; c=relaxed/simple; bh=6H7TnF9JRb69Tm3KYBLCm9Oi3YsrB/1HFkoTDQ9NliI=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=LgfwfXu5GIGbQiLpRh8LZ0z0hGF/IlxmVR0j9c5HnHaz9dY3ahJxl29V8pap2DYSD6ZVpZxvsmVW/mU30lkNP1RfuaCvXquW6vZNE0iXia1NisTxQgMXYWrTHsjq2m+RUnXUdHy3kH77vdP5MRCN8nSpv0udcC2Ovu757gFXmmw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 68DFF3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731574862; x=1763110862; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=6H7TnF9JRb69Tm3KYBLCm9Oi3YsrB/1HFkoTDQ9NliI=; b=g06AfbZEZ9QYaxZchir8URZP+nk33HRFhotRPosXmcD+J/WwdKFkZBKo c78lfJA5Z7tGiTenN7w//Zv3uUuogIomWCkHhEm6iajfgfjkvF182gxi4 xZUfcOdjtJAivyyyi8NxTzPQkwETDiZ5QlGGjZprYXkr+beoxM/6CPY/G I5IAi7ZTndgkTId72ATOvn17f6LYMQR41ZkvBT4Z8gfSUGlnW0FDoJBhf UtWxcjesHJAdOCeS6CiIG/njWJuIbBqqeS1X/wam1vsTnABgLRD8WQvTI W3jottcXHDRA3m8Dm0/UWKIQeaRsLSZ7PAJsxEJg9WjI5pGUGVlJkOWeE Q==; X-CSE-ConnectionGUID: b07Z5sHmRq2he0LdTA93lA== X-CSE-MsgGUID: S2308nG3SDCEsnxNRcvnWw== X-IronPort-AV: E=McAfee;i="6700,10204,11255"; a="42126586" X-IronPort-AV: E=Sophos;i="6.12,153,1728975600"; d="scan'208";a="42126586" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2024 01:01:01 -0800 X-CSE-ConnectionGUID: 99TgXd/9RCalywdn/pJtsg== X-CSE-MsgGUID: lYxM7aQDQJOT4K6ZcZ8lIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,153,1728975600"; d="scan'208";a="92933310" Received: from 984fee0031af.jf.intel.com (HELO localhost) ([10.165.54.65]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2024 01:01:00 -0800 From: Stephan Rohr To: gdb-patches@sourceware.org Subject: [PATCH 1/1] testsuite: skip confirmation in 'gdb_reinitialize_dir' Date: Thu, 14 Nov 2024 01:00:51 -0800 Message-Id: <20241114090051.3496256-2-stephan.rohr@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241114090051.3496256-1-stephan.rohr@intel.com> References: <20241114090051.3496256-1-stephan.rohr@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: "Rohr, Stephan" Some shells automatically confirm the 'dir' command: (gdb) dir Reinitialize source path to empty? (y or n) [answered Y; input not from terminal] Source directories searched: $cdir;$cwd (gdb) y dir <...>/gdb/testsuite/gdb.base Undefined command: "y". Try "help". For example, this reprdocues on a MinGW32 environment. Skip sending 'y' if the command is already confirmed. --- gdb/testsuite/lib/gdb.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 410f99e3350..05101500eb9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2238,8 +2238,10 @@ proc gdb_reinitialize_dir { subdir } { } send_gdb "dir\n" gdb_expect 60 { - -re "Reinitialize source path to empty.*y or n. " { - send_gdb "y\n" answer + -re "Reinitialize source path to empty.*y or n.\(\\\s.answered Y; input not from terminal.\)?" { + if {![info exists expect_out(1,string)]} { + send_gdb "y\n" answer + } gdb_expect 60 { -re "Source directories searched.*$gdb_prompt $" { send_gdb "dir $subdir\n" -- 2.34.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928