From nobody Mon Feb 9 15:11:25 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557305950; cv=none; d=zoho.com; s=zohoarc; b=SUY/qW8gKCE06RGJQ7iXKSLmyQL6EHKuP7TABlqhw5FGVaUyhsbLpGUERWIdmp++dViFe00negSoro9WL9UJn+nIuqd+boi0enI4untkxImVnQuwxXy/n406oUHTxUR1kNIrZH+cyKF326yBX+jJfzkR9B7YB4dzGL8pjsTPCgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557305950; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5lYrKa5zkxltPAvjUMTRFDQSmRScSu3x4srssp8oWaM=; b=T0fJYmYrdAnnCGtsPnFto+kED3HplxUUMCr9CV297FKEc7/AcZvFIYqVjtjsHETNCOXUD/qQhOVp9xfonwrBloiM9n4xbPOiV9M9zTitW6EtTyY0kvnG+QMc4vG9yHpiBOkAMBOLWOymuC8X+gWXF0clzhG0n7jW/bkLrw3/sRo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557305950788611.7535689600609; Wed, 8 May 2019 01:59:10 -0700 (PDT) Received: from localhost ([127.0.0.1]:33418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOIPf-0000QQ-LV for importer@patchew.org; Wed, 08 May 2019 04:58:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOINk-0007Tq-4G for qemu-devel@nongnu.org; Wed, 08 May 2019 04:56:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOINj-0002w5-0w for qemu-devel@nongnu.org; Wed, 08 May 2019 04:56:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56118) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOINi-0002uV-QJ for qemu-devel@nongnu.org; Wed, 08 May 2019 04:56:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02DC1C058CC0; Wed, 8 May 2019 08:56:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F11E4106; Wed, 8 May 2019 08:56:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D103AA1E3; Wed, 8 May 2019 10:56:45 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 8 May 2019 10:56:36 +0200 Message-Id: <20190508085645.11595-5-kraxel@redhat.com> In-Reply-To: <20190508085645.11595-1-kraxel@redhat.com> References: <20190508085645.11595-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 08 May 2019 08:56:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 04/13] tests/vm: use ssh with pty unconditionally X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Ed Maste , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Kamil Rytarowski , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Li-Wen Hsu , Brad Smith Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Allways ask ssh to run with a pseudo terminal. Not having a terminal causes problems now and then. Signed-off-by: Gerd Hoffmann --- tests/vm/basevm.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 20eec5420dbf..9c6bb317ac89 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -120,16 +120,14 @@ class BaseVM(object): os.rename(fname + ".download", fname) return fname =20 - def _ssh_do(self, user, cmd, check, interactive=3DFalse): - ssh_cmd =3D ["ssh", "-q", + def _ssh_do(self, user, cmd, check): + ssh_cmd =3D ["ssh", "-q", "-t", "-o", "StrictHostKeyChecking=3Dno", "-o", "UserKnownHostsFile=3D" + os.devnull, "-o", "ConnectTimeout=3D1", "-p", self.ssh_port, "-i", self._ssh_key_file] for var in self.envvars: ssh_cmd +=3D ['-o', "SendEnv=3D%s" % var ] - if interactive: - ssh_cmd +=3D ['-t'] assert not isinstance(cmd, str) ssh_cmd +=3D ["%s@127.0.0.1" % user] + list(cmd) logging.debug("ssh_cmd: %s", " ".join(ssh_cmd)) @@ -141,9 +139,6 @@ class BaseVM(object): def ssh(self, *cmd): return self._ssh_do(self.GUEST_USER, cmd, False) =20 - def ssh_interactive(self, *cmd): - return self._ssh_do(self.GUEST_USER, cmd, False, True) - def ssh_root(self, *cmd): return self._ssh_do("root", cmd, False) =20 @@ -297,9 +292,9 @@ def main(vmcls): return 2 =20 if args.interactive: - if vm.ssh_interactive(*cmd) =3D=3D 0: + if vm.ssh(*cmd) =3D=3D 0: return 0 - vm.ssh_interactive() + vm.ssh() return 3 else: if vm.ssh(*cmd) !=3D 0: --=20 2.18.1