Skip to contentSkip to conversation

docker: SHOW_ENV and terminate improvements

PATCH In review Fam Zheng 2 participants 19 messages Sep 21, 2016

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

cover docker: SHOW_ENV and terminate improvements

The first patches add a new feature that if SHOW_ENV is set when running a test, (explicitly installed) package list and env vars will be printed.

The last pactches (hopefully) improves termination of docker instance, so that in a patchew tester env, building and testing procecess (that lies under docker daemon process instead of the make process) can be stopped more reliably, when the patchew tester terminates the make process.

Fam Zheng (9):
docker: Generate /packages.txt in centos6 image
docker: Generate /packages.txt in fedora image
docker: Generate /packages.txt in ubuntu image
docker: Update fedora image to latest
docker: Flatten default target list in test-quick
docker: Print used options before doing configure
docker: Support showing environment information
docker: Terminate instances at SIGTERM and SIGHUP
docker: exec $CMD

 tests/docker/Makefile.include           |  2 +-
 tests/docker/common.rc                  | 14 ++++++++------
 tests/docker/docker.py                  |  5 ++++-
 tests/docker/dockerfiles/centos6.docker |  6 ++++--
 tests/docker/dockerfiles/fedora.docker  | 16 +++++++++++++---
 tests/docker/dockerfiles/ubuntu.docker  |  4 +++-
 tests/docker/run                        | 26 ++++++++++++++++++++------
 tests/docker/test-quick                 |  2 +-
 8 files changed, 54 insertions(+), 21 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/9 docker: Generate /packages.txt in centos6 image

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/centos6.docker | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/centos6.docker +4 -2
index 8f4fe46..34e0d3b 100644
@@ -1,6 +1,8 @@
 FROM centos:6
-RUN yum install -y \
+RUN yum install -y epel-release
+ENV PACKAGES libfdt-devel ccache \
     tar git make gcc g++ \
     zlib-devel glib2-devel SDL-devel pixman-devel \
     epel-release
-RUN yum install -y libfdt-devel ccache
+RUN yum install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
Signature · 1 line
2.7.4
Reviewed-by on v1 1/9
#2 lore raw

Re: [Qemu-devel] [PATCH 1/9] docker: Generate /packages.txt in centos6 image

Quoted 13 lines · Fam Zheng

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/centos6.docker | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/centos6.docker +0 -0
index 8f4fe46..34e0d3b 100644

tests/docker/dockerfiles/centos6.docker line 8

Quoted 10 lines
tests/docker/dockerfiles/centos6.docker +4 -2
@@ -1,6 +1,8 @@
 FROM centos:6
-RUN yum install -y \
+RUN yum install -y epel-release
+ENV PACKAGES libfdt-devel ccache \
     tar git make gcc g++ \
     zlib-devel glib2-devel SDL-devel pixman-devel \
     epel-release
-RUN yum install -y libfdt-devel ccache
+RUN yum install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#3 lore raw

PATCH 2/9 docker: Generate /packages.txt in fedora image

In reply to Fam Zheng

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/fedora.docker | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/fedora.docker +12 -2
index 1d26a8e..b414e88 100644
@@ -1,7 +1,17 @@
 FROM fedora:23
-RUN dnf install -y \
+ENV PACKAGES \
     ccache git tar PyYAML sparse flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
     gcc gcc-c++ clang make perl which bc findutils \
-    mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
+    mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL mingw32-pkg-config \
+    mingw32-gtk2 mingw32-gtk3 mingw32-gnutls mingw32-nettle mingw32-libtasn1 \
+    mingw32-libjpeg-turbo mingw32-libpng mingw32-curl mingw32-libssh2 \
+    mingw32-bzip2 \
+    mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
+    mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
+    mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
+    mingw64-bzip2
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml
Signature · 1 line
2.7.4
Reviewed-by on v1 2/9
#4 lore raw

