From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Wang Subject: Re: [PATCH 3/9] KVM test: Make the login re suitable for serial console Date: Thu, 06 May 2010 10:57:32 +0800 Message-ID: <4BE2301C.8030002@redhat.com> References: <20100426095656.26268.50549.stgit@localhost.localdomain> <20100426100346.26268.17314.stgit@localhost.localdomain> <4BD81976.6060303@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: autotest@test.kernel.org, lmr@redhat.com, kvm@vger.kernel.org To: Michael Goldish Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5270 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812Ab0EFC5h (ORCPT ); Wed, 5 May 2010 22:57:37 -0400 In-Reply-To: <4BD81976.6060303@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Michael Goldish wrote: > On 04/26/2010 01:03 PM, Jason Wang wrote: > >> Current matching re ^\s*[Ll]ogin:\s*$ is not suitable for the serial >> console, so change it to [Ll]ogin:. >> >> Signed-off-by: Jason Wang >> --- >> client/tests/kvm/kvm_utils.py | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py >> index 1ea0852..bb42314 100644 >> --- a/client/tests/kvm/kvm_utils.py >> +++ b/client/tests/kvm/kvm_utils.py >> @@ -488,7 +488,7 @@ def remote_login(command, password, prompt, linesep="\n", timeout=10, >> >> while True: >> (match, text) = sub.read_until_last_line_matches( >> - [r"[Aa]re you sure", r"[Pp]assword:\s*$", r"^\s*[Ll]ogin:\s*$", >> + [r"[Aa]re you sure", r"[Pp]assword:\s*$", r"[Ll]ogin:", >> > > This RE will also match > > "Last login: Wed Apr 28 14:07:28 2010 from localhost.localdomain" > > so we should probably settle for [Ll]ogin:\s*$. > > Yes, you are right. >> r"[Cc]onnection.*closed", r"[Cc]onnection.*refused", >> r"[Pp]lease wait", prompt], >> timeout=timeout, internal_timeout=0.5) >> >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > >