Peter Maydell <[email protected]> writes:

> One common thing to want to do in an avocado test is log into
> the guest. The obvious way to do that would seem to be:
>
>          self.wait_for_console_pattern('login:')
>          exec_command(self, 'root')
>          self.wait_for_console_pattern('Password:')
>          exec_command(self, "passw0rd")
>
> This doesn't work; Thomas tells me that's because the
> wait_for_console_pattern function requires that the guest outputs
> a newline, but the 'login:' and 'Password:' prompt lines don't
> have a newline after them.
>
> What is the right way to do this common thing?

Well the easiest way (which I do on some of my test images) is to enable
autologin so you get a shell prompt at the start.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to