Re: [Qemu-devel] [PATCH 2/9] docker: Generate /packages.txt in fedora image

Quoted 22 lines · Fam Zheng

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/fedora.docker | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/fedora.docker +3 -2
index 1d26a8e..b414e88 100644
@@ -1,7 +1,17 @@
 FROM fedora:23
-RUN dnf install -y \
+ENV PACKAGES \
     ccache git tar PyYAML sparse flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
     gcc gcc-c++ clang make perl which bc findutils \
-    mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
+    mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL mingw32-pkg-config \
+    mingw32-gtk2 mingw32-gtk3 mingw32-gnutls mingw32-nettle mingw32-libtasn1 \

tests/docker/dockerfiles/fedora.docker line 17

Quoted 10 lines
tests/docker/dockerfiles/fedora.docker +9 -0
+    mingw32-libjpeg-turbo mingw32-libpng mingw32-curl mingw32-libssh2 \
+    mingw32-bzip2 \
+    mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
+    mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
+    mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
+    mingw64-bzip2
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
 ENV FEATURES mingw clang pyyaml

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#5 lore raw

PATCH 3/9 docker: Generate /packages.txt in ubuntu image

In reply to Fam Zheng

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/ubuntu.docker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/ubuntu.docker +3 -1
index a8b88c3..a360a05 100644
@@ -2,10 +2,12 @@ FROM ubuntu:14.04
 RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \
     /etc/apt/sources.list
 RUN apt-get update
-RUN apt-get -y install flex bison \
+ENV PACKAGES flex bison \
     libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev \
     libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
     libspice-protocol-dev libnss3-dev libfdt-dev \
     libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
     git make ccache python-yaml gcc clang sparse
+RUN apt-get -y install $PACKAGES
+RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml
Signature · 1 line
2.7.4
Reviewed-by on v1 3/9
#6 lore raw

Re: [Qemu-devel] [PATCH 3/9] docker: Generate /packages.txt in ubuntu image

Quoted 16 lines · Fam Zheng

Put the list of package names in an environment, and output their package names to the target file in the end.

---
 tests/docker/dockerfiles/ubuntu.docker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/ubuntu.docker +0 -0
index a8b88c3..a360a05 100644
@@ -2,10 +2,12 @@ FROM ubuntu:14.04
 RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \
     /etc/apt/sources.list
 RUN apt-get update

tests/docker/dockerfiles/ubuntu.docker FROM ubuntu:14.04 · line 13

Quoted 10 lines
tests/docker/dockerfiles/ubuntu.docker +3 -1
-RUN apt-get -y install flex bison \
+ENV PACKAGES flex bison \
     libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev \
     libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
     libspice-protocol-dev libnss3-dev libfdt-dev \
     libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
     git make ccache python-yaml gcc clang sparse
+RUN apt-get -y install $PACKAGES
+RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#7 lore raw

PATCH 4/9 docker: Update fedora image to latest

In reply to Fam Zheng

Now that 23 is becoming an "old" release with 24 available. Fedora has a quick release cycle, so use latest to follow more closely.

---
 tests/docker/dockerfiles/fedora.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +1 -1
index b414e88..478163b 100644
@@ -1,4 +1,4 @@
-FROM fedora:23
+FROM fedora:latest
 ENV PACKAGES \
     ccache git tar PyYAML sparse flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
Signature · 1 line
2.7.4
Reviewed-by on v1 4/9
#8 lore raw

Re: [Qemu-devel] [PATCH 4/9] docker: Update fedora image to latest

Quoted 13 lines · Fam Zheng

Now that 23 is becoming an "old" release with 24 available. Fedora has a quick release cycle, so use latest to follow more closely.

---
 tests/docker/dockerfiles/fedora.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/fedora.docker +0 -0
index b414e88..478163b 100644

tests/docker/dockerfiles/fedora.docker line 4

