All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>
Subject: Re: [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login
Date: Thu, 11 Aug 2022 15:30:47 +0100	[thread overview]
Message-ID: <87v8qyj1gi.fsf@linaro.org> (raw)
In-Reply-To: <CAFn=p-a2zUPHv-XJa3VHDPZUwnkPZ4pgS4Y53oP9T4kGZp7r5Q@mail.gmail.com>


John Snow <jsnow@redhat.com> writes:

> On Thu, Aug 11, 2022 at 7:43 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> This is really a limitation of the underlying console code which
>> doesn't allow us to detect the login: and following "#" prompts
>> because it reads input line wise. By adding a small delay we ensure
>> that the login prompt has appeared so we don't accidentally spaff the
>> shell commands to a confused getty in the guest.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Cédric Le Goater <clg@kaod.org>
>> Cc: John Snow <jsnow@redhat.com>
>> ---
>>  tests/avocado/machine_aspeed.py | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
>> index c54da0fd8f..65d38f4efa 100644
>> --- a/tests/avocado/machine_aspeed.py
>> +++ b/tests/avocado/machine_aspeed.py
>> @@ -101,7 +101,9 @@ def do_test_arm_aspeed_buidroot_start(self, image, cpu_id):
>>          self.wait_for_console_pattern('Starting kernel ...')
>>          self.wait_for_console_pattern('Booting Linux on physical CPU ' + cpu_id)
>>          self.wait_for_console_pattern('lease of 10.0.2.15')
>> +        # the line before login:
>>          self.wait_for_console_pattern('Aspeed EVB')
>> +        time.sleep(0.1)
>>          exec_command(self, 'root')
>>          time.sleep(0.1)
>>
>> --
>> 2.30.2
>>
>
> Augh. Sorry my hunch was wrong. I wasn't aware of this problem.
>
> Is ... this 0.1 second sleep really sufficient? I guess it's better
> than not having it, and I can't reasonably ask for something more
> thorough.

We could still do with fixing _console_interaction() so we can handle
waiting for prompts without newlines in them. I had a go but it just got
messy.

>
> Acked-by: John Snow <jsnow@redhat.com>


-- 
Alex Bennée


      parent reply	other threads:[~2022-08-11 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 11:43 [RFC PATCH] tests/avocado: apply a band aid to aspeed-evb login Alex Bennée
2022-08-11 11:55 ` Cédric Le Goater
2022-08-11 13:27   ` Alex Bennée
2022-08-11 14:08 ` John Snow
2022-08-11 14:18   ` Cédric Le Goater
2022-08-11 14:30   ` Alex Bennée [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8qyj1gi.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=bleal@redhat.com \
    --cc=clg@kaod.org \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.