From nobody Tue Feb 10 23:01:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524248944776113.79264187990611; Fri, 20 Apr 2018 11:29:04 -0700 (PDT) Received: from localhost ([::1]:50305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9amE-00037P-Ir for importer@patchew.org; Fri, 20 Apr 2018 14:28:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9aek-0005E7-5y for qemu-devel@nongnu.org; Fri, 20 Apr 2018 14:21:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9aej-0007Ec-7K for qemu-devel@nongnu.org; Fri, 20 Apr 2018 14:21:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42552) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f9aej-0007CC-2Q for qemu-devel@nongnu.org; Fri, 20 Apr 2018 14:21:09 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54D1F3133E96; Fri, 20 Apr 2018 18:21:08 +0000 (UTC) Received: from localhost (ovpn-116-52.gru2.redhat.com [10.97.116.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B9475D780; Fri, 20 Apr 2018 18:21:07 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 20 Apr 2018 15:19:33 -0300 Message-Id: <20180420181951.7252-7-ehabkost@redhat.com> In-Reply-To: <20180420181951.7252-1-ehabkost@redhat.com> References: <20180420181951.7252-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Fri, 20 Apr 2018 18:21:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC 06/24] avocado_qemu: Add " " after the default prompt regexp 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: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= , Fam Zheng , Stefan Hajnoczi , Amador Pahim , Cleber Rosa , Alistair Francis Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Luk=C3=A1=C5=A1 Doktor The prompt regexp is quite basic one (# or $), let's require at least one additional space afterwards, which is the case in most modern systems and decreases the probability of false-positives. Signed-off-by: Luk=C3=A1=C5=A1 Doktor Signed-off-by: Eduardo Habkost --- tests/avocado/avocado_qemu/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/avocado/avocado_qemu/test.py b/tests/avocado/avocado_qem= u/test.py index e99c7e9e8d..eeb759ec65 100644 --- a/tests/avocado/avocado_qemu/test.py +++ b/tests/avocado/avocado_qemu/test.py @@ -270,7 +270,7 @@ class _VM(qemu.QEMUMachine): self.password =3D password super(_VM, self).__init__(qemu_bin, name=3Dself.name, arch=3Darch) =20 - def get_console(self, console_address=3DNone, prompt=3D"[\#\$]"): + def get_console(self, console_address=3DNone, prompt=3Dr"[\#\$] "): """ :param address: Socket address, can be either a unix socket path (string) or a tuple in the form (address, port) @@ -297,7 +297,7 @@ class _VM(qemu.QEMUMachine): console =3D aexpect.ShellSession(nc_cmd) try: logging.info('Console: Waiting login prompt...') - _handle_prompts(console, self.username, self.password, "[\#\$]= ") + _handle_prompts(console, self.username, self.password, prompt) logging.info('Console: Ready!') except: console.close() --=20 2.14.3