Quoted 5 lines
tests/docker/dockerfiles/fedora.docker +1 -1
@@ -1,4 +1,4 @@
-FROM fedora:23
+FROM fedora:latest
 ENV PACKAGES \
     ccache git tar PyYAML sparse flex bison \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#9 lore raw

PATCH 5/9 docker: Flatten default target list in test-quick

In reply to Fam Zheng

Previously it is expanded to a whitespace separated list which is not the most appropriate format. Since it's only two items, flatten it.

---
 tests/docker/test-quick | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/test-quick +1 -1
index 07cdc59..7885dfa 100755
@@ -13,7 +13,7 @@
 
 . common.rc
 
-DEF_TARGET_LIST="$(echo {x86_64,aarch64}-softmmu)"
+DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
 make check $MAKEFLAGS
Signature · 1 line
2.7.4
Reviewed-by on v1 5/9
#10 lore raw

Re: [Qemu-devel] [PATCH 5/9] docker: Flatten default target list in test-quick

Quoted 13 lines · Fam Zheng

Previously it is expanded to a whitespace separated list which is not the most appropriate format. Since it's only two items, flatten it.

---
 tests/docker/test-quick | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/test-quick +0 -0
index 07cdc59..7885dfa 100755

tests/docker/test-quick line 19

Quoted 8 lines
tests/docker/test-quick +1 -1
@@ -13,7 +13,7 @@
 
 . common.rc
 
-DEF_TARGET_LIST="$(echo {x86_64,aarch64}-softmmu)"
+DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
 make check $MAKEFLAGS

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#11 lore raw

PATCH 6/9 docker: Print used options before doing configure

In reply to Fam Zheng

This makes the configure command more obvious which usually has useful information.

---
 tests/docker/common.rc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
tests/docker/common.rc +8 -6
index 0c6d8d5..510a3ad 100755
@@ -23,11 +23,13 @@ requires()
 
 build_qemu()
 {
-    $QEMU_SRC/configure \
-        --enable-werror \
-        ${TARGET_LIST:+"--target-list=${TARGET_LIST}"} \
-        --prefix="$PWD/install" \
-        $EXTRA_CONFIGURE_OPTS \
-        "$@"
+    config_opts="--enable-werror \
+                 ${TARGET_LIST:+--target-list=${TARGET_LIST}} \
+                 --prefix=$PWD/install \
+                 $EXTRA_CONFIGURE_OPTS \
+                 $@"
+    echo "Configure options:"
+    echo $config_opts
+    $QEMU_SRC/configure $config_opts
     make $MAKEFLAGS
 }
Signature · 1 line
2.7.4
Reviewed-by on v1 6/9
#12 lore raw

Re: [Qemu-devel] [PATCH 6/9] docker: Print used options before doing configure

Quoted 22 lines · Fam Zheng

This makes the configure command more obvious which usually has useful information.

---
 tests/docker/common.rc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
tests/docker/common.rc +0 -6
index 0c6d8d5..510a3ad 100755
@@ -23,11 +23,13 @@ requires()
 
 build_qemu()
 {
-    $QEMU_SRC/configure \
-        --enable-werror \
-        ${TARGET_LIST:+"--target-list=${TARGET_LIST}"} \
-        --prefix="$PWD/install" \
-        $EXTRA_CONFIGURE_OPTS \
-        "$@"

tests/docker/common.rc requires() · line 35

Quoted 10 lines
tests/docker/common.rc +8 -0
+    config_opts="--enable-werror \
+                 ${TARGET_LIST:+--target-list=${TARGET_LIST}} \
+                 --prefix=$PWD/install \
+                 $EXTRA_CONFIGURE_OPTS \
+                 $@"
+    echo "Configure options:"
+    echo $config_opts
+    $QEMU_SRC/configure $config_opts
     make $MAKEFLAGS
 }

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#13 lore raw

PATCH 7/9 docker: Support showing environment information

