qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization
@ 2018-03-22  3:47 Fam Zheng
  2018-03-22  8:33 ` Philippe Mathieu-Daudé
  2018-03-22 13:07 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2018-03-22  3:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Alex Bennée, eblake, Philippe Mathieu-Daudé

The apt-get commands we run through ssh expect certain features of the
tty, and refuses to work if /dev/null is used. It is ugly, but easy to
satisfy.

Actually, there is no reason to hide the output. It just makes things
harder to diagnose. We can always redirect in the Makefile, so don't do
it conditionally here.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/vm/basevm.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 686d88decf..3a2d508c35 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -107,10 +107,7 @@ class BaseVM(object):
         assert not isinstance(cmd, str)
         ssh_cmd += ["%s@127.0.0.1" % user] + list(cmd)
         logging.debug("ssh_cmd: %s", " ".join(ssh_cmd))
-        r = subprocess.call(ssh_cmd,
-                            stdin=sys.stdin if interactive else self._devnull,
-                            stdout=sys.stdout if interactive else self._stdout,
-                            stderr=sys.stderr if interactive else self._stderr)
+        r = subprocess.call(ssh_cmd)
         if check and r != 0:
             raise Exception("SSH command failed: %s" % cmd)
         return r
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization
  2018-03-22  3:47 [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization Fam Zheng
@ 2018-03-22  8:33 ` Philippe Mathieu-Daudé
  2018-03-22 13:07 ` Eric Blake
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-03-22  8:33 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Alex Bennée, eblake

On 03/22/2018 12:47 AM, Fam Zheng wrote:
> The apt-get commands we run through ssh expect certain features of the
> tty, and refuses to work if /dev/null is used. It is ugly, but easy to
> satisfy.
> 
> Actually, there is no reason to hide the output. It just makes things
> harder to diagnose. We can always redirect in the Makefile, so don't do
> it conditionally here.
> 
> Reported-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Fam Zheng <famz@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  tests/vm/basevm.py | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 686d88decf..3a2d508c35 100755
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -107,10 +107,7 @@ class BaseVM(object):
>          assert not isinstance(cmd, str)
>          ssh_cmd += ["%s@127.0.0.1" % user] + list(cmd)
>          logging.debug("ssh_cmd: %s", " ".join(ssh_cmd))
> -        r = subprocess.call(ssh_cmd,
> -                            stdin=sys.stdin if interactive else self._devnull,
> -                            stdout=sys.stdout if interactive else self._stdout,
> -                            stderr=sys.stderr if interactive else self._stderr)
> +        r = subprocess.call(ssh_cmd)
>          if check and r != 0:
>              raise Exception("SSH command failed: %s" % cmd)
>          return r
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization
  2018-03-22  3:47 [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization Fam Zheng
  2018-03-22  8:33 ` Philippe Mathieu-Daudé
@ 2018-03-22 13:07 ` Eric Blake
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2018-03-22 13:07 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Alex Bennée, Philippe Mathieu-Daudé

On 03/21/2018 10:47 PM, Fam Zheng wrote:
> The apt-get commands we run through ssh expect certain features of the
> tty, and refuses to work if /dev/null is used. It is ugly, but easy to
> satisfy.
> 
> Actually, there is no reason to hide the output. It just makes things
> harder to diagnose. We can always redirect in the Makefile, so don't do
> it conditionally here.
> 
> Reported-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>   tests/vm/basevm.py | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)


This got the .img initialization a lot further, although the log still 
shows that there is still a communication glitch early on:

...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
   cloud-initramfs-growroot
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 5,570 B of archives.
After this operation, 23.6 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 
cloud-initramfs-growroot all 0.27ubuntu1.5 [5,570 B]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 5,570 B in 1s (4,554 B/s)
Selecting previously unselected package cloud-initramfs-growroot.
...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
   acpica-tools autotools-dev binutils build-essential cpp cpp-5 debhelper
   device-tree-compiler dh-strip-nondeterminism dpkg-dev g++ g++-5 gcc gcc-5
...


But despite that glitch, the subsequent package updates succeeded, and 
the VM eventually progressed to compiling qemu instead of dying early.  So

Tested-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-22 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-22  3:47 [Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization Fam Zheng
2018-03-22  8:33 ` Philippe Mathieu-Daudé
2018-03-22 13:07 ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).