qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH  v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI)
@ 2019-01-25 14:00 Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD Alex Bennée
                   ` (14 more replies)
  0 siblings, 15 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée

Hi,

This is the current state of my testing/next branch. It contains a
collection of various fixes from people including a new CI file for
testing BSD's. I've also borrowed Paolo's docker tweak to the centos7
image which I can drop if it gets merged in the meantime.

I've made a number of tweaks to docker.py which make the handling of
binfmt_misc less magical (including skipping copying the binary if
persistent mapping is being used).

The vm-build changes are mainly to improve granularity for testing so
you can run something like:

  make vm-build-all TARGET_LIST=aarch64-softmmu BUILD_TARGET=check-softfloat

to pick a random example ;-)

OpenBSD still seems a bit broken though.

There is also an attempt to run 32 bit workloads through KVM. However
while all x86_64 machines can run 32bit guests (as far as I'm aware)
it is not quite so simple for ARM. There are for example aarch64 chips
that can't run aarch32 guests. Maybe basevm.py should instead use
--accel kvm:tcg rather than replicating the probing that QEMU can do
itself?

The following patches need review:

  : patch 0006/tests make docker.py update use configured binfmt.patch
  : patch 0007/tests make docker.py check for persistent configs.patch
  : patch 0008/tests docker.py be even smarter with persistent b.patch
  : patch 0009/tests PEP8 cleanup of docker.py mostly white spac.patch
  : patch 0011/tests vm call make check directly for netbsd free.patch
  : patch 0012/tests vm add build target option.patch
  : patch 0013/tests vm expose BUILD_TARGET TARGET_LIST and EXTR.patch
  : patch 0014/scripts qemu.py allow arches use KVM for their 32.patch

Alex Bennée (8):
  tests: make docker.py update use configured binfmt path
  tests: make docker.py check for persistent configs
  tests: docker.py be even smarter with persistent binfmt_misc
  tests: PEP8 cleanup of docker.py, mostly white space
  tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386
  tests/vm: add --build-target option
  tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS
  scripts/qemu.py: allow arches use KVM for their 32bit cousins

Daniel P. Berrangé (1):
  travis: stop requesting libffi & gettext from homebrew

Ed Maste (1):
  .cirrus.yml: basic compile and test for FreeBSD

Gerd Hoffmann (1):
  tests/vm: move images to $HOME/.cache/qemu-vm/images

Paolo Bonzini (1):
  docker: disable Xen on CentOS 7

Philippe Mathieu-Daudé (2):
  MAINTAINERS: Add an entry for scripts/archive-source.sh
  archive-source.sh: Clone the submodules locally

 .cirrus.yml                             |  16 ++++
 .travis.yml                             |   2 -
 MAINTAINERS                             |   9 ++
 scripts/archive-source.sh               |   9 +-
 scripts/qemu.py                         |  11 ++-
 tests/docker/docker.py                  | 110 +++++++++++++++++-------
 tests/docker/dockerfiles/centos7.docker |   5 +-
 tests/vm/Makefile.include               |  22 +++--
 tests/vm/basevm.py                      |   3 +
 tests/vm/freebsd                        |   3 +-
 tests/vm/netbsd                         |   3 +-
 tests/vm/ubuntu.i386                    |   3 +-
 12 files changed, 144 insertions(+), 52 deletions(-)
 create mode 100644 .cirrus.yml

-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 02/14] travis: stop requesting libffi & gettext from homebrew Alex Bennée
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Ed Maste, Alex Bennée, Li-Wen Hsu

From: Ed Maste <emaste@freebsd.org>

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .cirrus.yml | 16 ++++++++++++++++
 MAINTAINERS |  8 ++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 .cirrus.yml

diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 0000000000..303fe720d6
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,16 @@
+freebsd_12_task:
+  freebsd_instance:
+    image: freebsd-12-0-release-amd64
+    cpu: 8
+    memory: 8G
+  env:
+    CIRRUS_CLONE_DEPTH: 1
+  install_script: pkg install -y
+    bison curl cyrus-sasl git glib gmake gnutls
+    nettle perl5 pixman pkgconf png usbredir
+  script:
+    - mkdir build
+    - cd build
+    - ../configure || { cat config.log; exit 1; }
+    - gmake -j8
+    - gmake -j8 V=1 check
diff --git a/MAINTAINERS b/MAINTAINERS
index fd3d4de3fa..2ddfb86bb2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2483,6 +2483,14 @@ W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
 
+FreeBSD Hosted Continuous Integration
+M: Ed Maste <emaste@freebsd.org>
+M: Li-Wen Hsu <lwhsu@freebsd.org>
+L: qemu-devel@nongnu.org
+S: Maintained
+F: .cirrus.yml
+W: https://cirrus-ci.com/github/qemu/qemu
+
 Guest Test Compilation Support
 M: Alex Bennée <alex.bennee@linaro.org>
 R: Philippe Mathieu-Daudé <f4bug@amsat.org>
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 02/14] travis: stop requesting libffi & gettext from homebrew
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 03/14] MAINTAINERS: Add an entry for scripts/archive-source.sh Alex Bennée
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

From: Daniel P. Berrangé <berrange@redhat.com>

The default package set installed on macOS builders from Travis already
includes libffi and gettext as shown by log messages:

  Skipping install of libffi formula. It is already up-to-date.
  Using libffi
  Skipping install of gettext formula. It is already up-to-date.
  Using gettext

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .travis.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 87d9fa971c..beea941408 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,8 +40,6 @@ addons:
       - gcovr
   homebrew:
     packages:
-      - libffi
-      - gettext
       - glib
       - pixman
 
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 03/14] MAINTAINERS: Add an entry for scripts/archive-source.sh
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 02/14] travis: stop requesting libffi & gettext from homebrew Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally Alex Bennée
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Alex Bennée

From: Philippe Mathieu-Daudé <philmd@redhat.com>

The scripts/archive-source.sh is used by the VM tests, it makes
sense to add it in the "Build and test automation" section.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 2ddfb86bb2..f2f9a7b0c7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2479,6 +2479,7 @@ F: scripts/travis/
 F: .shippable.yml
 F: tests/docker/
 F: tests/vm/
+F: scripts/archive-source.sh
 W: https://travis-ci.org/qemu/qemu
 W: https://app.shippable.com/github/qemu/qemu
 W: http://patchew.org/QEMU/
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (2 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 03/14] MAINTAINERS: Add an entry for scripts/archive-source.sh Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-30 15:11   ` Daniel P. Berrangé
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7 Alex Bennée
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Alex Bennée, Fam Zheng

From: Philippe Mathieu-Daudé <philmd@redhat.com>