In reply to Fam Zheng

Add a make variable SHOW_ENV. When it's set to non empty, print the package information and environment variables.

---
 tests/docker/Makefile.include |  2 +-
 tests/docker/run              | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
index 19d4cc7..2fcc3c6 100644
@@ -117,7 +117,7 @@ docker-run-%: docker-qemu-src
 				$(if $(DEBUG),-i,--net=none) \
 				-e TARGET_LIST=$(TARGET_LIST) \
 				-e EXTRA_CONFIGURE_OPTS=$(EXTRA_CONFIGURE_OPTS) \
-				-e V=$V -e J=$J -e DEBUG=$(DEBUG)\
+				-e V=$V -e J=$J -e DEBUG=$(DEBUG) -e SHOW_ENV=$(SHOW_ENV)\
 				-e CCACHE_DIR=/var/tmp/ccache \
 				-v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
 				-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
tests/docker/run +11 -0
index d85d49a..ed7dd31 100755
@@ -40,6 +40,17 @@ for p in dtc pixman; do
     fi
 done
 
+if test -n "$SHOW_ENV"; then
+    if test -f /packages.txt; then
+        echo "Packages installed:"
+        cat /packages.txt
+        echo
+    fi
+    echo "Environment variables:"
+    env
+    echo
+fi
+
 export QEMU_SRC="$TEST_DIR/src"
 
 cd "$QEMU_SRC/tests/docker"
Signature · 1 line
2.7.4
Reviewed-by on v1 7/9
#14 lore raw

Re: [Qemu-devel] [PATCH 7/9] docker: Support showing environment information

Quoted 34 lines · Fam Zheng

Add a make variable SHOW_ENV. When it's set to non empty, print the package information and environment variables.

---
 tests/docker/Makefile.include |  2 +-
 tests/docker/run              | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
index 19d4cc7..2fcc3c6 100644
@@ -117,7 +117,7 @@ docker-run-%: docker-qemu-src
 				$(if $(DEBUG),-i,--net=none) \
 				-e TARGET_LIST=$(TARGET_LIST) \
 				-e EXTRA_CONFIGURE_OPTS=$(EXTRA_CONFIGURE_OPTS) \
-				-e V=$V -e J=$J -e DEBUG=$(DEBUG)\
+				-e V=$V -e J=$J -e DEBUG=$(DEBUG) -e SHOW_ENV=$(SHOW_ENV)\
 				-e CCACHE_DIR=/var/tmp/ccache \
 				-v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \
 				-v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \
tests/docker/run +4 -0
index d85d49a..ed7dd31 100755
@@ -40,6 +40,17 @@ for p in dtc pixman; do
     fi
 done
 
+if test -n "$SHOW_ENV"; then
+    if test -f /packages.txt; then
+        echo "Packages installed:"
+        cat /packages.txt

tests/docker/run for p in dtc pixman; do · line 56

Quoted 10 lines
tests/docker/run +7 -0
+        echo
+    fi
+    echo "Environment variables:"
+    env
+    echo
+fi
+
 export QEMU_SRC="$TEST_DIR/src"
 
 cd "$QEMU_SRC/tests/docker"

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#15 lore raw

PATCH 8/9 docker: Terminate instances at SIGTERM and SIGHUP

In reply to Fam Zheng
---
 tests/docker/docker.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/docker.py +4 -1
index b85c165..552608e 100755
@@ -21,6 +21,7 @@ import uuid
 import argparse
 import tempfile
 import re
+import signal
 from tarfile import TarFile, TarInfo
 from StringIO import StringIO
 from shutil import copy, rmtree
@@ -98,6 +99,8 @@ class Docker(object):
         self._command = _guess_docker_command()
         self._instances = []
         atexit.register(self._kill_instances)
+        signal.signal(signal.SIGTERM, self._kill_instances)
+        signal.signal(signal.SIGHUP, self._kill_instances)
 
     def _do(self, cmd, quiet=True, infile=None, **kwargs):
         if quiet:
