[v6,3/4] tests/vm: use console_consume for netbsd
diff mbox series

Message ID 20191031085306.28888-4-kraxel@redhat.com
State New
Headers show
Series
  • tests/vm: netbsd autoinstall
Related show

Commit Message

Gerd Hoffmann Oct. 31, 2019, 8:53 a.m. UTC
Use new helper to read all pending console output,
not just a single char.  Unblocks installer boot.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/vm/netbsd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kamil Rytarowski Oct. 31, 2019, 10:22 a.m. UTC | #1
Thank you for this work. I hope it will be fine now.

On 31.10.2019 09:53, Gerd Hoffmann wrote:
> Use new helper to read all pending console output,
> not just a single char.  Unblocks installer boot.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  tests/vm/netbsd | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/vm/netbsd b/tests/vm/netbsd
> index 5e04dcd9b1..d1bccccfd0 100755
> --- a/tests/vm/netbsd
> +++ b/tests/vm/netbsd
> @@ -93,7 +93,7 @@ class NetBSDVM(basevm.BaseVM):
>          for char in list("5consdev com0\n"):
>              time.sleep(0.2)
>              self.console_send(char)
> -            self.console_wait("")
> +            self.console_consume()
>          self.console_wait_send("> ", "boot\n")
>  
>          self.console_wait_send("Terminal type",            "xterm\n")
>
Philippe Mathieu-Daudé Oct. 31, 2019, 2:06 p.m. UTC | #2
On 10/31/19 9:53 AM, Gerd Hoffmann wrote:
> Use new helper to read all pending console output,
> not just a single char.  Unblocks installer boot.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>   tests/vm/netbsd | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/vm/netbsd b/tests/vm/netbsd
> index 5e04dcd9b1..d1bccccfd0 100755
> --- a/tests/vm/netbsd
> +++ b/tests/vm/netbsd
> @@ -93,7 +93,7 @@ class NetBSDVM(basevm.BaseVM):

Why not use this by default for everything?

Anyway,
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

>           for char in list("5consdev com0\n"):
>               time.sleep(0.2)
>               self.console_send(char)
> -            self.console_wait("")
> +            self.console_consume()
>           self.console_wait_send("> ", "boot\n")
>   
>           self.console_wait_send("Terminal type",            "xterm\n")
>

Patch
diff mbox series

diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index 5e04dcd9b1..d1bccccfd0 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -93,7 +93,7 @@  class NetBSDVM(basevm.BaseVM):
         for char in list("5consdev com0\n"):
             time.sleep(0.2)
             self.console_send(char)
-            self.console_wait("")
+            self.console_consume()
         self.console_wait_send("> ", "boot\n")
 
         self.console_wait_send("Terminal type",            "xterm\n")