We cloned the QEMU repository from the local storage. Since the
submodules are also available there, clone them too. This is
quicker and reduce network use.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/archive-source.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 6eed2a29bd..ce31be67b0 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -38,6 +38,10 @@ else
 fi
 git clone --shared . "$vroot_dir"
 test $? -ne 0 && error "failed to clone into '$vroot_dir'"
+for sm in $submodules; do
+    git clone --shared "$sm" "$vroot_dir/$sm"
+    test $? -ne 0 && error "failed to clone submodule $sm"
+done
 
 cd "$vroot_dir"
 test $? -ne 0 && error "failed to change into '$vroot_dir'"
@@ -45,11 +49,6 @@ test $? -ne 0 && error "failed to change into '$vroot_dir'"
 git checkout $HEAD
 test $? -ne 0 && error "failed to checkout $HEAD revision"
 
-for sm in $submodules; do
-    git submodule update --init $sm
-    test $? -ne 0 && error "failed to init submodule $sm"
-done
-
 if test -n "$submodules"; then
     {
         git ls-files || error "git ls-files failed"
-- 
2.17.1

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

* [Qemu-devel] [PATCH  v1 05/14] docker: disable Xen on CentOS 7
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (3 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:04   ` Paolo Bonzini
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 06/14] tests: make docker.py update use configured binfmt path Alex Bennée
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

From: Paolo Bonzini <pbonzini@redhat.com>

The Xen repository is failing to install, disable it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/centos7.docker | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker
index e0f18f5a41..e6fcbf4bcd 100644
--- a/tests/docker/dockerfiles/centos7.docker
+++ b/tests/docker/dockerfiles/centos7.docker
@@ -1,5 +1,5 @@
 FROM centos:7
-RUN yum install -y epel-release centos-release-xen
+RUN yum install -y epel-release
 RUN yum -y update
 ENV PACKAGES \
     bison \
@@ -8,7 +8,7 @@ ENV PACKAGES \
     ccache \
     csnappy-devel \
     flex \
-    g++ \
+    gcc-c++ \
     gcc \
     gettext \
     git \
@@ -29,7 +29,6 @@ ENV PACKAGES \
     spice-server-devel \
     tar \
     vte-devel \
-    xen-devel \
     zlib-devel
 RUN yum install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 06/14] tests: make docker.py update use configured binfmt path
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (4 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7 Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 07/14] tests: make docker.py check for persistent configs Alex Bennée
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

When copying a QEMU binary into a linux-user docker image we should
check what the current configured binfmt_misc path is rather than
just assuming "/usr/bin/qemu-bin". Obviously if the user changes the
configuration afterwards they will break their images again.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 02d8a83847..30f463af9f 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -123,17 +123,17 @@ def _check_binfmt_misc(executable):
 
     if not os.path.exists(binfmt_entry):
         print ("No binfmt_misc entry for %s" % (binary))
-        return False
+        return None
 
     with open(binfmt_entry) as x: entry = x.read()
 
-    qpath = "/usr/bin/%s" % (binary)
-    if not re.search("interpreter %s\n" % (qpath), entry):
-        print ("binfmt_misc for %s does not point to %s" % (binary, qpath))
-        return False
-
-    return True
+    m = re.search("interpreter (\S+)\n", entry)
+    interp = m.group(1)
+    if interp and interp != executable:
+        print("binfmt_misc for %s does not point to %s, using %s" %
+              (binary, executable, interp))
 
+    return interp
 
 def _read_qemu_dockerfile(img_name):
     # special case for Debian linux-user images
@@ -394,9 +394,14 @@ class UpdateCommand(SubCommand):
         tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz")
         tmp_tar = TarFile(fileobj=tmp, mode='w')
 
-        # Add the executable to the tarball
-        bn = os.path.basename(args.executable)
-        ff = "/usr/bin/%s" % bn
+        # Add the executable to the tarball, using the current
+        # configured binfmt_misc path.
+        ff = _check_binfmt_misc(args.executable)
+        if not ff:
+            bn = os.path.basename(args.executable)
+            ff = "/usr/bin/%s" % bn
+            print ("No binfmt_misc configured: copied to %s" % (ff))
+
         tmp_tar.add(args.executable, arcname=ff)
 
         # Add any associated libraries
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 07/14] tests: make docker.py check for persistent configs
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (5 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 06/14] tests: make docker.py update use configured binfmt path Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 08/14] tests: docker.py be even smarter with persistent binfmt_misc Alex Bennée
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

binfmt_misc configured with the "F" flag opens the interpreter at
config time. This means it can use an already open file-descriptor to
run QEMU so there is no point trying to copy the binary into a
container.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 30f463af9f..768728785f 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -127,6 +127,11 @@ def _check_binfmt_misc(executable):
 
     with open(binfmt_entry) as x: entry = x.read()
 
+    if re.search("flags:.*F.*\n", entry):
+        print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" %
+              (binary))
+        return None
+
     m = re.search("interpreter (\S+)\n", entry)
     interp = m.group(1)
     if interp and interp != executable:
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 08/14] tests: docker.py be even smarter with persistent binfmt_misc
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (6 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 07/14] tests: make docker.py check for persistent configs Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space Alex Bennée
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

If we have a persistent mapping we don't need the QEMU binary copied
into the container as the kernel has already opened the file and will
pass the fd in. However the support libraries will still need to be
there.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 56 ++++++++++++++++++++++++++++--------------
 1 file changed, 38 insertions(+), 18 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 768728785f..a74338cb61 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -96,13 +96,22 @@ def _get_so_libs(executable):
 
     return libs
 
-def _copy_binary_with_libs(src, dest_dir):
-    """Copy a binary executable and all its dependent libraries.
+def _copy_binary_with_libs(src, bin_dest, dest_dir):
+    """Maybe copy a binary and all its dependent libraries.
+
+    If bin_dest isn't set we only copy the support libraries because
+    we don't need qemu in the docker path to run (due to persistent
+    mapping). Indeed users may get confused if we aren't running what
+    is in the image.
 
     This does rely on the host file-system being fairly multi-arch
-    aware so the file don't clash with the guests layout."""
+    aware so the file don't clash with the guests layout.
+    """
 
-    _copy_with_mkdir(src, dest_dir, "/usr/bin")
+    if bin_dest:
+        _copy_with_mkdir(src, dest_dir, os.path.dirname(bin_dest))
+    else:
+        print("only copying support libraries for %s" % (src))
 
     libs = _get_so_libs(src)
     if libs:
@@ -116,21 +125,26 @@ def _check_binfmt_misc(executable):
 
     The details of setting up binfmt_misc are outside the scope of
     this script but we should at least fail early with a useful
-    message if it won't work."""
+    message if it won't work.
+
+    Returns the configured binfmt path and a valid flag. For
+    persistent configurations we will still want to copy and dependent
+    libraries.
+    """
 
     binary = os.path.basename(executable)
     binfmt_entry = "/proc/sys/fs/binfmt_misc/%s" % (binary)
 
     if not os.path.exists(binfmt_entry):
         print ("No binfmt_misc entry for %s" % (binary))
-        return None
+        return None, False
 
     with open(binfmt_entry) as x: entry = x.read()
 
     if re.search("flags:.*F.*\n", entry):
         print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" %
               (binary))
-        return None
+        return None, True
 
     m = re.search("interpreter (\S+)\n", entry)
     interp = m.group(1)
@@ -138,7 +152,8 @@ def _check_binfmt_misc(executable):
         print("binfmt_misc for %s does not point to %s, using %s" %
               (binary, executable, interp))
 
-    return interp
+    return interp, True
+
 
 def _read_qemu_dockerfile(img_name):
     # special case for Debian linux-user images
@@ -345,7 +360,8 @@ class BuildCommand(SubCommand):
 
             # Validate binfmt_misc will work
             if args.include_executable:
-                if not _check_binfmt_misc(args.include_executable):
+                qpath, enabled = _check_binfmt_misc(args.include_executable)
+                if not enabled:
                     return 1
 
             # Is there a .pre file to run in the build context?
@@ -368,7 +384,9 @@ class BuildCommand(SubCommand):
                 # FIXME: there is no checksum of this executable and the linked
                 # libraries, once the image built any change of this executable
                 # or any library won't trigger another build.
-                _copy_binary_with_libs(args.include_executable, docker_dir)
+                _copy_binary_with_libs(args.include_executable,
+                                       qpath, docker_dir)
+
             for filename in args.extra_files or []:
                 _copy_with_mkdir(filename, docker_dir)
                 cksum += [(filename, _file_checksum(filename))]
@@ -400,14 +418,16 @@ class UpdateCommand(SubCommand):
         tmp_tar = TarFile(fileobj=tmp, mode='w')
 
         # Add the executable to the tarball, using the current
-        # configured binfmt_misc path.
-        ff = _check_binfmt_misc(args.executable)
-        if not ff:
-            bn = os.path.basename(args.executable)
-            ff = "/usr/bin/%s" % bn
-            print ("No binfmt_misc configured: copied to %s" % (ff))
-
-        tmp_tar.add(args.executable, arcname=ff)
+        # configured binfmt_misc path. If we don't get a path then we
+        # only need the support libraries copied
+        ff, enabled = _check_binfmt_misc(args.executable)
+
+        if not enabled:
+            print("binfmt_misc not enabled, update disabled")
+            return 1
+
+        if ff:
+            tmp_tar.add(args.executable, arcname=ff)
 
         # Add any associated libraries
         libs = _get_so_libs(args.executable)
-- 
2.17.1

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

* [Qemu-devel] [PATCH  v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (7 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 08/14] tests: docker.py be even smarter with persistent binfmt_misc Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images Alex Bennée
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

My editor keeps putting squiggly lines under a bunch of the python
lines to remind me how non-PEP8 compliant it is. Clean that up so it's
easier to spot new errors.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 48 ++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 13 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index a74338cb61..53a8c9c801 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -30,7 +30,7 @@ except ImportError:
     from io import StringIO
 from shutil import copy, rmtree
 from pwd import getpwuid
-from datetime import datetime,timedelta
+from datetime import datetime, timedelta
 
 
 FILTERED_ENV_NAMES = ['ftp_proxy', 'http_proxy', 'https_proxy']
@@ -43,9 +43,11 @@ def _text_checksum(text):
     """Calculate a digest string unique to the text content"""
     return hashlib.sha1(text).hexdigest()
 
+
 def _file_checksum(filename):
     return _text_checksum(open(filename, 'rb').read())
 
+
 def _guess_docker_command():
     """ Guess a working docker command or raise exception if not found"""
     commands = [["docker"], ["sudo", "-n", "docker"]]
@@ -59,9 +61,10 @@ def _guess_docker_command():
         except OSError:
             pass
     commands_txt = "\n".join(["  " + " ".join(x) for x in commands])
-    raise Exception("Cannot find working docker command. Tried:\n%s" % \
+    raise Exception("Cannot find working docker command. Tried:\n%s" %
                     commands_txt)
 
+
 def _copy_with_mkdir(src, root_dir, sub_path='.'):
     """Copy src into root_dir, creating sub_path as needed."""
     dest_dir = os.path.normpath("%s/%s" % (root_dir, sub_path))
@@ -96,6 +99,7 @@ def _get_so_libs(executable):
 
     return libs
 
+
 def _copy_binary_with_libs(src, bin_dest, dest_dir):
     """Maybe copy a binary and all its dependent libraries.
 
@@ -117,7 +121,7 @@ def _copy_binary_with_libs(src, bin_dest, dest_dir):
     if libs:
         for l in libs:
             so_path = os.path.dirname(l)
-            _copy_with_mkdir(l , dest_dir, so_path)
+            _copy_with_mkdir(l, dest_dir, so_path)
 
 
 def _check_binfmt_misc(executable):
@@ -142,7 +146,7 @@ def _check_binfmt_misc(executable):
     with open(binfmt_entry) as x: entry = x.read()
 
     if re.search("flags:.*F.*\n", entry):
-        print("binfmt_misc for %s uses persistent(F) mapping to host binary\n" %
+        print("binfmt_misc for %s uses persistent(F) mapping to host binary" %
               (binary))
         return None, True
 
@@ -164,6 +168,7 @@ def _read_qemu_dockerfile(img_name):
                       img_name + ".docker")
     return open(df, "r").read()
 
+
 def _dockerfile_preprocess(df):
     out = ""
     for l in df.splitlines():
@@ -181,6 +186,7 @@ def _dockerfile_preprocess(df):
         out += l + "\n"
     return out
 
+
 class Docker(object):
     """ Running Docker commands """
     def __init__(self):
@@ -248,7 +254,7 @@ class Docker(object):
 
     def build_image(self, tag, docker_dir, dockerfile,
                     quiet=True, user=False, argv=None, extra_files_cksum=[]):
-        if argv == None:
+        if argv is None:
             argv = []
 
         tmp_df = tempfile.NamedTemporaryFile(dir=docker_dir, suffix=".docker")
@@ -269,7 +275,7 @@ class Docker(object):
 
         tmp_df.flush()
 
-        self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + \
+        self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv +
                        [docker_dir],
                        quiet=quiet)
 
@@ -299,9 +305,11 @@ class Docker(object):
     def command(self, cmd, argv, quiet):
         return self._do([cmd] + argv, quiet=quiet)
 
+
 class SubCommand(object):
     """A SubCommand template base class"""
-    name = None # Subcommand name
+    name = None  # Subcommand name
+
     def shared_args(self, parser):
         parser.add_argument("--quiet", action="store_true",
                             help="Run quietly unless an error occurred")
@@ -309,6 +317,7 @@ class SubCommand(object):
     def args(self, parser):
         """Setup argument parser"""
         pass
+
     def run(self, args, argv):
         """Run command.
         args: parsed argument by argument parser.
@@ -316,18 +325,23 @@ class SubCommand(object):
         """
         pass
 
+
 class RunCommand(SubCommand):
     """Invoke docker run and take care of cleaning up"""
     name = "run"
+
     def args(self, parser):
         parser.add_argument("--keep", action="store_true",
                             help="Don't remove image when command completes")
+
     def run(self, args, argv):
         return Docker().run(argv, args.keep, quiet=args.quiet)
 
+
 class BuildCommand(SubCommand):
-    """ Build docker image out of a dockerfile. Arguments: <tag> <dockerfile>"""
+    """ Build docker image out of a dockerfile. Arg: <tag> <dockerfile>"""
     name = "build"
+
     def args(self, parser):
         parser.add_argument("--include-executable", "-e",
                             help="""Specify a binary that will be copied to the
@@ -392,8 +406,8 @@ class BuildCommand(SubCommand):
                 cksum += [(filename, _file_checksum(filename))]
 
             argv += ["--build-arg=" + k.lower() + "=" + v
-                        for k, v in os.environ.iteritems()
-                        if k.lower() in FILTERED_ENV_NAMES]
+                     for k, v in os.environ.iteritems()
+                     if k.lower() in FILTERED_ENV_NAMES]
             dkr.build_image(tag, docker_dir, dockerfile,
                             quiet=args.quiet, user=args.user, argv=argv,
                             extra_files_cksum=cksum)
@@ -402,9 +416,11 @@ class BuildCommand(SubCommand):
 
         return 0
 
+
 class UpdateCommand(SubCommand):
-    """ Update a docker image with new executables. Arguments: <tag> <executable>"""
+    """ Update a docker image with new executables. Args: <tag> <executable>"""
     name = "update"
+
     def args(self, parser):
         parser.add_argument("tag",
                             help="Image Tag")
@@ -457,16 +473,20 @@ class UpdateCommand(SubCommand):
 
         return 0
 
+
 class CleanCommand(SubCommand):
     """Clean up docker instances"""
     name = "clean"
+
     def run(self, args, argv):
         Docker().clean()
         return 0
 
+
 class ImagesCommand(SubCommand):
     """Run "docker images" command"""
     name = "images"
+
     def run(self, args, argv):
         return Docker().command("images", argv, args.quiet)
 
@@ -539,7 +559,7 @@ class CheckCommand(SubCommand):
 
         try:
             dkr = Docker()
-        except:
+        except subprocess.CalledProcessError:
             print("Docker not set up")
             return 1
 
@@ -578,7 +598,8 @@ class CheckCommand(SubCommand):
 
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
-            usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
+                                     usage="%s <subcommand> ..." %
+                                     os.path.basename(sys.argv[0]))
     subparsers = parser.add_subparsers(title="subcommands", help=None)
     for cls in SubCommand.__subclasses__():
         cmd = cls()
@@ -589,5 +610,6 @@ def main():
     args, argv = parser.parse_known_args()
     return args.cmdobj.run(args, argv)
 
+
 if __name__ == "__main__":
     sys.exit(main())
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (8 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386 Alex Bennée
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gerd Hoffmann, Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

From: Gerd Hoffmann <kraxel@redhat.com>

It's easier to move around the images then, by replacing the
subdirectory with a symlink.  Allows to share the images between
multiple qemu checkouts for example.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index a98fb3027f..a58383d263 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -3,7 +3,8 @@
 .PHONY: vm-build-all vm-clean-all
 
 IMAGES := ubuntu.i386 freebsd netbsd openbsd centos
-IMAGE_FILES := $(patsubst %, tests/vm/%.img, $(IMAGES))
+IMAGES_DIR := $(HOME)/.cache/qemu-vm/images
+IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
 
 .PRECIOUS: $(IMAGE_FILES)
 
@@ -24,9 +25,10 @@ vm-build-all: $(addprefix vm-build-, $(IMAGES))
 vm-clean-all:
 	rm -f $(IMAGE_FILES)
 
-tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
-		$(SRC_PATH)/tests/vm/basevm.py \
-		$(SRC_PATH)/tests/vm/Makefile.include
+$(IMAGES_DIR)/%.img:	$(SRC_PATH)/tests/vm/% \
+			$(SRC_PATH)/tests/vm/basevm.py \
+			$(SRC_PATH)/tests/vm/Makefile.include
+	@mkdir -p $(IMAGES_DIR)
 	$(call quiet-command, \
 		$< \
 		$(if $(V)$(DEBUG), --debug) \
@@ -37,7 +39,7 @@ tests/vm/%.img: $(SRC_PATH)/tests/vm/% \
 
 
 # Build in VM $(IMAGE)
-vm-build-%: tests/vm/%.img
+vm-build-%: $(IMAGES_DIR)/%.img
 	$(call quiet-command, \
 		$(SRC_PATH)/tests/vm/$* \
 		$(if $(V)$(DEBUG), --debug) \
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (9 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-31 11:03   ` Philippe Mathieu-Daudé
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option Alex Bennée
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

The "make check" target calls check-qtest which has the appropriate
system binaries as dependencies so we shouldn't need to do two steps
of make invocation. Doing it in two steps was a hangover from when our
make check couldn't run tests in parallel.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/freebsd     | 1 -
 tests/vm/netbsd      | 1 -
 tests/vm/ubuntu.i386 | 1 -
 3 files changed, 3 deletions(-)

diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index 19a3729172..a85c866c30 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -25,7 +25,6 @@ class FreeBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/vtbd1;
         ./configure {configure_opts};
-        gmake --output-sync -j{jobs} {verbose};
         gmake --output-sync -j{jobs} check {verbose};
     """
 
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index fac6a7ce51..edea113bb5 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -25,7 +25,6 @@ class NetBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/rld1a;
         ./configure --python=python2.7 {configure_opts};
-        gmake --output-sync -j{jobs} {verbose};
         gmake --output-sync -j{jobs} check {verbose};
     """
 
diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
index 1b7e1ab8f0..252e514859 100755
--- a/tests/vm/ubuntu.i386
+++ b/tests/vm/ubuntu.i386
@@ -26,7 +26,6 @@ class UbuntuX86VM(basevm.BaseVM):
         sudo chmod a+r /dev/vdb;
         tar -xf /dev/vdb;
         ./configure {configure_opts};
-        make --output-sync -j{jobs};
         make --output-sync check -j{jobs} {verbose};
     """
 
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (10 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386 Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-31 11:02   ` Philippe Mathieu-Daudé
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS Alex Bennée
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

This allows us to invoke the build with a custom target (for the VMs
that use the {target} format string specifier). Currently OpenBSD is
still hardwired due to problems running check.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/basevm.py   | 3 +++
 tests/vm/freebsd     | 2 +-
 tests/vm/netbsd      | 2 +-
 tests/vm/ubuntu.i386 | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 5caf77d6b8..bdca6cb2fc 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -228,6 +228,8 @@ def parse_args(vmcls):
                       help="build image")
     parser.add_option("--build-qemu",
                       help="build QEMU from source in guest")
+    parser.add_option("--build-target",
+                      help="QEMU build target", default="check")
     parser.add_option("--interactive", "-I", action="store_true",
                       help="Interactively run command")
     parser.add_option("--snapshot", "-s", action="store_true",
@@ -255,6 +257,7 @@ def main(vmcls):
             cmd = [vm.BUILD_SCRIPT.format(
                    configure_opts = " ".join(argv),
                    jobs=args.jobs,
+                   target=args.build_target,
                    verbose = "V=1" if args.verbose else "")]
         else:
             cmd = argv
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index a85c866c30..1d64c31b7c 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/vtbd1;
         ./configure {configure_opts};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index edea113bb5..a2c3d13af4 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -25,7 +25,7 @@ class NetBSDVM(basevm.BaseVM):
         cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
         tar -xf /dev/rld1a;
         ./configure --python=python2.7 {configure_opts};
-        gmake --output-sync -j{jobs} check {verbose};
+        gmake --output-sync -j{jobs} {target} {verbose};
     """
 
     def build_image(self, img):
diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
index 252e514859..a22d137e76 100755
--- a/tests/vm/ubuntu.i386
+++ b/tests/vm/ubuntu.i386
@@ -26,7 +26,7 @@ class UbuntuX86VM(basevm.BaseVM):
         sudo chmod a+r /dev/vdb;
         tar -xf /dev/vdb;
         ./configure {configure_opts};
-        make --output-sync check -j{jobs} {verbose};
+        make --output-sync {target} -j{jobs} {verbose};
     """
 
     def _gen_cloud_init_iso(self):
-- 
2.17.1

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

* [Qemu-devel] [PATCH  v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (11 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-31 11:03   ` Philippe Mathieu-Daudé
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins Alex Bennée
  2019-02-01  5:02 ` [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) no-reply
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Fam Zheng, Philippe Mathieu-Daudé

Now the underlying basevm support passes these along we can expose
some additional variables to our Makefile to allow more customised
tweaking of the build. For example:

  make vm-build-freebsd TARGET_LIST=aarch64-softmmu \
    EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \
    BUILD_TARGET=check-softfloat

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index a58383d263..992d823f6b 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -19,6 +19,11 @@ vm-test:
 	@echo ""
 	@echo "  vm-build-all                    - Build QEMU in all VMs"
 	@echo "  vm-clean-all                    - Clean up VM images"
+	@echo
+	@echo "Special variables:"
+	@echo "    BUILD_TARGET=foo		 - override the build target"
+	@echo "    TARGET_LIST=a,b,c    	 - Override target list in builds."
+	@echo '    EXTRA_CONFIGURE_OPTS="..."'
 
 vm-build-all: $(addprefix vm-build-, $(IMAGES))
 
@@ -47,6 +52,9 @@ vm-build-%: $(IMAGES_DIR)/%.img
 		$(if $(J),--jobs $(J)) \
 		$(if $(V),--verbose) \
 		--image "$<" \
-		--build-qemu $(SRC_PATH), \
+		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
+		--build-qemu $(SRC_PATH) -- \
+		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
+		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \
 		"  VM-BUILD $*")
 
-- 
2.17.1

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

* [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (12 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS Alex Bennée
@ 2019-01-25 14:00 ` Alex Bennée
  2019-01-26  3:37   ` Eduardo Habkost
  2019-02-01  5:02 ` [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) no-reply
  14 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 14:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alex Bennée, Eduardo Habkost, Cleber Rosa

A lot of architectures can run their 32 bit cousins on KVM so the
kvm_available function needs to be a little less restricting when
deciding if KVM is available.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 scripts/qemu.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0a5e02eb56..2934ee12c5 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -25,9 +25,18 @@ import tempfile
 
 LOG = logging.getLogger(__name__)
 
+# Mapping host architecture to any additional architectures it can
+# support which often includes its 32 bit cousin.
+ADDITIONAL_ARCHES = {
+    "x86_64" : "i386",
+    "aarch64" : "armhf"
+}
 
 def kvm_available(target_arch=None):
-    if target_arch and target_arch != os.uname()[4]:
+    host_arch = os.uname()[4]
+    if target_arch and target_arch != host_arch:
+        if target_arch == ADDITIONAL_ARCHES[host_arch]:
+            return True
         return False
     return os.access("/dev/kvm", os.R_OK | os.W_OK)
 
-- 
2.17.1

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

* Re: [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7 Alex Bennée
@ 2019-01-25 14:04   ` Paolo Bonzini
  2019-01-25 15:26     ` Alex Bennée
  0 siblings, 1 reply; 25+ messages in thread
From: Paolo Bonzini @ 2019-01-25 14:04 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: Fam Zheng, Philippe Mathieu-Daudé

On 25/01/19 15:00, Alex Bennée wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
> 
> The Xen repository is failing to install, disable it.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

A better version:

--- a/tests/docker/dockerfiles/centos7.docker
+++ b/tests/docker/dockerfiles/centos7.docker
@@ -1,5 +1,6 @@
 FROM centos:7
-RUN yum install -y epel-release centos-release-xen
+RUN yum install -y epel-release centos-release-xen-48
+
 RUN yum -y update
 ENV PACKAGES \
     bison \


I can include it in my pull request too.

Paolo

> ---
>  tests/docker/dockerfiles/centos7.docker | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker
> index e0f18f5a41..e6fcbf4bcd 100644
> --- a/tests/docker/dockerfiles/centos7.docker
> +++ b/tests/docker/dockerfiles/centos7.docker
> @@ -1,5 +1,5 @@
>  FROM centos:7
> -RUN yum install -y epel-release centos-release-xen
> +RUN yum install -y epel-release
>  RUN yum -y update
>  ENV PACKAGES \
>      bison \
> @@ -8,7 +8,7 @@ ENV PACKAGES \
>      ccache \
>      csnappy-devel \
>      flex \
> -    g++ \
> +    gcc-c++ \
>      gcc \
>      gettext \
>      git \
> @@ -29,7 +29,6 @@ ENV PACKAGES \
>      spice-server-devel \
>      tar \
>      vte-devel \
> -    xen-devel \
>      zlib-devel
>  RUN yum install -y $PACKAGES
>  RUN rpm -q $PACKAGES | sort > /packages.txt
> 

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

* Re: [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7
  2019-01-25 14:04   ` Paolo Bonzini
@ 2019-01-25 15:26     ` Alex Bennée
  2019-01-25 15:27       ` Paolo Bonzini
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Bennée @ 2019-01-25 15:26 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Fam Zheng, Philippe Mathieu-Daudé


Paolo Bonzini <pbonzini@redhat.com> writes:

> On 25/01/19 15:00, Alex Bennée wrote:
>> From: Paolo Bonzini <pbonzini@redhat.com>
>>
>> The Xen repository is failing to install, disable it.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> A better version:
>
> --- a/tests/docker/dockerfiles/centos7.docker
> +++ b/tests/docker/dockerfiles/centos7.docker
> @@ -1,5 +1,6 @@
>  FROM centos:7
> -RUN yum install -y epel-release centos-release-xen
> +RUN yum install -y epel-release centos-release-xen-48
> +

What happens if the upstream project moves to a newer release? Will it
break again?

>  RUN yum -y update
>  ENV PACKAGES \
>      bison \
>
>
> I can include it in my pull request too.

Sure... I mainly pulled it in because it's used by the centos VM. I'm
unlikely to get a PR out today as there are some reviews needed.

>
> Paolo
>
>> ---
>>  tests/docker/dockerfiles/centos7.docker | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker
>> index e0f18f5a41..e6fcbf4bcd 100644
>> --- a/tests/docker/dockerfiles/centos7.docker
>> +++ b/tests/docker/dockerfiles/centos7.docker
>> @@ -1,5 +1,5 @@
>>  FROM centos:7
>> -RUN yum install -y epel-release centos-release-xen
>> +RUN yum install -y epel-release
>>  RUN yum -y update
>>  ENV PACKAGES \
>>      bison \
>> @@ -8,7 +8,7 @@ ENV PACKAGES \
>>      ccache \
>>      csnappy-devel \
>>      flex \
>> -    g++ \
>> +    gcc-c++ \
>>      gcc \
>>      gettext \
>>      git \
>> @@ -29,7 +29,6 @@ ENV PACKAGES \
>>      spice-server-devel \
>>      tar \
>>      vte-devel \
>> -    xen-devel \
>>      zlib-devel
>>  RUN yum install -y $PACKAGES
>>  RUN rpm -q $PACKAGES | sort > /packages.txt
>>


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7
  2019-01-25 15:26     ` Alex Bennée
@ 2019-01-25 15:27       ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2019-01-25 15:27 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel, Fam Zheng, Philippe Mathieu-Daudé

On 25/01/19 16:26, Alex Bennée wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> On 25/01/19 15:00, Alex Bennée wrote:
>>> From: Paolo Bonzini <pbonzini@redhat.com>
>>>
>>> The Xen repository is failing to install, disable it.
>>>
>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> A better version:
>>
>> --- a/tests/docker/dockerfiles/centos7.docker
>> +++ b/tests/docker/dockerfiles/centos7.docker
>> @@ -1,5 +1,6 @@
>>  FROM centos:7
>> -RUN yum install -y epel-release centos-release-xen
>> +RUN yum install -y epel-release centos-release-xen-48
>> +
> What happens if the upstream project moves to a newer release? Will it
> break again?
> 

I don't know. We'll see. :)

Paolo

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

* Re: [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins Alex Bennée
@ 2019-01-26  3:37   ` Eduardo Habkost
  2019-01-26  7:37     ` Alex Bennée
  0 siblings, 1 reply; 25+ messages in thread
From: Eduardo Habkost @ 2019-01-26  3:37 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel, Cleber Rosa

On Fri, Jan 25, 2019 at 02:00:17PM +0000, Alex Bennée wrote:
> A lot of architectures can run their 32 bit cousins on KVM so the
> kvm_available function needs to be a little less restricting when
> deciding if KVM is available.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  scripts/qemu.py | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/qemu.py b/scripts/qemu.py
> index 0a5e02eb56..2934ee12c5 100644
> --- a/scripts/qemu.py
> +++ b/scripts/qemu.py
> @@ -25,9 +25,18 @@ import tempfile
>  
>  LOG = logging.getLogger(__name__)
>  
> +# Mapping host architecture to any additional architectures it can
> +# support which often includes its 32 bit cousin.
> +ADDITIONAL_ARCHES = {
> +    "x86_64" : "i386",
> +    "aarch64" : "armhf"
> +}
>  
>  def kvm_available(target_arch=None):
> -    if target_arch and target_arch != os.uname()[4]:
> +    host_arch = os.uname()[4]
> +    if target_arch and target_arch != host_arch:
> +        if target_arch == ADDITIONAL_ARCHES[host_arch]:

This will crash host_arch isn't "x86_64" or "aarch64".  I suggest
ADDITIONAL_ARCHES.get(host_arch)

> +            return True

I don't think we should skip the /dev/kvm check here.


>          return False
>      return os.access("/dev/kvm", os.R_OK | os.W_OK)
>  
> -- 
> 2.17.1
> 

-- 
Eduardo

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

* Re: [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins
  2019-01-26  3:37   ` Eduardo Habkost
@ 2019-01-26  7:37     ` Alex Bennée
  0 siblings, 0 replies; 25+ messages in thread
From: Alex Bennée @ 2019-01-26  7:37 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: QEMU Developers, Cleber Rosa

Good point. I should fall through.

On Sat, 26 Jan 2019, 03:37 Eduardo Habkost <ehabkost@redhat.com wrote:

> On Fri, Jan 25, 2019 at 02:00:17PM +0000, Alex Bennée wrote:
> > A lot of architectures can run their 32 bit cousins on KVM so the
> > kvm_available function needs to be a little less restricting when
> > deciding if KVM is available.
> >
> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> > ---
> >  scripts/qemu.py | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/qemu.py b/scripts/qemu.py
> > index 0a5e02eb56..2934ee12c5 100644
> > --- a/scripts/qemu.py
> > +++ b/scripts/qemu.py
> > @@ -25,9 +25,18 @@ import tempfile
> >
> >  LOG = logging.getLogger(__name__)
> >
> > +# Mapping host architecture to any additional architectures it can
> > +# support which often includes its 32 bit cousin.
> > +ADDITIONAL_ARCHES = {
> > +    "x86_64" : "i386",
> > +    "aarch64" : "armhf"
> > +}
> >
> >  def kvm_available(target_arch=None):
> > -    if target_arch and target_arch != os.uname()[4]:
> > +    host_arch = os.uname()[4]
> > +    if target_arch and target_arch != host_arch:
> > +        if target_arch == ADDITIONAL_ARCHES[host_arch]:
>
> This will crash host_arch isn't "x86_64" or "aarch64".  I suggest
> ADDITIONAL_ARCHES.get(host_arch)
>
> > +            return True
>
> I don't think we should skip the /dev/kvm check here.
>
>
> >          return False
> >      return os.access("/dev/kvm", os.R_OK | os.W_OK)
> >
> > --
> > 2.17.1
> >
>
> --
> Eduardo
>

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

* Re: [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally Alex Bennée
@ 2019-01-30 15:11   ` Daniel P. Berrangé
  0 siblings, 0 replies; 25+ messages in thread
From: Daniel P. Berrangé @ 2019-01-30 15:11 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel, Fam Zheng, Philippe Mathieu-Daudé

On Fri, Jan 25, 2019 at 02:00:07PM +0000, Alex Bennée wrote:
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> We cloned the QEMU repository from the local storage. Since the
> submodules are also available there, clone them too. This is
> quicker and reduce network use.

FYI there's another attempt at solving it here:

  https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg07710.html

though that has some problems, so I prefer what you've done
here.  There's still scope for replacing the git ls-tree + tar
command with a git archive command, but that's tangential to
the problem of reducing network usage.

> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  scripts/archive-source.sh | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> index 6eed2a29bd..ce31be67b0 100755
> --- a/scripts/archive-source.sh
> +++ b/scripts/archive-source.sh
> @@ -38,6 +38,10 @@ else
>  fi
>  git clone --shared . "$vroot_dir"
>  test $? -ne 0 && error "failed to clone into '$vroot_dir'"
> +for sm in $submodules; do
> +    git clone --shared "$sm" "$vroot_dir/$sm"
> +    test $? -ne 0 && error "failed to clone submodule $sm"
> +done

I don't think this is reliable. Notice the message further up
where we define $submodules

  # We want a predictable list of submodules for builds, that is
  # independent of what the developer currently has initialized
  # in their checkout, because the build environment is completely
  # different to the host OS.


IOW, if the developers host build does not require 'dtc', then
the 'dtc' directory will be an empty directory, not a git
submodule checkout. At which point "git clone" has nothing
available.

Second, even if 'dtc' is checked out, we can't assume that
it is checked out at the right commit hash - 'git clone' will
match whatever is currently checked out.

So this needs to be wrapped

   if test -d "$sm/.git"
   then
       git clone --shared "$sm" "$vroot_dir/$sm"
       test $? -ne 0 && error "failed to clone submodule $sm"
   fi


>  
>  cd "$vroot_dir"
>  test $? -ne 0 && error "failed to change into '$vroot_dir'"
> @@ -45,11 +49,6 @@ test $? -ne 0 && error "failed to change into '$vroot_dir'"
>  git checkout $HEAD
>  test $? -ne 0 && error "failed to checkout $HEAD revision"
>  
> -for sm in $submodules; do
> -    git submodule update --init $sm
> -    test $? -ne 0 && error "failed to init submodule $sm"
> -done

This should not be deleted. It ensures that the checkout we
just cloned gets moved to the correct HEAD. It might still
use the network, but that is genuinely neccessary in some
cases. At least the network usage will be minimized if the
developers host already had an updated submodule set.

> -
>  if test -n "$submodules"; then
>      {
>          git ls-files || error "git ls-files failed"


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

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

* Re: [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option Alex Bennée
@ 2019-01-31 11:02   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 11:02 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: Fam Zheng

On 1/25/19 3:00 PM, Alex Bennée wrote:
> This allows us to invoke the build with a custom target (for the VMs
> that use the {target} format string specifier). Currently OpenBSD is
> still hardwired due to problems running check.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

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

> ---
>  tests/vm/basevm.py   | 3 +++
>  tests/vm/freebsd     | 2 +-
>  tests/vm/netbsd      | 2 +-
>  tests/vm/ubuntu.i386 | 2 +-
>  4 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
> index 5caf77d6b8..bdca6cb2fc 100755
> --- a/tests/vm/basevm.py
> +++ b/tests/vm/basevm.py
> @@ -228,6 +228,8 @@ def parse_args(vmcls):
>                        help="build image")
>      parser.add_option("--build-qemu",
>                        help="build QEMU from source in guest")
> +    parser.add_option("--build-target",
> +                      help="QEMU build target", default="check")
>      parser.add_option("--interactive", "-I", action="store_true",
>                        help="Interactively run command")
>      parser.add_option("--snapshot", "-s", action="store_true",
> @@ -255,6 +257,7 @@ def main(vmcls):
>              cmd = [vm.BUILD_SCRIPT.format(
>                     configure_opts = " ".join(argv),
>                     jobs=args.jobs,
> +                   target=args.build_target,
>                     verbose = "V=1" if args.verbose else "")]
>          else:
>              cmd = argv
> diff --git a/tests/vm/freebsd b/tests/vm/freebsd
> index a85c866c30..1d64c31b7c 100755
> --- a/tests/vm/freebsd
> +++ b/tests/vm/freebsd
> @@ -25,7 +25,7 @@ class FreeBSDVM(basevm.BaseVM):
>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
>          tar -xf /dev/vtbd1;
>          ./configure {configure_opts};
> -        gmake --output-sync -j{jobs} check {verbose};
> +        gmake --output-sync -j{jobs} {target} {verbose};
>      """
>  
>      def build_image(self, img):
> diff --git a/tests/vm/netbsd b/tests/vm/netbsd
> index edea113bb5..a2c3d13af4 100755
> --- a/tests/vm/netbsd
> +++ b/tests/vm/netbsd
> @@ -25,7 +25,7 @@ class NetBSDVM(basevm.BaseVM):
>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
>          tar -xf /dev/rld1a;
>          ./configure --python=python2.7 {configure_opts};
> -        gmake --output-sync -j{jobs} check {verbose};
> +        gmake --output-sync -j{jobs} {target} {verbose};
>      """
>  
>      def build_image(self, img):
> diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
> index 252e514859..a22d137e76 100755
> --- a/tests/vm/ubuntu.i386
> +++ b/tests/vm/ubuntu.i386
> @@ -26,7 +26,7 @@ class UbuntuX86VM(basevm.BaseVM):
>          sudo chmod a+r /dev/vdb;
>          tar -xf /dev/vdb;
>          ./configure {configure_opts};
> -        make --output-sync check -j{jobs} {verbose};
> +        make --output-sync {target} -j{jobs} {verbose};
>      """
>  
>      def _gen_cloud_init_iso(self):
> 

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

* Re: [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS Alex Bennée
@ 2019-01-31 11:03   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 11:03 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: Fam Zheng

On 1/25/19 3:00 PM, Alex Bennée wrote:
> Now the underlying basevm support passes these along we can expose
> some additional variables to our Makefile to allow more customised
> tweaking of the build. For example:
> 
>   make vm-build-freebsd TARGET_LIST=aarch64-softmmu \
>     EXTRA_CONFIGURE_OPTS="--disable-tools --disable-docs" \
>     BUILD_TARGET=check-softfloat
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

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

> ---
>  tests/vm/Makefile.include | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
> index a58383d263..992d823f6b 100644
> --- a/tests/vm/Makefile.include
> +++ b/tests/vm/Makefile.include
> @@ -19,6 +19,11 @@ vm-test:
>  	@echo ""
>  	@echo "  vm-build-all                    - Build QEMU in all VMs"
>  	@echo "  vm-clean-all                    - Clean up VM images"
> +	@echo
> +	@echo "Special variables:"
> +	@echo "    BUILD_TARGET=foo		 - override the build target"
> +	@echo "    TARGET_LIST=a,b,c    	 - Override target list in builds."
> +	@echo '    EXTRA_CONFIGURE_OPTS="..."'
>  
>  vm-build-all: $(addprefix vm-build-, $(IMAGES))
>  
> @@ -47,6 +52,9 @@ vm-build-%: $(IMAGES_DIR)/%.img
>  		$(if $(J),--jobs $(J)) \
>  		$(if $(V),--verbose) \
>  		--image "$<" \
> -		--build-qemu $(SRC_PATH), \
> +		$(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \
> +		--build-qemu $(SRC_PATH) -- \
> +		$(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \
> +		$(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \
>  		"  VM-BUILD $*")
>  
> 

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

* Re: [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386 Alex Bennée
@ 2019-01-31 11:03   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-31 11:03 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel; +Cc: Fam Zheng

On 1/25/19 3:00 PM, Alex Bennée wrote:
> The "make check" target calls check-qtest which has the appropriate
> system binaries as dependencies so we shouldn't need to do two steps
> of make invocation. Doing it in two steps was a hangover from when our
> make check couldn't run tests in parallel.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

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

> ---
>  tests/vm/freebsd     | 1 -
>  tests/vm/netbsd      | 1 -
>  tests/vm/ubuntu.i386 | 1 -
>  3 files changed, 3 deletions(-)
> 
> diff --git a/tests/vm/freebsd b/tests/vm/freebsd
> index 19a3729172..a85c866c30 100755
> --- a/tests/vm/freebsd
> +++ b/tests/vm/freebsd
> @@ -25,7 +25,6 @@ class FreeBSDVM(basevm.BaseVM):
>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
>          tar -xf /dev/vtbd1;
>          ./configure {configure_opts};
> -        gmake --output-sync -j{jobs} {verbose};
>          gmake --output-sync -j{jobs} check {verbose};
>      """
>  
> diff --git a/tests/vm/netbsd b/tests/vm/netbsd
> index fac6a7ce51..edea113bb5 100755
> --- a/tests/vm/netbsd
> +++ b/tests/vm/netbsd
> @@ -25,7 +25,6 @@ class NetBSDVM(basevm.BaseVM):
>          cd $(mktemp -d /var/tmp/qemu-test.XXXXXX);
>          tar -xf /dev/rld1a;
>          ./configure --python=python2.7 {configure_opts};
> -        gmake --output-sync -j{jobs} {verbose};
>          gmake --output-sync -j{jobs} check {verbose};
>      """
>  
> diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
> index 1b7e1ab8f0..252e514859 100755
> --- a/tests/vm/ubuntu.i386
> +++ b/tests/vm/ubuntu.i386
> @@ -26,7 +26,6 @@ class UbuntuX86VM(basevm.BaseVM):
>          sudo chmod a+r /dev/vdb;
>          tar -xf /dev/vdb;
>          ./configure {configure_opts};
> -        make --output-sync -j{jobs};
>          make --output-sync check -j{jobs} {verbose};
>      """
>  
> 

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

* Re: [Qemu-devel] [PATCH  v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI)
  2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
                   ` (13 preceding siblings ...)
  2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins Alex Bennée
@ 2019-02-01  5:02 ` no-reply
  14 siblings, 0 replies; 25+ messages in thread
From: no-reply @ 2019-02-01  5:02 UTC (permalink / raw)
  To: alex.bennee; +Cc: fam, qemu-devel

Patchew URL: https://patchew.org/QEMU/20190125140017.6092-1-alex.bennee@linaro.org/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20190125140017.6092-1-alex.bennee@linaro.org/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

end of thread, other threads:[~2019-02-01  5:02 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 14:00 [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 01/14] .cirrus.yml: basic compile and test for FreeBSD Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 02/14] travis: stop requesting libffi & gettext from homebrew Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 03/14] MAINTAINERS: Add an entry for scripts/archive-source.sh Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally Alex Bennée
2019-01-30 15:11   ` Daniel P. Berrangé
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 05/14] docker: disable Xen on CentOS 7 Alex Bennée
2019-01-25 14:04   ` Paolo Bonzini
2019-01-25 15:26     ` Alex Bennée
2019-01-25 15:27       ` Paolo Bonzini
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 06/14] tests: make docker.py update use configured binfmt path Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 07/14] tests: make docker.py check for persistent configs Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 08/14] tests: docker.py be even smarter with persistent binfmt_misc Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images Alex Bennée
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 11/14] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386 Alex Bennée
2019-01-31 11:03   ` Philippe Mathieu-Daudé
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option Alex Bennée
2019-01-31 11:02   ` Philippe Mathieu-Daudé
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS Alex Bennée
2019-01-31 11:03   ` Philippe Mathieu-Daudé
2019-01-25 14:00 ` [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins Alex Bennée
2019-01-26  3:37   ` Eduardo Habkost
2019-01-26  7:37     ` Alex Bennée
2019-02-01  5:02 ` [Qemu-devel] [PATCH v1 00/14] testing/next (binfmt_misc, vm-build and BSD CI) no-reply

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).