From patchwork Sat Oct 29 07:43:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 59614 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1EA3F3857B9C for ; Sat, 29 Oct 2022 07:44:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EA3F3857B9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667029471; bh=2p6lZvH3Xn6CytcIZVNEqApuj7gB3RoVM597NUnJP4w=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=yrim3UpNsNKR29BmgwQ3kwRAooRSGdkWTgQ6DuGmcm4jAtEdRX2Xp9fvMw8rzn4Rw xTR8yyfk2C+QSMl70BmAIDcaRnLeqm5sUzHWGJ33l23gLDqZkSAUtykNOubp7NmhB5 arNHdkPZMGiPY75CJDByC9+IlbyrL20dGqYeAypo= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id F41CC3858C52 for ; Sat, 29 Oct 2022 07:43:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F41CC3858C52 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2BBE922772 for ; Sat, 29 Oct 2022 07:43:58 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 178E513AA4 for ; Sat, 29 Oct 2022 07:43:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gImXBL7ZXGO+VgAAMHmgww (envelope-from ) for ; Sat, 29 Oct 2022 07:43:58 +0000 To: gdb-patches@sourceware.org Subject: [pushed 3/3] [gdb/testsuite] Use ssh -t in remote-*.exp Date: Sat, 29 Oct 2022 09:43:57 +0200 Message-Id: <20221029074357.12305-4-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20221029074357.12305-1-tdevries@suse.de> References: <20221029074357.12305-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" When running test-case gdb.server/multi-ui-errors.exp on target board remote-gdbserver-on-localhost.exp, I run into: ... (gdb) PASS: gdb.server/multi-ui-errors.exp: connect to gdbserver continue^M Continuing.^M PASS: gdb.server/multi-ui-errors.exp: continue - extra UI Remote debugging from host ::1, port 35466^M FAIL: gdb.server/multi-ui-errors.exp: ensure inferior is running ... The problem is that the target board uses ssh -T, which fails to guarantee that output from the inferior will be available. Fix this by copying proc ${board}_spawn from local-remote-host.exp, which ensures using ssh -t. [ It would be nice to define an ssh base board to get rid of the copies, but I'm not addressing that in this commit. ] Likewise for target board remote-stdio-gdbserver.exp. Tested on x86_64-linux. --- .../boards/remote-gdbserver-on-localhost.exp | 12 ++++++++++++ gdb/testsuite/boards/remote-stdio-gdbserver.exp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp index 27224d39d0b..dacbbfb6f28 100644 --- a/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp +++ b/gdb/testsuite/boards/remote-gdbserver-on-localhost.exp @@ -32,6 +32,18 @@ set_board_info protocol standard set_board_info username $env(USER) set_board_info hostname localhost +proc ${board}_spawn { board cmd } { + global board_info + + set remote [board_info $board hostname] + set username [board_info $board username] + set RSH [board_info $board rsh_prog] + + spawn $RSH -t -l $username $remote $cmd + set board_info($board,fileid) $spawn_id + return $spawn_id +} + # We will be using the standard GDB remote protocol set_board_info gdb_protocol "remote" diff --git a/gdb/testsuite/boards/remote-stdio-gdbserver.exp b/gdb/testsuite/boards/remote-stdio-gdbserver.exp index e1a2d0ed007..498526b7870 100644 --- a/gdb/testsuite/boards/remote-stdio-gdbserver.exp +++ b/gdb/testsuite/boards/remote-stdio-gdbserver.exp @@ -78,3 +78,15 @@ proc ${board}_file { dest op args } { } return [eval [list standard_file $dest $op] $args] } + +proc ${board}_spawn { board cmd } { + global board_info + + set remote [board_info $board hostname] + set username [board_info $board username] + set RSH [board_info $board rsh_prog] + + spawn $RSH -t -l $username $remote $cmd + set board_info($board,fileid) $spawn_id + return $spawn_id +}