@@ -130,7 +133,7 @@ class Docker(object):
         self._do_kill_instances(False, False)
         return 0
 
-    def _kill_instances(self):
+    def _kill_instances(self, *args, **kwargs):
         return self._do_kill_instances(True)
 
     def _output(self, cmd, **kwargs):
Signature · 1 line
2.7.4
Reviewed-by on v1 8/9
#16 lore raw

Re: [Qemu-devel] [PATCH 8/9] docker: Terminate instances at SIGTERM and SIGHUP

Quoted 27 lines · Fam Zheng
---
 tests/docker/docker.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/docker/docker.py +3 -0
index b85c165..552608e 100755
@@ -21,6 +21,7 @@ import uuid
 import argparse
 import tempfile
 import re
+import signal
 from tarfile import TarFile, TarInfo
 from StringIO import StringIO
 from shutil import copy, rmtree
@@ -98,6 +99,8 @@ class Docker(object):
         self._command = _guess_docker_command()
         self._instances = []
         atexit.register(self._kill_instances)
+        signal.signal(signal.SIGTERM, self._kill_instances)
+        signal.signal(signal.SIGHUP, self._kill_instances)
 
     def _do(self, cmd, quiet=True, infile=None, **kwargs):
         if quiet:

tests/docker/docker.py class Docker(object): · line 139

Quoted 8 lines
tests/docker/docker.py +1 -1
@@ -130,7 +133,7 @@ class Docker(object):
         self._do_kill_instances(False, False)
         return 0
 
-    def _kill_instances(self):
+    def _kill_instances(self, *args, **kwargs):
         return self._do_kill_instances(True)
 
     def _output(self, cmd, **kwargs):

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
author
#17 lore raw

PATCH 9/9 docker: exec $CMD

In reply to Fam Zheng

This is the last command to run (unless DEBUG), make it 'exec' to simplify the process tree.

---
 tests/docker/run | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tests/docker/run +9 -6
index ed7dd31..c1e4513 100755
@@ -57,14 +57,17 @@ cd "$QEMU_SRC/tests/docker"
 
 CMD="$QEMU_SRC/tests/docker/$@"
 
-if test -n "$DEBUG"; then
-    echo "* Prepared to run command:"
-    echo "  $CMD"
-    echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
-    echo
-    $SHELL
+if test -z "$DEBUG"; then
+    exec $CMD
 fi
 
+# DEBUG workflow
+echo "* Prepared to run command:"
+echo "  $CMD"
+echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
+echo
+$SHELL
+
 if "$CMD"; then
     exit 0
 elif test -n "$DEBUG"; then
Signature · 1 line
2.7.4
Reviewed-by on v1 9/9
#18 lore raw

Re: [Qemu-devel] [PATCH 9/9] docker: exec $CMD

Quoted 26 lines · Fam Zheng

This is the last command to run (unless DEBUG), make it 'exec' to simplify the process tree.

---
 tests/docker/run | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
tests/docker/run +2 -6
index ed7dd31..c1e4513 100755
@@ -57,14 +57,17 @@ cd "$QEMU_SRC/tests/docker"
 
 CMD="$QEMU_SRC/tests/docker/$@"
 
-if test -n "$DEBUG"; then
-    echo "* Prepared to run command:"
-    echo "  $CMD"
-    echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
-    echo
-    $SHELL
+if test -z "$DEBUG"; then
+    exec $CMD
 fi
 

tests/docker/run cd "$QEMU_SRC/tests/docker" · line 73

Quoted 10 lines
tests/docker/run +7 -0
+# DEBUG workflow
+echo "* Prepared to run command:"
+echo "  $CMD"
+echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
+echo
+$SHELL
+
 if "$CMD"; then
     exit 0
 elif test -n "$DEBUG"; then

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|