All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH  v1 00/42] current testing/next queue (podman, docker, ci)
@ 2019-09-04 20:29 Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 01/42] hw/misc: Mark most objects as "common" code to speed up compilation a litte bit Alex Bennée
                   ` (43 more replies)
  0 siblings, 44 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, cota, stefanha, marcandre.lureau, pbonzini, aurelien

Hi All,

Here is the current status of my testing/next queue. It brings
together a number of different series as well as some CI fixes that
may be coming in view different trees. So in order we have:

Some fixes to for podman. This is a relatively new alternative to
docker and it works well but needs a little tweak to ensure we can
also use it from cross compiling check-tcg tests.

Paolo's tcg Makefile disentanglement which reduces some of the
Makefile hackage by having a tcg check specific configure step. I've
made a few minor tweaks to the configure script to fix up -static
handling and setting of make variables.

There is then a set of clean-ups to the dockerfiles whhich allow them
to default a target list in the dockerfile environment which can then
be overridden. I then update a bunch of the images to buster which
allows us to drop the rather hokey sid based approach we were using.

The next major chunk is Phillipe's caching changes which make a
considerable difference when constantly rebuild the same tree,
especially if all you are messing around with is ancillary scripts.

Finally there are a few more CI fixes including one slightly hacky
change to deal with variation in python3 implementations.

Please review ;-)

Alex Bennée (27):
  configure: clean-up container cross compile detect
  tests/docker: fix "cc" command to work with podman
  tests/tcg: add .gitignore for in source builds
  tests/docker: move DEF_TARGET_LIST setting to common.rc
  tests/docker: set DEF_TARGET_LIST for some containers
  tests/docker: add Buster to DOCKER_PARTIAL_IMAGES
  tests/docker: move our arm64 cross compile to Buster
  tests/docker: move our powerpc cross compile to Buster
  tests/docker: move our Alpha cross compile to Buster
  tests/docker: move our HPPA cross compile to Buster
  tests/docker: move our m68k cross compile to Buster
  tests/docker: move our sparc64 cross compile to Buster
  tests/docker: move our sh4 cross compile to Buster
  tests/docker: move our mips64 cross compile to Buster
  tests/docker: move our riscv64 cross compile to Buster
  tests/docker: move our ppc64 cross compile to Buster
  tests/docker: drop debian-sid image
  tests/docker: drop powerpc-user image for QEMU cross builds
  tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
  tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES
  tests/docker: avoid $SHELL invoke bash directly
  tests/docker: add debian-amd64-cross for non-x86 hosts
  tests/docker: use --arch-only for installing deps
  tests/docker: add more images to PARTIAL_IMAGES when not on x86_64
  configure: check if --no-pie is supported first
  tests/docker: --disable-libssh on ubuntu1804 builds
  tests/docker: don't always encoding for subprocess.check_output

Cleber Rosa (1):
  Fedora images: use URLs from stable "archives.fedoraproject.org"

Paolo Bonzini (3):
  tests/tcg: use EXTRA_CFLAGS everywhere
  tests/tcg: cleanup Makefile inclusions
  tests/tcg: move configuration to a sub-shell script

Philippe Mathieu-Daudé (10):
  .travis.yml: Enable multiple caching features
  .travis.yml: Increase cache timeout from 3min to 20min
  .travis.yml: Cache Python PIP packages
  .travis.yml: Cache Avocado cache
  .travis.yml: Improve ccache use
  .travis.yml: Enable ccache on OSX
  .travis.yml: Document how the build matrix use caches
  .travis.yml: Cache Linux/GCC 'debug profile' jobs together
  .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together
  .travis.yml: Cache Linux/Clang jobs together

Thomas Huth (1):
  hw/misc: Mark most objects as "common" code to speed up compilation a
    litte bit

 .travis.yml                                   |  39 ++-
 Makefile                                      |   1 +
 Makefile.target                               |   3 -
 configure                                     | 168 ++-----------
 hw/misc/Makefile.objs                         |  90 +++----
 qemu-doc.texi                                 |   6 +-
 tests/Makefile.include                        |  25 +-
 tests/acceptance/boot_linux_console.py        |  25 +-
 tests/acceptance/linux_initrd.py              |   5 +-
 tests/docker/Makefile.include                 |  61 +++--
 tests/docker/common.rc                        |   4 +
 tests/docker/docker.py                        |  51 ++--
 .../dockerfiles/debian-alpha-cross.docker     |   7 +-
 .../dockerfiles/debian-amd64-cross.docker     |  22 ++
 .../dockerfiles/debian-arm64-cross.docker     |   7 +-
 .../dockerfiles/debian-armel-cross.docker     |   3 +-
 .../dockerfiles/debian-armhf-cross.docker     |   3 +-
 .../debian-buster-arm64-cross.docker          |  16 --
 .../dockerfiles/debian-hppa-cross.docker      |   5 +-
 .../dockerfiles/debian-m68k-cross.docker      |   5 +-
 .../dockerfiles/debian-mips-cross.docker      |   7 +-
 .../dockerfiles/debian-mips64-cross.docker    |   5 +-
 .../dockerfiles/debian-mips64el-cross.docker  |   3 +-
 .../dockerfiles/debian-mipsel-cross.docker    |   2 +-
 .../dockerfiles/debian-powerpc-cross.docker   |   8 +-
 .../debian-powerpc-user-cross.docker          |  15 --
 .../dockerfiles/debian-ppc64-cross.docker     |   7 +-
 .../dockerfiles/debian-ppc64el-cross.docker   |   3 +-
 .../dockerfiles/debian-riscv64-cross.docker   |   5 +-
 .../dockerfiles/debian-s390x-cross.docker     |   3 +-
 .../dockerfiles/debian-sh4-cross.docker       |   5 +-
 tests/docker/dockerfiles/debian-sid.docker    |  41 ---
 .../dockerfiles/debian-sparc64-cross.docker   |   5 +-
 tests/docker/dockerfiles/ubuntu1804.docker    |   3 +
 tests/docker/run                              |   4 +-
 tests/docker/test-build                       |   1 -
 tests/docker/test-mingw                       |   1 -
 tests/docker/test-quick                       |   1 -
 tests/tcg/.gitignore                          |   5 +
 tests/tcg/Makefile.include                    |  88 -------
 tests/tcg/Makefile.prereqs                    |  18 ++
 tests/tcg/Makefile.probe                      |  31 ---
 tests/tcg/Makefile.qemu                       |  95 +++++++
 tests/tcg/{Makefile => Makefile.target}       |  15 +-
 tests/tcg/aarch64/Makefile.include            |   8 -
 tests/tcg/aarch64/Makefile.softmmu-target     |   4 +-
 tests/tcg/aarch64/Makefile.target             |  12 +-
 tests/tcg/alpha/Makefile.include              |   2 -
 tests/tcg/alpha/Makefile.softmmu-target       |   4 +-
 tests/tcg/arm/Makefile.include                |   8 -
 tests/tcg/arm/Makefile.softmmu-target         |   6 +-
 tests/tcg/configure.sh                        | 234 ++++++++++++++++++
 tests/tcg/cris/Makefile.include               |   6 -
 tests/tcg/hppa/Makefile.include               |   2 -
 tests/tcg/i386/Makefile.include               |   9 -
 tests/tcg/i386/Makefile.softmmu-target        |  12 +-
 tests/tcg/i386/Makefile.target                |  13 +-
 tests/tcg/m68k/Makefile.include               |   2 -
 tests/tcg/minilib/Makefile.target             |   2 +-
 tests/tcg/mips/Makefile.include               |  20 --
 tests/tcg/ppc/Makefile.include                |  10 -
 tests/tcg/riscv/Makefile.include              |  10 -
 tests/tcg/s390x/Makefile.include              |   2 -
 tests/tcg/sh4/Makefile.include                |   4 -
 tests/tcg/sparc64/Makefile.include            |   2 -
 tests/tcg/x86_64/Makefile.softmmu-target      |  36 +++
 tests/tcg/x86_64/Makefile.target              |   7 +-
 tests/tcg/xtensa/Makefile.include             |  11 -
 tests/tcg/xtensa/Makefile.softmmu-target      |   4 +-
 tests/vm/fedora                               |   2 +-
 70 files changed, 693 insertions(+), 656 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker
 delete mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
 delete mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker
 delete mode 100644 tests/docker/dockerfiles/debian-sid.docker
 create mode 100644 tests/tcg/.gitignore
 delete mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/Makefile.prereqs
 delete mode 100644 tests/tcg/Makefile.probe
 create mode 100644 tests/tcg/Makefile.qemu
 rename tests/tcg/{Makefile => Makefile.target} (90%)
 delete mode 100644 tests/tcg/aarch64/Makefile.include
 delete mode 100644 tests/tcg/alpha/Makefile.include
 delete mode 100644 tests/tcg/arm/Makefile.include
 create mode 100755 tests/tcg/configure.sh
 delete mode 100644 tests/tcg/cris/Makefile.include
 delete mode 100644 tests/tcg/hppa/Makefile.include
 delete mode 100644 tests/tcg/i386/Makefile.include
 delete mode 100644 tests/tcg/m68k/Makefile.include
 delete mode 100644 tests/tcg/mips/Makefile.include
 delete mode 100644 tests/tcg/ppc/Makefile.include
 delete mode 100644 tests/tcg/riscv/Makefile.include
 delete mode 100644 tests/tcg/s390x/Makefile.include
 delete mode 100644 tests/tcg/sh4/Makefile.include
 delete mode 100644 tests/tcg/sparc64/Makefile.include
 create mode 100644 tests/tcg/x86_64/Makefile.softmmu-target
 delete mode 100644 tests/tcg/xtensa/Makefile.include

-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 01/42] hw/misc: Mark most objects as "common" code to speed up compilation a litte bit
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect Alex Bennée
                   ` (42 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Thomas Huth, berrange, stefanb, richard.henderson, f4bug,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

From: Thomas Huth <thuth@redhat.com>

Most of the code in hw/misc/ does not directly depend on CPU-specific
code. Mark it as "common" so that the code can be shared between e.g.
qemu-system-arm and qemu-system-aarch64, or between the various mips
flavours, instead of recompiling it for each and every target again
and again.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190902162638.28142-1-thuth@redhat.com>
---
 hw/misc/Makefile.objs | 90 +++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
index e4aad707fb4..a1506809660 100644
--- a/hw/misc/Makefile.objs
+++ b/hw/misc/Makefile.objs
@@ -26,57 +26,57 @@ common-obj-$(CONFIG_PUV3) += puv3_pm.o
 
 common-obj-$(CONFIG_MACIO) += macio/
 
-obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o
+common-obj-$(CONFIG_IVSHMEM_DEVICE) += ivshmem.o
 
-obj-$(CONFIG_REALVIEW) += arm_sysctl.o
-obj-$(CONFIG_NSERIES) += cbus.o
-obj-$(CONFIG_ECCMEMCTL) += eccmemctl.o
-obj-$(CONFIG_EXYNOS4) += exynos4210_pmu.o exynos4210_clk.o exynos4210_rng.o
-obj-$(CONFIG_IMX) += imx_ccm.o
-obj-$(CONFIG_IMX) += imx31_ccm.o
-obj-$(CONFIG_IMX) += imx25_ccm.o
-obj-$(CONFIG_IMX) += imx6_ccm.o
-obj-$(CONFIG_IMX) += imx6ul_ccm.o
+common-obj-$(CONFIG_REALVIEW) += arm_sysctl.o
+common-obj-$(CONFIG_NSERIES) += cbus.o
+common-obj-$(CONFIG_ECCMEMCTL) += eccmemctl.o
+common-obj-$(CONFIG_EXYNOS4) += exynos4210_pmu.o exynos4210_clk.o exynos4210_rng.o
+common-obj-$(CONFIG_IMX) += imx_ccm.o
+common-obj-$(CONFIG_IMX) += imx31_ccm.o
+common-obj-$(CONFIG_IMX) += imx25_ccm.o
+common-obj-$(CONFIG_IMX) += imx6_ccm.o
+common-obj-$(CONFIG_IMX) += imx6ul_ccm.o
 obj-$(CONFIG_IMX) += imx6_src.o
-obj-$(CONFIG_IMX) += imx7_ccm.o
-obj-$(CONFIG_IMX) += imx2_wdt.o
-obj-$(CONFIG_IMX) += imx7_snvs.o
-obj-$(CONFIG_IMX) += imx7_gpr.o
-obj-$(CONFIG_MILKYMIST) += milkymist-hpdmc.o
-obj-$(CONFIG_MILKYMIST) += milkymist-pfpu.o
-obj-$(CONFIG_MAINSTONE) += mst_fpga.o
-obj-$(CONFIG_OMAP) += omap_clk.o
-obj-$(CONFIG_OMAP) += omap_gpmc.o
-obj-$(CONFIG_OMAP) += omap_l4.o
-obj-$(CONFIG_OMAP) += omap_sdrc.o
-obj-$(CONFIG_OMAP) += omap_tap.o
-obj-$(CONFIG_RASPI) += bcm2835_mbox.o
-obj-$(CONFIG_RASPI) += bcm2835_property.o
-obj-$(CONFIG_RASPI) += bcm2835_rng.o
-obj-$(CONFIG_SLAVIO) += slavio_misc.o
-obj-$(CONFIG_ZYNQ) += zynq_slcr.o
-obj-$(CONFIG_ZYNQ) += zynq-xadc.o
-obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o
+common-obj-$(CONFIG_IMX) += imx7_ccm.o
+common-obj-$(CONFIG_IMX) += imx2_wdt.o
+common-obj-$(CONFIG_IMX) += imx7_snvs.o
+common-obj-$(CONFIG_IMX) += imx7_gpr.o
+common-obj-$(CONFIG_MILKYMIST) += milkymist-hpdmc.o
+common-obj-$(CONFIG_MILKYMIST) += milkymist-pfpu.o
+common-obj-$(CONFIG_MAINSTONE) += mst_fpga.o
+common-obj-$(CONFIG_OMAP) += omap_clk.o
+common-obj-$(CONFIG_OMAP) += omap_gpmc.o
+common-obj-$(CONFIG_OMAP) += omap_l4.o
+common-obj-$(CONFIG_OMAP) += omap_sdrc.o
+common-obj-$(CONFIG_OMAP) += omap_tap.o
+common-obj-$(CONFIG_RASPI) += bcm2835_mbox.o
+common-obj-$(CONFIG_RASPI) += bcm2835_property.o
+common-obj-$(CONFIG_RASPI) += bcm2835_rng.o
+common-obj-$(CONFIG_SLAVIO) += slavio_misc.o
+common-obj-$(CONFIG_ZYNQ) += zynq_slcr.o
+common-obj-$(CONFIG_ZYNQ) += zynq-xadc.o
+common-obj-$(CONFIG_STM32F2XX_SYSCFG) += stm32f2xx_syscfg.o
 obj-$(CONFIG_MIPS_CPS) += mips_cmgcr.o
 obj-$(CONFIG_MIPS_CPS) += mips_cpc.o
 obj-$(CONFIG_MIPS_ITU) += mips_itu.o
-obj-$(CONFIG_MPS2_FPGAIO) += mps2-fpgaio.o
-obj-$(CONFIG_MPS2_SCC) += mps2-scc.o
+common-obj-$(CONFIG_MPS2_FPGAIO) += mps2-fpgaio.o
+common-obj-$(CONFIG_MPS2_SCC) += mps2-scc.o
 
-obj-$(CONFIG_TZ_MPC) += tz-mpc.o
-obj-$(CONFIG_TZ_MSC) += tz-msc.o
-obj-$(CONFIG_TZ_PPC) += tz-ppc.o
-obj-$(CONFIG_IOTKIT_SECCTL) += iotkit-secctl.o
+common-obj-$(CONFIG_TZ_MPC) += tz-mpc.o
+common-obj-$(CONFIG_TZ_MSC) += tz-msc.o
+common-obj-$(CONFIG_TZ_PPC) += tz-ppc.o
+common-obj-$(CONFIG_IOTKIT_SECCTL) += iotkit-secctl.o
 obj-$(CONFIG_IOTKIT_SYSCTL) += iotkit-sysctl.o
-obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o
-obj-$(CONFIG_ARMSSE_CPUID) += armsse-cpuid.o
-obj-$(CONFIG_ARMSSE_MHU) += armsse-mhu.o
+common-obj-$(CONFIG_IOTKIT_SYSINFO) += iotkit-sysinfo.o
+common-obj-$(CONFIG_ARMSSE_CPUID) += armsse-cpuid.o
+common-obj-$(CONFIG_ARMSSE_MHU) += armsse-mhu.o
 
-obj-$(CONFIG_PVPANIC) += pvpanic.o
-obj-$(CONFIG_AUX) += auxbus.o
-obj-$(CONFIG_ASPEED_SOC) += aspeed_xdma.o
-obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
-obj-$(CONFIG_MSF2) += msf2-sysreg.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_rng.o
+common-obj-$(CONFIG_PVPANIC) += pvpanic.o
+common-obj-$(CONFIG_AUX) += auxbus.o
+common-obj-$(CONFIG_ASPEED_SOC) += aspeed_xdma.o
+common-obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
+common-obj-$(CONFIG_MSF2) += msf2-sysreg.o
+common-obj-$(CONFIG_NRF51_SOC) += nrf51_rng.o
 
-obj-$(CONFIG_GRLIB) += grlib_ahb_apb_pnp.o
+common-obj-$(CONFIG_GRLIB) += grlib_ahb_apb_pnp.o
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 01/42] hw/misc: Mark most objects as "common" code to speed up compilation a litte bit Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 17:53   ` David Hildenbrand
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman Alex Bennée
                   ` (41 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

The introduction of podman support inadvertently broke configure's
detect of the container support as the configure probe didn't specify
an engine type. To fix this in docker.py:

  - only (re)set USE_ENGINE if --engine is specified
  - enhance the output so docker is no longer just yes

In the configure script we can at least start cleaning up the
detecting and naming of variables. To avoid too much churn the
conversion of the various make DOCKER_foo variables has been left for
future clean-ups.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure              | 10 +++++-----
 tests/docker/docker.py |  7 ++++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 95134c0180b..94845fc5101 100755
--- a/configure
+++ b/configure
@@ -495,7 +495,7 @@ qed="yes"
 parallels="yes"
 sheepdog="yes"
 libxml2=""
-docker="no"
+container="no"
 debug_mutex="no"
 libpmem=""
 default_devices="yes"
@@ -5894,14 +5894,14 @@ EOF
 fi
 
 ##########################################
-# Docker and cross-compiler support
+# Container based cross-compiler support
 #
 # This is specifically for building test
 # cases for foreign architectures, not
 # cross-compiling QEMU itself.
 
-if has "docker"; then
-    docker=$($python $source_path/tests/docker/docker.py probe)
+if has "docker" || has "podman"; then
+    container=$($python $source_path/tests/docker/docker.py probe)
 fi
 
 ##########################################
@@ -6474,7 +6474,7 @@ echo "qed support       $qed"
 echo "parallels support $parallels"
 echo "sheepdog support  $sheepdog"
 echo "capstone          $capstone"
-echo "docker            $docker"
+echo "container support $container"
 echo "libpmem support   $libpmem"
 echo "libudev           $libudev"
 echo "default devices   $default_devices"
diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 4bba29e104e..e23209f71ee 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -536,9 +536,9 @@ class ProbeCommand(SubCommand):
         try:
             docker = Docker()
             if docker._command[0] == "docker":
-                print("yes")
+                print("docker")
             elif docker._command[0] == "sudo":
-                print("sudo")
+                print("sudo docker")
             elif docker._command[0] == "podman":
                 print("podman")
         except Exception:
@@ -651,7 +651,8 @@ def main():
         cmd.args(subp)
         subp.set_defaults(cmdobj=cmd)
     args, argv = parser.parse_known_args()
-    USE_ENGINE = args.engine
+    if args.engine:
+        USE_ENGINE = args.engine
     return args.cmdobj.run(args, argv)
 
 
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 01/42] hw/misc: Mark most objects as "common" code to speed up compilation a litte bit Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 23:31   ` John Snow
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 04/42] tests/tcg: use EXTRA_CFLAGS everywhere Alex Bennée
                   ` (40 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Podman requires a little bit of additional magic to the uid mapping
which was already done for the normal RunCommand. We simplify the
logic by pushing it directly into the Docker::run method to avoid
instantiating an extra Docker() object and ensure the CC command
always runs as the current user.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py     | 30 +++++++++++++++---------------
 tests/tcg/Makefile.include |  2 +-
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index e23209f71ee..8f391eb278b 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -318,10 +318,20 @@ class Docker(object):
             return False
         return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
 
-    def run(self, cmd, keep, quiet):
+    def run(self, cmd, keep, quiet, as_user=False):
         label = uuid.uuid1().hex
         if not keep:
             self._instances.append(label)
+
+        if as_user:
+            uid = os.getuid()
+            cmd = [ "-u", str(uid) ] + cmd
+            # podman requires a bit more fiddling
+            if self._command[0] == "podman":
+                cmd = [ "--uidmap", "%d:0:1" % uid,
+                        "--uidmap", "0:1:%d" % uid,
+                        "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + cmd
+
         ret = self._do_check(["run", "--label",
                              "com.qemu.instance.uuid=" + label] + cmd,
                              quiet=quiet)
@@ -364,15 +374,8 @@ class RunCommand(SubCommand):
                             help="Run container using the current user's uid")
 
     def run(self, args, argv):
-        if args.run_as_current_user:
-            uid = os.getuid()
-            argv = [ "-u", str(uid) ] + argv
-            docker = Docker()
-            if docker._command[0] == "podman":
-                argv = [ "--uidmap", "%d:0:1" % uid,
-                         "--uidmap", "0:1:%d" % uid,
-                         "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
-        return Docker().run(argv, args.keep, quiet=args.quiet)
+        return Docker().run(argv, args.keep, quiet=args.quiet,
+                            as_user=args.run_as_current_user)
 
 
 class BuildCommand(SubCommand):
@@ -556,8 +559,6 @@ class CcCommand(SubCommand):
                             help="The docker image in which to run cc")
         parser.add_argument("--cc", default="cc",
                             help="The compiler executable to call")
-        parser.add_argument("--user",
-                            help="The user-id to run under")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -571,11 +572,10 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
-        if args.user:
-            cmd += ["-u", args.user]
         cmd += [args.image, args.cc]
         cmd += argv
-        return Docker().command("run", cmd, args.quiet)
+        return Docker().run(cmd, False, quiet=args.quiet,
+                            as_user=True)
 
 
 class CheckCommand(SubCommand):
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index 73b5626fc5f..210f8428237 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -41,7 +41,7 @@ ifneq ($(DOCKER_IMAGE),)
 # We also need the Docker make rules to depend on
 include $(SRC_PATH)/tests/docker/Makefile.include
 
-DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
+DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
 		--cc $(DOCKER_CROSS_COMPILER) \
 		-i qemu:$(DOCKER_IMAGE) \
 		-s $(SRC_PATH) -- "
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 04/42] tests/tcg: use EXTRA_CFLAGS everywhere
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (2 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 05/42] tests/tcg: cleanup Makefile inclusions Alex Bennée
                   ` (39 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Eduardo Habkost, stefanb,
	richard.henderson, f4bug, Max Filippov, cota, stefanha,
	marcandre.lureau, pbonzini, open list:ARM TCG CPUs, aurelien,
	Richard Henderson

From: Paolo Bonzini <pbonzini@redhat.com>

For i386 specifically, this allows using the host GCC
to compile the i386 tests.  But, it should really be
done for all targets, unless we want to pass $(EXTRA_CFLAGS)
directly as part of $(CC).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190807143523.15917-2-pbonzini@redhat.com>
---
 tests/tcg/aarch64/Makefile.softmmu-target | 4 ++--
 tests/tcg/alpha/Makefile.softmmu-target   | 4 ++--
 tests/tcg/arm/Makefile.softmmu-target     | 2 +-
 tests/tcg/i386/Makefile.softmmu-target    | 4 ++--
 tests/tcg/minilib/Makefile.target         | 2 +-
 tests/tcg/xtensa/Makefile.softmmu-target  | 4 ++--
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target
index 2e560e4d08e..4c4aaf61dd3 100644
--- a/tests/tcg/aarch64/Makefile.softmmu-target
+++ b/tests/tcg/aarch64/Makefile.softmmu-target
@@ -22,11 +22,11 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
 .PRECIOUS: $(CRT_OBJS)
 
 %.o: $(CRT_PATH)/%.S
-	$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
 
 # Build and link the tests
 %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
-	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 
 memory: CFLAGS+=-DCHECK_UNALIGNED=1
 
diff --git a/tests/tcg/alpha/Makefile.softmmu-target b/tests/tcg/alpha/Makefile.softmmu-target
index 3c0f34cc692..09193a62d68 100644
--- a/tests/tcg/alpha/Makefile.softmmu-target
+++ b/tests/tcg/alpha/Makefile.softmmu-target
@@ -22,11 +22,11 @@ LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
 .PRECIOUS: $(CRT_OBJS)
 
 %.o: $(CRT_PATH)/%.S
-	$(CC) $(CFLAGS) -x assembler-with-cpp -c $< -o $@
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@
 
 # Build and link the tests
 %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
-	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 
 memory: CFLAGS+=-DCHECK_UNALIGNED=0
 
diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target
index 49d48d8a1c3..2deb06e6e46 100644
--- a/tests/tcg/arm/Makefile.softmmu-target
+++ b/tests/tcg/arm/Makefile.softmmu-target
@@ -18,7 +18,7 @@ CFLAGS+=-Wl,--build-id=none -x assembler-with-cpp
 LDFLAGS+=-nostdlib -N -static
 
 %: %.S %.ld
-	$(CC) $(CFLAGS) $(ASFLAGS) $< -o $@ $(LDFLAGS) -T $(ARM_SRC)/$@.ld
+	$(CC) $(CFLAGS) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) -T $(ARM_SRC)/$@.ld
 
 # Specific Test Rules
 
diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.softmmu-target
index 0a4364868ce..cee342017e5 100644
--- a/tests/tcg/i386/Makefile.softmmu-target
+++ b/tests/tcg/i386/Makefile.softmmu-target
@@ -32,11 +32,11 @@ TESTS+=$(MULTIARCH_TESTS)
 .PRECIOUS: $(CRT_OBJS)
 
 %.o: $(CRT_PATH)/%.S
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
 
 # Build and link the tests
 %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
-	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 
 memory: CFLAGS+=-DCHECK_UNALIGNED=1
 
diff --git a/tests/tcg/minilib/Makefile.target b/tests/tcg/minilib/Makefile.target
index 3ed8077d0f9..c821d2806a9 100644
--- a/tests/tcg/minilib/Makefile.target
+++ b/tests/tcg/minilib/Makefile.target
@@ -18,4 +18,4 @@ MINILIB_INC=-isystem $(SYSTEM_MINILIB_SRC)
 .PRECIOUS: $(MINILIB_OBJS)
 
 %.o: $(SYSTEM_MINILIB_SRC)/%.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
diff --git a/tests/tcg/xtensa/Makefile.softmmu-target b/tests/tcg/xtensa/Makefile.softmmu-target
index 8212d96b81d..9530cac2ad9 100644
--- a/tests/tcg/xtensa/Makefile.softmmu-target
+++ b/tests/tcg/xtensa/Makefile.softmmu-target
@@ -34,9 +34,9 @@ $(XTENSA_USABLE_TESTS): linker.ld macros.inc $(CRT) Makefile.softmmu-target
 
 # special rule for common blobs
 %.o: %.S
-	$(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) -c $< -o $@
+	$(CC) $(XTENSA_INC) $($*_ASFLAGS) $(ASFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
 
 %: %.S
-	$(CC) $(XTENSA_INC) $(ASFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
+	$(CC) $(XTENSA_INC) $(ASFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) $(NOSTDFLAGS) $(CRT)
 
 endif
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 05/42] tests/tcg: cleanup Makefile inclusions
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (3 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 04/42] tests/tcg: use EXTRA_CFLAGS everywhere Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script Alex Bennée
                   ` (38 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Peter Maydell, berrange, Eduardo Habkost, stefanb,
	Alex Bennée, richard.henderson, f4bug,
	Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini,
	open list:ARM TCG CPUs, aurelien, Richard Henderson

From: Paolo Bonzini <pbonzini@redhat.com>

Rename Makefile.probe to Makefile.prereqs and make it actually
define rules for the tests.

Rename Makefile to Makefile.target, since it is not a toplevel
makefile.

Rename Makefile.include to Makefile.qemu and disentangle it
from the QEMU Makefile.target, so that it is invoked recursively
by tests/Makefile.include.  Tests are now placed in
tests/tcg/$(TARGET).

Drop the usage of TARGET_BASE_ARCH, which is ignored by everything except
x86_64 and aarch64.  Fix x86 tests by using -cpu max and, while
at it, standardize on QEMU_OPTS for aarch64 tests too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190807143523.15917-3-pbonzini@redhat.com>
---
 Makefile.target                               |  3 --
 tests/Makefile.include                        | 23 +++++----
 .../tcg/{Makefile.probe => Makefile.prereqs}  |  5 +-
 tests/tcg/{Makefile.include => Makefile.qemu} | 48 +++++++++++--------
 tests/tcg/{Makefile => Makefile.target}       | 13 ++---
 tests/tcg/aarch64/Makefile.target             | 12 +++--
 tests/tcg/arm/Makefile.softmmu-target         |  4 --
 tests/tcg/i386/Makefile.softmmu-target        |  8 ----
 tests/tcg/i386/Makefile.target                | 13 ++---
 tests/tcg/x86_64/Makefile.softmmu-target      | 36 ++++++++++++++
 tests/tcg/x86_64/Makefile.target              |  7 +--
 11 files changed, 100 insertions(+), 72 deletions(-)
 rename tests/tcg/{Makefile.probe => Makefile.prereqs} (92%)
 rename tests/tcg/{Makefile.include => Makefile.qemu} (52%)
 rename tests/tcg/{Makefile => Makefile.target} (92%)
 create mode 100644 tests/tcg/x86_64/Makefile.softmmu-target

diff --git a/Makefile.target b/Makefile.target
index 933b27453a1..5e916230c43 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -39,9 +39,6 @@ endif
 PROGS=$(QEMU_PROG) $(QEMU_PROGW)
 STPFILES=
 
-# Makefile Tests
-include $(SRC_PATH)/tests/tcg/Makefile.include
-
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
diff --git a/tests/Makefile.include b/tests/Makefile.include
index f5ac09549ca..8400656b9d3 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -1062,23 +1062,28 @@ RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
 ifeq ($(HAVE_USER_DOCKER),y)
 # Probe for the Docker Builds needed for each build
 $(foreach PROBE_TARGET,$(TARGET_DIRS), 				\
-	$(eval -include $(SRC_PATH)/tests/tcg/Makefile.probe) 	\
-	$(if $(DOCKER_PREREQ), 					\
-		$(eval build-tcg-tests-$(PROBE_TARGET): $(DOCKER_PREREQ))))
+	$(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
 endif
 
 build-tcg-tests-%:
-	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" \
-		SKIP_DOCKER_BUILD=1 TARGET_DIR="$*/" guest-tests, \
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
+		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
+		SRC_PATH=$(SRC_PATH) \
+	       	V="$(V)" TARGET_DIR="$*/" guest-tests, \
 		"BUILD", "TCG tests for $*")
 
-run-tcg-tests-%: % build-tcg-tests-%
-	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" \
-		SKIP_DOCKER_BUILD=1 TARGET_DIR="$*/" run-guest-tests, \
+run-tcg-tests-%: build-tcg-tests-% %/all
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
+		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
+		SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \
+		V="$(V)" TARGET_DIR="$*/" run-guest-tests, \
 		"RUN", "TCG tests for $*")
 
 clean-tcg-tests-%:
-	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,)
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
+		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
+		SRC_PATH=$(SRC_PATH) TARGET_DIR="$*/" clean-guest-tests, \
+		"RUN", "TCG tests for $*")
 
 .PHONY: build-tcg
 build-tcg: $(BUILD_TCG_TARGET_RULES)
diff --git a/tests/tcg/Makefile.probe b/tests/tcg/Makefile.prereqs
similarity index 92%
rename from tests/tcg/Makefile.probe
rename to tests/tcg/Makefile.prereqs
index 9dc654663d6..53b01962e1d 100644
--- a/tests/tcg/Makefile.probe
+++ b/tests/tcg/Makefile.prereqs
@@ -8,20 +8,19 @@
 # each target.
 
 # First we need the target makefile which tells us the target architecture
+CROSS_CC_GUEST:=
 -include $(BUILD_DIR)/$(PROBE_TARGET)/config-target.mak
 
 # Then we load up the target architecture makefiles which tell us
 # about the compilers
-CROSS_CC_GUEST:=
 DOCKER_IMAGE:=
-DOCKER_PREREQ:=
 
 -include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
 
 ifndef CROSS_CC_GUEST
 ifneq ($(DOCKER_IMAGE),)
-DOCKER_PREREQ:=docker-image-$(DOCKER_IMAGE)
+build-tcg-tests-$(PROBE_TARGET): docker-image-$(DOCKER_IMAGE)
 endif
 endif
 
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.qemu
similarity index 52%
rename from tests/tcg/Makefile.include
rename to tests/tcg/Makefile.qemu
index 210f8428237..7eff11d434e 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.qemu
@@ -2,20 +2,23 @@
 #
 # TCG tests (per-target rules)
 #
-# This Makefile fragment is included from the per-target
-# Makefile.target so will be invoked for each linux-user program we
-# build. We have two options for compiling, either using a configured
-# guest compiler or calling one of our docker images to do it for us.
+# This Makefile fragment is included from the build-tcg target, once
+# for each target we build. We have two options for compiling, either
+# using a configured guest compiler or calling one of our docker images
+# to do it for us.
 #
 
 # The per ARCH makefile, if it exists, holds extra information about
 # useful docker images or alternative compiler flags.
 
--include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
--include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
+include $(TARGET_DIR)config-target.mak
+include $(SRC_PATH)/rules.mak
+include $(wildcard \
+	$(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include \
+	$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include)
 
 GUEST_BUILD=
-TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile
+TCG_MAKE=../Makefile.target
 # Support installed Cross Compilers
 
 ifdef CROSS_CC_GUEST
@@ -23,9 +26,9 @@ ifdef CROSS_CC_GUEST
 .PHONY: cross-build-guest-tests
 cross-build-guest-tests:
 	$(call quiet-command, \
-	   (mkdir -p tests && cd tests && \
-	    $(MAKE) -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \
-			BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
+	   (mkdir -p tests/tcg/$(TARGET_DIR) && cd tests/tcg/$(TARGET_DIR) && \
+	    $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" CC="$(CROSS_CC_GUEST)" \
+			SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
 			EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
 	"BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
 
@@ -39,20 +42,20 @@ ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
 ifneq ($(DOCKER_IMAGE),)
 
 # We also need the Docker make rules to depend on
+SKIP_DOCKER_BUILD=1
 include $(SRC_PATH)/tests/docker/Makefile.include
 
 DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
 		--cc $(DOCKER_CROSS_COMPILER) \
 		-i qemu:$(DOCKER_IMAGE) \
 		-s $(SRC_PATH) -- "
-DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE)
 
 .PHONY: docker-build-guest-tests
-docker-build-guest-tests: $(DOCKER_PREREQ)
+docker-build-guest-tests: docker-image-$(DOCKER_IMAGE)
 	$(call quiet-command, \
-	  (mkdir -p tests && cd tests && \
-	   $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \
-			BUILD_STATIC=y \
+	  (mkdir -p tests/tcg/$(TARGET_DIR) && cd tests/tcg/$(TARGET_DIR) && \
+	   $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" CC=$(DOCKER_COMPILE_CMD) \
+			SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \
 			EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \
 	"BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
 
@@ -62,27 +65,32 @@ endif
 endif
 
 # Final targets
+all:
+	@echo "Do not invoke this Makefile directly"; exit 1
+
 .PHONY: guest-tests
 
 ifneq ($(GUEST_BUILD),)
 guest-tests: $(GUEST_BUILD)
 
-run-guest-tests: guest-tests qemu-$(subst y,system-,$(CONFIG_SOFTMMU))$(TARGET_NAME)
+run-guest-tests: guest-tests
 	$(call quiet-command, \
-	(cd tests && $(MAKE) -f $(TCG_MAKE) SPEED=$(SPEED) run), \
+	(cd tests/tcg/$(TARGET_DIR) && \
+	 $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" \
+	 		SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run), \
 	"RUN", "tests for $(TARGET_NAME)")
 
 else
 guest-tests:
 	$(call quiet-command, /bin/true, "BUILD", \
-		"$(TARGET_NAME) guest-tests SKIPPED")
+		"$(TARGET_DIR) guest-tests SKIPPED")
 
 run-guest-tests:
 	$(call quiet-command, /bin/true, "RUN", \
-		"tests for $(TARGET_NAME) SKIPPED")
+		"tests for $(TARGET_DIR) SKIPPED")
 endif
 
 # It doesn't matter if these don't exits
 .PHONY: clean-guest-tests
 clean-guest-tests:
-	rm -rf tests || echo "no $(TARGET_NAME) tests to remove"
+	rm -rf tests/tcg/$(TARGET_DIR)
diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile.target
similarity index 92%
rename from tests/tcg/Makefile
rename to tests/tcg/Makefile.target
index 9f567686240..8dbcba4474f 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile.target
@@ -29,8 +29,9 @@
 # We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
 #
 
+all:
 -include ../../config-host.mak
--include ../config-target.mak
+-include ../../../$(TARGET_DIR)/config-target.mak
 
 # for including , in command strings
 COMMA := ,
@@ -64,9 +65,9 @@ LDFLAGS=
 
 # The QEMU for this TARGET
 ifdef CONFIG_USER_ONLY
-QEMU=../qemu-$(TARGET_NAME)
+QEMU=../../../$(TARGET_DIR)/qemu-$(TARGET_NAME)
 else
-QEMU=../qemu-system-$(TARGET_NAME)
+QEMU=../../../$(TARGET_DIR)/qemu-system-$(TARGET_NAME)
 endif
 QEMU_OPTS=
 
@@ -82,10 +83,7 @@ ifdef CONFIG_USER_ONLY
 # The order we include is important. We include multiarch, base arch
 # and finally arch if it's not the same as base arch.
 -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
--include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target
-ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
-endif
 
 # Add the common build options
 CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
@@ -101,10 +99,7 @@ else
 # are expected to provide their own build recipes.
 -include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
 -include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
--include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.softmmu-target
-ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
 -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target
-endif
 
 endif
 
diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 31ba9cfcaa1..e763dd9da37 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -2,12 +2,14 @@
 #
 # AArch64 specific tweaks
 
+ARM_SRC=$(SRC_PATH)/tests/tcg/arm
+VPATH 		+= $(ARM_SRC)
+
 AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
 VPATH 		+= $(AARCH64_SRC)
 
-# we don't build any of the ARM tests
-AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
-AARCH64_TESTS+=fcvt
+# we don't build any other ARM test
+AARCH64_TESTS=fcvt
 
 fcvt: LDFLAGS+=-lm
 
@@ -16,6 +18,6 @@ run-fcvt: fcvt
 	$(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
 
 AARCH64_TESTS += pauth-1 pauth-2
-run-pauth-%: QEMU += -cpu max
+run-pauth-%: QEMU_OPTS += -cpu max
 
-TESTS:=$(AARCH64_TESTS)
+TESTS += $(AARCH64_TESTS)
diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile.softmmu-target
index 2deb06e6e46..231e9a57b48 100644
--- a/tests/tcg/arm/Makefile.softmmu-target
+++ b/tests/tcg/arm/Makefile.softmmu-target
@@ -3,8 +3,6 @@
 # ARM SoftMMU tests - included from tests/tcg/Makefile
 #
 
-ifeq ($(TARGET_ABI_DIR),arm)
-
 ARM_SRC=$(SRC_PATH)/tests/tcg/arm
 
 # Set search path for all sources
@@ -25,5 +23,3 @@ LDFLAGS+=-nostdlib -N -static
 test-armv6m-undef: EXTRA_CFLAGS+=-mcpu=cortex-m0
 
 run-test-armv6m-undef: QEMU_OPTS+=-semihosting -M microbit -kernel
-
-endif
diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.softmmu-target
index cee342017e5..1c8790eecd2 100644
--- a/tests/tcg/i386/Makefile.softmmu-target
+++ b/tests/tcg/i386/Makefile.softmmu-target
@@ -12,17 +12,9 @@ X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
 # These objects provide the basic boot code and helper functions for all tests
 CRT_OBJS=boot.o
 
-ifeq ($(TARGET_X86_64), y)
-CRT_PATH=$(X64_SYSTEM_SRC)
-CFLAGS=-march=x86-64
-LINK_SCRIPT=$(X64_SYSTEM_SRC)/kernel.ld
-LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
-else
 CRT_PATH=$(I386_SYSTEM_SRC)
-CFLAGS+=-m32
 LINK_SCRIPT=$(I386_SYSTEM_SRC)/kernel.ld
 LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_i386
-endif
 CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
 LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
 
diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index d0eb7023e52..08c5736a4d4 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -6,14 +6,11 @@ I386_SRC=$(SRC_PATH)/tests/tcg/i386
 VPATH 		+= $(I386_SRC)
 
 I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
-I386_TESTS=$(I386_SRCS:.c=)
-I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
+ALL_X86_TESTS=$(I386_SRCS:.c=)
+I386_TESTS:=$(filter-out test-i386-ssse3, $(ALL_X86_TESTS))
+X86_64_TESTS:=$(filter test-i386-ssse3, $(ALL_X86_TESTS))
 # Update TESTS
-TESTS+=$(I386_ONLY_TESTS)
-
-ifneq ($(TARGET_NAME),x86_64)
-CFLAGS+=-m32
-endif
+TESTS=$(MULTIARCH_TESTS) $(I386_TESTS)
 
 #
 # hello-i386 is a barebones app
@@ -26,7 +23,7 @@ hello-i386: LDFLAGS+=-nostdlib
 #
 
 test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
+	$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_CFLAGS) -o $@ \
 	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
 
 ifeq ($(SPEED), slow)
diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Makefile.softmmu-target
new file mode 100644
index 00000000000..df252e761cd
--- /dev/null
+++ b/tests/tcg/x86_64/Makefile.softmmu-target
@@ -0,0 +1,36 @@
+#
+# x86 system tests
+#
+# This currently builds only for i386. The common C code is built
+# with standard compiler flags however so we can support both by
+# adding additional boot files for x86_64.
+#
+
+I386_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/i386/system
+X64_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/x86_64/system
+
+# These objects provide the basic boot code and helper functions for all tests
+CRT_OBJS=boot.o
+
+CRT_PATH=$(X64_SYSTEM_SRC)
+LINK_SCRIPT=$(X64_SYSTEM_SRC)/kernel.ld
+LDFLAGS=-Wl,-T$(LINK_SCRIPT) -Wl,-melf_x86_64
+CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
+LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
+
+TESTS+=$(MULTIARCH_TESTS)
+
+# building head blobs
+.PRECIOUS: $(CRT_OBJS)
+
+%.o: $(CRT_PATH)/%.S
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
+
+# Build and link the tests
+%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS)
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+
+memory: CFLAGS+=-DCHECK_UNALIGNED=1
+
+# Running
+QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel
diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target
index 74f170b9ede..20bf96202ad 100644
--- a/tests/tcg/x86_64/Makefile.target
+++ b/tests/tcg/x86_64/Makefile.target
@@ -6,9 +6,10 @@
 # $(SRC)/tests/tcg/i386/
 #
 
-X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS))
-X86_64_TESTS+=test-x86_64
-TESTS:=$(X86_64_TESTS)
+include $(SRC_PATH)/tests/tcg/i386/Makefile.target
+
+TESTS=$(MULTIARCH_TESTS) $(X86_64_TESTS) test-x86_64
+QEMU_OPTS += -cpu max
 
 test-x86_64: LDFLAGS+=-lm -lc
 test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (4 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 05/42] tests/tcg: cleanup Makefile inclusions Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 10:29   ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 07/42] tests/tcg: add .gitignore for in source builds Alex Bennée
                   ` (37 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

From: Paolo Bonzini <pbonzini@redhat.com>

Avoid the repeated inclusions of config-target.mak, which have
risks of namespace pollution, and instead build minimal configuration
files in a configuration script.  The same configuration files can
also be included in Makefile and Makefile.qemu

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20190807143523.15917-4-pbonzini@redhat.com>
[AJB: s/docker/container/, rm last bits from configure]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile                           |   1 +
 configure                          | 157 ++-----------------
 tests/Makefile.include             |   8 +-
 tests/tcg/Makefile.prereqs         |  18 +--
 tests/tcg/Makefile.qemu            |  51 +++----
 tests/tcg/Makefile.target          |   8 +-
 tests/tcg/aarch64/Makefile.include |   8 -
 tests/tcg/alpha/Makefile.include   |   2 -
 tests/tcg/arm/Makefile.include     |   8 -
 tests/tcg/configure.sh             | 234 +++++++++++++++++++++++++++++
 tests/tcg/cris/Makefile.include    |   6 -
 tests/tcg/hppa/Makefile.include    |   2 -
 tests/tcg/i386/Makefile.include    |   9 --
 tests/tcg/m68k/Makefile.include    |   2 -
 tests/tcg/mips/Makefile.include    |  20 ---
 tests/tcg/ppc/Makefile.include     |  10 --
 tests/tcg/riscv/Makefile.include   |  10 --
 tests/tcg/s390x/Makefile.include   |   2 -
 tests/tcg/sh4/Makefile.include     |   4 -
 tests/tcg/sparc64/Makefile.include |   2 -
 tests/tcg/xtensa/Makefile.include  |  11 --
 21 files changed, 282 insertions(+), 291 deletions(-)
 delete mode 100644 tests/tcg/aarch64/Makefile.include
 delete mode 100644 tests/tcg/alpha/Makefile.include
 delete mode 100644 tests/tcg/arm/Makefile.include
 create mode 100755 tests/tcg/configure.sh
 delete mode 100644 tests/tcg/cris/Makefile.include
 delete mode 100644 tests/tcg/hppa/Makefile.include
 delete mode 100644 tests/tcg/i386/Makefile.include
 delete mode 100644 tests/tcg/m68k/Makefile.include
 delete mode 100644 tests/tcg/mips/Makefile.include
 delete mode 100644 tests/tcg/ppc/Makefile.include
 delete mode 100644 tests/tcg/riscv/Makefile.include
 delete mode 100644 tests/tcg/s390x/Makefile.include
 delete mode 100644 tests/tcg/sh4/Makefile.include
 delete mode 100644 tests/tcg/sparc64/Makefile.include
 delete mode 100644 tests/tcg/xtensa/Makefile.include

diff --git a/Makefile b/Makefile
index ae17a830678..b3528617e48 100644
--- a/Makefile
+++ b/Makefile
@@ -717,6 +717,7 @@ endef
 
 distclean: clean
 	rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi
+	rm -f tests/tcg/config-*.mak
 	rm -f config-all-devices.mak config-all-disas.mak config.status
 	rm -f $(SUBDIR_DEVICES_MAK)
 	rm -f po/*.mo tests/qemu-iotests/common.env
diff --git a/configure b/configure
index 94845fc5101..7860bbc3121 100755
--- a/configure
+++ b/configure
@@ -495,27 +495,10 @@ qed="yes"
 parallels="yes"
 sheepdog="yes"
 libxml2=""
-container="no"
 debug_mutex="no"
 libpmem=""
 default_devices="yes"
 
-# cross compilers defaults, can be overridden with --cross-cc-ARCH
-cross_cc_aarch64="aarch64-linux-gnu-gcc"
-cross_cc_aarch64_be="$cross_cc_aarch64"
-cross_cc_cflags_aarch64_be="-mbig-endian"
-cross_cc_arm="arm-linux-gnueabihf-gcc"
-cross_cc_cflags_armeb="-mbig-endian"
-cross_cc_i386="i386-pc-linux-gnu-gcc"
-cross_cc_cflags_i386=""
-cross_cc_ppc="powerpc-linux-gnu-gcc"
-cross_cc_cflags_ppc="-m32"
-cross_cc_ppc64="powerpc-linux-gnu-gcc"
-cross_cc_cflags_ppc64="-m64"
-cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"
-
-enabled_cross_compilers=""
-
 supported_cpu="no"
 supported_os="no"
 bogus_os="no"
@@ -548,9 +531,12 @@ for opt do
   ;;
   --cross-cc-cflags-*) cc_arch=${opt#--cross-cc-flags-}; cc_arch=${cc_arch%%=*}
                       eval "cross_cc_cflags_${cc_arch}=\$optarg"
+                      cross_cc_vars="$cross_cc_vars cross_cc_cflags_${cc_arch}"
   ;;
   --cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}
+                cc_archs="$cc_archs $cc_arch"
                 eval "cross_cc_${cc_arch}=\$optarg"
+                cross_cc_vars="$cross_cc_vars cross_cc_${cc_arch}"
   ;;
   esac
 done
@@ -745,42 +731,34 @@ ARCH=
 case "$cpu" in
   ppc|ppc64|s390|s390x|sparc64|x32|riscv32|riscv64)
     supported_cpu="yes"
-    eval "cross_cc_${cpu}=\$host_cc"
   ;;
   ppc64le)
     ARCH="ppc64"
     supported_cpu="yes"
-    cross_cc_ppc64le=$host_cc
   ;;
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=$host_cc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=$host_cc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
     supported_cpu="yes"
-    cross_cc_arm=$host_cc
   ;;
   aarch64)
     cpu="aarch64"
     supported_cpu="yes"
-    cross_cc_aarch64=$host_cc
   ;;
   mips*)
     cpu="mips"
     supported_cpu="yes"
-    cross_cc_mips=$host_cc
   ;;
   sparc|sun4[cdmuv])
     cpu="sparc"
     supported_cpu="yes"
-    cross_cc_sparc=$host_cc
   ;;
   *)
     # This will result in either an error or falling back to TCI later
@@ -1555,44 +1533,30 @@ case "$cpu" in
     ppc)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
-           cross_cc_ppc=$cc
-           cross_cc_cflags_ppc="$CPU_CFLAGS"
            ;;
     ppc64)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
-           cross_cc_ppc64=$cc
-           cross_cc_cflags_ppc64="$CPU_CFLAGS"
            ;;
     sparc)
            CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
            LDFLAGS="-m32 -mv8plus $LDFLAGS"
-           cross_cc_sparc=$cc
-           cross_cc_cflags_sparc="$CPU_CFLAGS"
            ;;
     sparc64)
            CPU_CFLAGS="-m64 -mcpu=ultrasparc"
            LDFLAGS="-m64 $LDFLAGS"
-           cross_cc_sparc64=$cc
-           cross_cc_cflags_sparc64="$CPU_CFLAGS"
            ;;
     s390)
            CPU_CFLAGS="-m31"
            LDFLAGS="-m31 $LDFLAGS"
-           cross_cc_s390=$cc
-           cross_cc_cflags_s390="$CPU_CFLAGS"
            ;;
     s390x)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
-           cross_cc_s390x=$cc
-           cross_cc_cflags_s390x="$CPU_CFLAGS"
            ;;
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
-           cross_cc_i386=$cc
-           cross_cc_cflags_i386="$CPU_CFLAGS"
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1600,18 +1564,16 @@ case "$cpu" in
            # runtime and generate the fallback to serial emulation.
            CPU_CFLAGS="-m64 -mcx16"
            LDFLAGS="-m64 $LDFLAGS"
-           cross_cc_x86_64=$cc
-           cross_cc_cflags_x86_64="$CPU_CFLAGS"
            ;;
     x32)
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
-           cross_cc_i386=$cc
-           cross_cc_cflags_i386="$CPU_CFLAGS"
            ;;
     # No special flags required for other host CPUs
 esac
 
+eval "cross_cc_${cpu}=\$host_cc"
+cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
 QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS"
 
 # For user-mode emulation the host arch has to be one we explicitly
@@ -5893,17 +5855,6 @@ EOF
   fi
 fi
 
-##########################################
-# Container based cross-compiler support
-#
-# This is specifically for building test
-# cases for foreign architectures, not
-# cross-compiling QEMU itself.
-
-if has "docker" || has "podman"; then
-    container=$($python $source_path/tests/docker/docker.py probe)
-fi
-
 ##########################################
 # check for libpmem
 
@@ -6474,7 +6425,6 @@ echo "qed support       $qed"
 echo "parallels support $parallels"
 echo "sheepdog support  $sheepdog"
 echo "capstone          $capstone"
-echo "container support $container"
 echo "libpmem support   $libpmem"
 echo "libudev           $libudev"
 echo "default devices   $default_devices"
@@ -7384,10 +7334,6 @@ if test "$gcov" = "yes" ; then
   echo "GCOV=$gcov_tool" >> $config_host_mak
 fi
 
-if test "$docker" != "no"; then
-    echo "HAVE_USER_DOCKER=y" >> $config_host_mak
-fi
-
 if test "$libudev" != "no"; then
     echo "CONFIG_LIBUDEV=y" >> $config_host_mak
     echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
@@ -7461,10 +7407,6 @@ case "$target" in
     ;;
 esac
 
-target_compiler=""
-target_compiler_static=""
-target_compiler_cflags=""
-
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > $config_target_mak
 
@@ -7481,26 +7423,20 @@ case "$target_name" in
   i386)
     mttcg="yes"
 	gdb_xml_files="i386-32bit.xml"
-    target_compiler=$cross_cc_i386
-    target_compiler_cflags=$cross_cc_ccflags_i386
   ;;
   x86_64)
     TARGET_BASE_ARCH=i386
     mttcg="yes"
 	gdb_xml_files="i386-64bit.xml"
-    target_compiler=$cross_cc_x86_64
   ;;
   alpha)
     mttcg="yes"
-    target_compiler=$cross_cc_alpha
   ;;
   arm|armeb)
     TARGET_ARCH=arm
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
-    target_compiler=$cross_cc_arm
-    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64
@@ -7508,41 +7444,32 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
-    target_compiler=$cross_cc_aarch64
-    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   cris)
-    target_compiler=$cross_cc_cris
   ;;
   hppa)
     mttcg="yes"
-    target_compiler=$cross_cc_hppa
   ;;
   lm32)
-    target_compiler=$cross_cc_lm32
   ;;
   m68k)
     bflt="yes"
     gdb_xml_files="cf-core.xml cf-fp.xml m68k-fp.xml"
-    target_compiler=$cross_cc_m68k
   ;;
   microblaze|microblazeel)
     TARGET_ARCH=microblaze
     bflt="yes"
     echo "TARGET_ABI32=y" >> $config_target_mak
-    target_compiler=$cross_cc_microblaze
   ;;
   mips|mipsel)
     mttcg="yes"
     TARGET_ARCH=mips
-    target_compiler=$cross_cc_mips
     echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
   ;;
   mipsn32|mipsn32el)
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
-    target_compiler=$cross_cc_mipsn32
     echo "TARGET_ABI_MIPSN32=y" >> $config_target_mak
     echo "TARGET_ABI32=y" >> $config_target_mak
   ;;
@@ -7550,32 +7477,24 @@ case "$target_name" in
     mttcg="yes"
     TARGET_ARCH=mips64
     TARGET_BASE_ARCH=mips
-    target_compiler=$cross_cc_mips64
     echo "TARGET_ABI_MIPSN64=y" >> $config_target_mak
   ;;
   moxie)
-    target_compiler=$cross_cc_moxie
   ;;
   nios2)
-    target_compiler=$cross_cc_nios2
   ;;
   or1k)
-    target_compiler=$cross_cc_or1k
     TARGET_ARCH=openrisc
     TARGET_BASE_ARCH=openrisc
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
-    target_compiler=$cross_cc_ppc
-    target_compiler_cflags="$cross_cc_cflags_ppc"
   ;;
   ppc64)
     TARGET_BASE_ARCH=ppc
     TARGET_ABI_DIR=ppc
     mttcg=yes
     gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
-    target_compiler=$cross_cc_ppc64
-    target_compiler_cflags="$cross_cc_cflags_ppc64"
   ;;
   ppc64le)
     TARGET_ARCH=ppc64
@@ -7583,7 +7502,6 @@ case "$target_name" in
     TARGET_ABI_DIR=ppc
     mttcg=yes
     gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
-    target_compiler=$cross_cc_ppc64le
   ;;
   ppc64abi32)
     TARGET_ARCH=ppc64
@@ -7591,60 +7509,48 @@ case "$target_name" in
     TARGET_ABI_DIR=ppc
     echo "TARGET_ABI32=y" >> $config_target_mak
     gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml power-vsx.xml"
-    target_compiler=$cross_cc_ppc64abi32
   ;;
   riscv32)
     TARGET_BASE_ARCH=riscv
     TARGET_ABI_DIR=riscv
     mttcg=yes
     gdb_xml_files="riscv-32bit-cpu.xml riscv-32bit-fpu.xml riscv-32bit-csr.xml"
-    target_compiler=$cross_cc_riscv32
   ;;
   riscv64)
     TARGET_BASE_ARCH=riscv
     TARGET_ABI_DIR=riscv
     mttcg=yes
     gdb_xml_files="riscv-64bit-cpu.xml riscv-64bit-fpu.xml riscv-64bit-csr.xml"
-    target_compiler=$cross_cc_riscv64
   ;;
   sh4|sh4eb)
     TARGET_ARCH=sh4
     bflt="yes"
-    target_compiler=$cross_cc_sh4
   ;;
   sparc)
-    target_compiler=$cross_cc_sparc
   ;;
   sparc64)
     TARGET_BASE_ARCH=sparc
-    target_compiler=$cross_cc_sparc64
   ;;
   sparc32plus)
     TARGET_ARCH=sparc64
     TARGET_BASE_ARCH=sparc
     TARGET_ABI_DIR=sparc
-    target_compiler=$cross_cc_sparc32plus
     echo "TARGET_ABI32=y" >> $config_target_mak
   ;;
   s390x)
     mttcg=yes
     gdb_xml_files="s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml s390-cr.xml s390-virt.xml s390-gs.xml"
-    target_compiler=$cross_cc_s390x
   ;;
   tilegx)
-    target_compiler=$cross_cc_tilegx
   ;;
   tricore)
-    target_compiler=$cross_cc_tricore
   ;;
   unicore32)
-    target_compiler=$cross_cc_unicore32
   ;;
   xtensa|xtensaeb)
     TARGET_ARCH=xtensa
     bflt="yes"
     mttcg="yes"
-    target_compiler=$cross_cc_xtensa
   ;;
   *)
     error_exit "Unsupported target CPU"
@@ -7655,27 +7561,6 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then
   TARGET_BASE_ARCH=$TARGET_ARCH
 fi
 
-# Do we have a cross compiler for this target?
-if has $target_compiler; then
-
-    write_c_skeleton
-
-    if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then
-        # For host systems we might get away with building without -static
-        if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then
-            target_compiler=""
-        else
-            enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
-            target_compiler_static="n"
-        fi
-    else
-        enabled_cross_compilers="${enabled_cross_compilers} '${target_compiler}'"
-        target_compiler_static="y"
-    fi
-else
-    target_compiler=""
-fi
-
 symlink "$source_path/Makefile.target" "$target_dir/Makefile"
 
 upper() {
@@ -7752,18 +7637,6 @@ if test "$target_bsd_user" = "yes" ; then
   echo "CONFIG_BSD_USER=y" >> $config_target_mak
 fi
 
-if test -n "$target_compiler"; then
-  echo "CROSS_CC_GUEST=\"$target_compiler\"" >> $config_target_mak
-
-  if test -n "$target_compiler_static"; then
-      echo "CROSS_CC_GUEST_STATIC=$target_compiler_static" >> $config_target_mak
-  fi
-
-  if test -n "$target_compiler_cflags"; then
-      echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
-  fi
-fi
-
 
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
@@ -7894,11 +7767,6 @@ done # for target in $targets
 echo "PIXMAN_CFLAGS=$pixman_cflags" >> $config_host_mak
 echo "PIXMAN_LIBS=$pixman_libs" >> $config_host_mak
 
-if test -n "$enabled_cross_compilers"; then
-    echo
-    echo "NOTE: cross-compilers enabled: $enabled_cross_compilers"
-fi
-
 if [ "$fdt" = "git" ]; then
   echo "config-host.h: dtc/all" >> $config_host_mak
 fi
@@ -7927,15 +7795,14 @@ fi
 # so the build tree will be missing the link back to the new file, and
 # tests might fail. Prefer to keep the relevant files in their own
 # directory and symlink the directory instead.
-DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
+DIRS="tests tests/tcg tests/tcg/lm32 tests/libqos tests/qapi-schema tests/qemu-iotests tests/vm"
 DIRS="$DIRS tests/fp tests/qgraph"
 DIRS="$DIRS docs docs/interop fsdev scsi"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
 DIRS="$DIRS roms/seabios roms/vgabios"
-LINKS="Makefile tests/tcg/Makefile"
-LINKS="$LINKS tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
-LINKS="$LINKS tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
-LINKS="$LINKS tests/fp/Makefile"
+LINKS="Makefile"
+LINKS="$LINKS tests/tcg/lm32/Makefile po/Makefile"
+LINKS="$LINKS tests/tcg/Makefile.target tests/fp/Makefile"
 LINKS="$LINKS pc-bios/optionrom/Makefile pc-bios/keymaps"
 LINKS="$LINKS pc-bios/spapr-rtas/Makefile"
 LINKS="$LINKS pc-bios/s390-ccw/Makefile"
@@ -7965,6 +7832,12 @@ for f in $LINKS ; do
     fi
 done
 
+(for i in $cross_cc_vars; do
+  export $i
+done
+export target_list source_path
+$source_path/tests/tcg/configure.sh)
+
 # temporary config to build submodules
 for rom in seabios vgabios ; do
     config_mak=roms/$rom/config.mak
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 8400656b9d3..9380b9eb666 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -1059,30 +1059,28 @@ BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
 CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(TARGET_DIRS))
 RUN_TCG_TARGET_RULES=$(patsubst %,run-tcg-tests-%, $(TARGET_DIRS))
 
-ifeq ($(HAVE_USER_DOCKER),y)
 # Probe for the Docker Builds needed for each build
 $(foreach PROBE_TARGET,$(TARGET_DIRS), 				\
 	$(eval -include $(SRC_PATH)/tests/tcg/Makefile.prereqs))
-endif
 
 build-tcg-tests-%:
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
 		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
 		SRC_PATH=$(SRC_PATH) \
-	       	V="$(V)" TARGET_DIR="$*/" guest-tests, \
+	       	V="$(V)" TARGET="$*" guest-tests, \
 		"BUILD", "TCG tests for $*")
 
 run-tcg-tests-%: build-tcg-tests-% %/all
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
 		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
 		SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \
-		V="$(V)" TARGET_DIR="$*/" run-guest-tests, \
+		V="$(V)" TARGET="$*" run-guest-tests, \
 		"RUN", "TCG tests for $*")
 
 clean-tcg-tests-%:
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
 		-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
-		SRC_PATH=$(SRC_PATH) TARGET_DIR="$*/" clean-guest-tests, \
+		SRC_PATH=$(SRC_PATH) TARGET="$*" clean-guest-tests, \
 		"RUN", "TCG tests for $*")
 
 .PHONY: build-tcg
diff --git a/tests/tcg/Makefile.prereqs b/tests/tcg/Makefile.prereqs
index 53b01962e1d..7494b31b952 100644
--- a/tests/tcg/Makefile.prereqs
+++ b/tests/tcg/Makefile.prereqs
@@ -7,24 +7,12 @@
 # selection of required docker targets before we invoke a sub-make for
 # each target.
 
-# First we need the target makefile which tells us the target architecture
-CROSS_CC_GUEST:=
--include $(BUILD_DIR)/$(PROBE_TARGET)/config-target.mak
-
-# Then we load up the target architecture makefiles which tell us
-# about the compilers
 DOCKER_IMAGE:=
 
--include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
--include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
+-include $(BUILD_DIR)/tests/tcg/config-$(PROBE_TARGET).mak
 
-ifndef CROSS_CC_GUEST
 ifneq ($(DOCKER_IMAGE),)
 build-tcg-tests-$(PROBE_TARGET): docker-image-$(DOCKER_IMAGE)
+$(BUILD_DIR)/tests/tcg/config_$(PROBE_TARGET).mak: config-host.mak
+config-host.mak: $(SRC_PATH)/tests/tcg/configure.sh
 endif
-endif
-
-# Clean-up
-# undefine TARGET_NAME
-# undefine TARGET_BASE_ARCH
-# undefine TARGET_ABI_DIR
diff --git a/tests/tcg/Makefile.qemu b/tests/tcg/Makefile.qemu
index 7eff11d434e..9c23aeaa2a6 100644
--- a/tests/tcg/Makefile.qemu
+++ b/tests/tcg/Makefile.qemu
@@ -8,17 +8,22 @@
 # to do it for us.
 #
 
-# The per ARCH makefile, if it exists, holds extra information about
+include $(SRC_PATH)/rules.mak
+
+# The configure script fills in extra information about
 # useful docker images or alternative compiler flags.
 
-include $(TARGET_DIR)config-target.mak
-include $(SRC_PATH)/rules.mak
-include $(wildcard \
-	$(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include \
-	$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include)
+CROSS_CC_GUEST:=
+DOCKER_IMAGE:=
+-include $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak
 
 GUEST_BUILD=
 TCG_MAKE=../Makefile.target
+
+# We also need the Docker make rules to depend on
+SKIP_DOCKER_BUILD=1
+include $(SRC_PATH)/tests/docker/Makefile.include
+
 # Support installed Cross Compilers
 
 ifdef CROSS_CC_GUEST
@@ -26,11 +31,11 @@ ifdef CROSS_CC_GUEST
 .PHONY: cross-build-guest-tests
 cross-build-guest-tests:
 	$(call quiet-command, \
-	   (mkdir -p tests/tcg/$(TARGET_DIR) && cd tests/tcg/$(TARGET_DIR) && \
-	    $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" CC="$(CROSS_CC_GUEST)" \
+	   (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \
+	    $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC="$(CROSS_CC_GUEST)" \
 			SRC_PATH="$(SRC_PATH)" BUILD_STATIC=$(CROSS_CC_GUEST_STATIC) \
-			EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
-	"BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
+			EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \
+	"BUILD","$(TARGET) guest-tests with $(CROSS_CC_GUEST)")
 
 GUEST_BUILD=cross-build-guest-tests
 
@@ -38,30 +43,24 @@ endif
 
 # Support building with Docker
 
-ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
 ifneq ($(DOCKER_IMAGE),)
 
-# We also need the Docker make rules to depend on
-SKIP_DOCKER_BUILD=1
-include $(SRC_PATH)/tests/docker/Makefile.include
-
 DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
-		--cc $(DOCKER_CROSS_COMPILER) \
+		--cc $(DOCKER_CROSS_CC_GUEST) \
 		-i qemu:$(DOCKER_IMAGE) \
 		-s $(SRC_PATH) -- "
 
 .PHONY: docker-build-guest-tests
 docker-build-guest-tests: docker-image-$(DOCKER_IMAGE)
 	$(call quiet-command, \
-	  (mkdir -p tests/tcg/$(TARGET_DIR) && cd tests/tcg/$(TARGET_DIR) && \
-	   $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" CC=$(DOCKER_COMPILE_CMD) \
+	  (mkdir -p tests/tcg/$(TARGET) && cd tests/tcg/$(TARGET) && \
+	   $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" CC=$(DOCKER_COMPILE_CMD) \
 			SRC_PATH="$(SRC_PATH)" BUILD_STATIC=y \
-			EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \
-	"BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
+			EXTRA_CFLAGS="$(CROSS_CC_GUEST_CFLAGS)"), \
+	"BUILD","$(TARGET) guest-tests with docker qemu:$(DOCKER_IMAGE)")
 
 GUEST_BUILD=docker-build-guest-tests
 
-endif
 endif
 
 # Final targets
@@ -75,22 +74,22 @@ guest-tests: $(GUEST_BUILD)
 
 run-guest-tests: guest-tests
 	$(call quiet-command, \
-	(cd tests/tcg/$(TARGET_DIR) && \
-	 $(MAKE) -f $(TCG_MAKE) TARGET_DIR="$(TARGET_DIR)" \
+	(cd tests/tcg/$(TARGET) && \
+	 $(MAKE) -f $(TCG_MAKE) TARGET="$(TARGET)" \
 	 		SRC_PATH="$(SRC_PATH)" SPEED=$(SPEED) run), \
 	"RUN", "tests for $(TARGET_NAME)")
 
 else
 guest-tests:
 	$(call quiet-command, /bin/true, "BUILD", \
-		"$(TARGET_DIR) guest-tests SKIPPED")
+		"$(TARGET) guest-tests SKIPPED")
 
 run-guest-tests:
 	$(call quiet-command, /bin/true, "RUN", \
-		"tests for $(TARGET_DIR) SKIPPED")
+		"tests for $(TARGET) SKIPPED")
 endif
 
 # It doesn't matter if these don't exits
 .PHONY: clean-guest-tests
 clean-guest-tests:
-	rm -rf tests/tcg/$(TARGET_DIR)
+	rm -rf tests/tcg/$(TARGET)
diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target
index 8dbcba4474f..8808beaf74b 100644
--- a/tests/tcg/Makefile.target
+++ b/tests/tcg/Makefile.target
@@ -31,7 +31,7 @@
 
 all:
 -include ../../config-host.mak
--include ../../../$(TARGET_DIR)/config-target.mak
+-include ../config-$(TARGET).mak
 
 # for including , in command strings
 COMMA := ,
@@ -63,12 +63,6 @@ CFLAGS=
 QEMU_CFLAGS=
 LDFLAGS=
 
-# The QEMU for this TARGET
-ifdef CONFIG_USER_ONLY
-QEMU=../../../$(TARGET_DIR)/qemu-$(TARGET_NAME)
-else
-QEMU=../../../$(TARGET_DIR)/qemu-system-$(TARGET_NAME)
-endif
 QEMU_OPTS=
 
 
diff --git a/tests/tcg/aarch64/Makefile.include b/tests/tcg/aarch64/Makefile.include
deleted file mode 100644
index 5d4e4c6f99b..00000000000
--- a/tests/tcg/aarch64/Makefile.include
+++ /dev/null
@@ -1,8 +0,0 @@
-# Makefile.include for AArch64 targets
-#
-# We don't have any bigendian build tools so we only use this for AArch64
-
-ifeq ($(TARGET_NAME),aarch64)
-DOCKER_IMAGE=debian-buster-arm64-cross
-DOCKER_CROSS_COMPILER=aarch64-linux-gnu-gcc
-endif
diff --git a/tests/tcg/alpha/Makefile.include b/tests/tcg/alpha/Makefile.include
deleted file mode 100644
index c7dc48eadb0..00000000000
--- a/tests/tcg/alpha/Makefile.include
+++ /dev/null
@@ -1,2 +0,0 @@
-DOCKER_IMAGE=debian-alpha-cross
-DOCKER_CROSS_COMPILER=alpha-linux-gnu-gcc
diff --git a/tests/tcg/arm/Makefile.include b/tests/tcg/arm/Makefile.include
deleted file mode 100644
index 8e7eac008f9..00000000000
--- a/tests/tcg/arm/Makefile.include
+++ /dev/null
@@ -1,8 +0,0 @@
-# Makefile.include for all ARM targets
-#
-# We don't have any bigendian build tools so we only use this for armhf
-
-ifeq ($(TARGET_NAME),arm)
-DOCKER_IMAGE=debian-armhf-cross
-DOCKER_CROSS_COMPILER=arm-linux-gnueabihf-gcc
-endif
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
new file mode 100755
index 00000000000..5f794b664b8
--- /dev/null
+++ b/tests/tcg/configure.sh
@@ -0,0 +1,234 @@
+#! /bin/sh
+
+if test -z "$source_path"; then
+  echo Do not invoke this script directly.  It is called
+  echo automatically by configure.
+  exit 1
+fi
+
+write_c_skeleton() {
+    cat > $TMPC <<EOF
+int main(void) { return 0; }
+EOF
+}
+
+has() {
+  command -v "$1" >/dev/null 2>&1
+}
+
+do_compiler() {
+  # Run the compiler, capturing its output to the log. First argument
+  # is compiler binary to execute.
+  local compiler="$1"
+  shift
+  if test -n "$BASH_VERSION"; then eval '
+      echo >>config.log "
+funcs: ${FUNCNAME[*]}
+lines: ${BASH_LINENO[*]}"
+  '; fi
+  echo $compiler "$@" >> config.log
+  $compiler "$@" >> config.log 2>&1 || return $?
+}
+
+
+TMPDIR1="config-temp"
+TMPC="${TMPDIR1}/qemu-conf.c"
+TMPE="${TMPDIR1}/qemu-conf.exe"
+
+container="no"
+if has "docker" || has "podman"; then
+  container=$($python $source_path/tests/docker/docker.py probe)
+fi
+
+# cross compilers defaults, can be overridden with --cross-cc-ARCH
+: ${cross_cc_aarch64="aarch64-linux-gnu-gcc"}
+: ${cross_cc_aarch64_be="$cross_cc_aarch64"}
+: ${cross_cc_cflags_aarch64_be="-mbig-endian"}
+: ${cross_cc_arm="arm-linux-gnueabihf-gcc"}
+: ${cross_cc_cflags_armeb="-mbig-endian"}
+: ${cross_cc_i386="i386-pc-linux-gnu-gcc"}
+: ${cross_cc_cflags_i386="-m32"}
+: ${cross_cc_x86_64="x86_64-pc-linux-gnu-gcc"}
+: ${cross_cc_cflags_x86_64="-m64"}
+: ${cross_cc_ppc="powerpc-linux-gnu-gcc"}
+: ${cross_cc_cflags_ppc="-m32"}
+: ${cross_cc_ppc64="powerpc-linux-gnu-gcc"}
+: ${cross_cc_cflags_ppc64="-m64"}
+: ${cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"}
+: ${cross_cc_cflags_s390x="-m64"}
+: ${cross_cc_cflags_sparc="-m32 -mv8plus -mcpu=ultrasparc"}
+: ${cross_cc_cflags_sparc64="-m64 -mcpu=ultrasparc"}
+
+for target in $target_list; do
+  arch=${target%%-*}
+  case $arch in
+    arm|armeb)
+      arches=arm
+      ;;
+    aarch64|aarch64_be)
+      arches="aarch64 arm"
+      ;;
+    mips*)
+      arches=mips
+      ;;
+    ppc*)
+      arches=ppc
+      ;;
+    sh4|sh4eb)
+      arches=sh4
+      ;;
+    x86_64)
+      arches="x86_64 i386"
+      ;;
+    xtensa|xtensaeb)
+      arches=xtensa
+      ;;
+    alpha|cris|hppa|i386|lm32|m68k|openrisc|riscv64|s390x|sh4|sparc64)
+      arches=$target
+      ;;
+    *)
+      continue
+      ;;
+  esac
+
+  container_image=
+  case $target in
+    aarch64-*)
+      # We don't have any bigendian build tools so we only use this for AArch64
+      container_image=debian-buster-arm64-cross
+      container_cross_cc=aarch64-linux-gnu-gcc
+      ;;
+    alpha-*)
+      container_image=debian-alpha-cross
+      container_cross_cc=alpha-linux-gnu-gcc
+      ;;
+    arm-*)
+      # We don't have any bigendian build tools so we only use this for AArch64
+      container_image=debian-armhf-cross
+      container_cross_cc=arm-linux-gnueabihf-gcc
+      ;;
+    cris-*)
+      container_image=fedora-cris-cross
+      container_cross_cc=cris-linux-gnu-gcc
+      ;;
+    hppa-*)
+      container_image=debian-hppa-cross
+      container_cross_cc=hppa-linux-gnu-gcc
+      ;;
+    i386-*)
+      container_image=fedora-i386-cross
+      container_cross_cc=gcc
+      ;;
+    m68k-*)
+      container_image=debian-m68k-cross
+      container_cross_cc=m68k-linux-gnu-gcc
+      ;;
+    mips64el-*)
+      container_image=debian-mips64el-cross
+      container_cross_cc=mips64el-linux-gnuabi64-gcc
+      ;;
+    mips64-*)
+      container_image=debian-mips64-cross
+      container_cross_cc=mips64-linux-gnuabi64-gcc
+      ;;
+    mipsel-*)
+      container_image=debian-mipsel-cross
+      container_cross_cc=mipsel-linux-gnu-gcc
+      ;;
+    mips-*)
+      container_image=debian-mips-cross
+      container_cross_cc=mips-linux-gnu-gcc
+      ;;
+    ppc-*)
+      container_image=debian-powerpc-cross
+      container_cross_cc=powerpc-linux-gnu-gcc
+      ;;
+    ppc64-*)
+      container_image=debian-ppc64-cross
+      container_cross_cc=powerpc64-linux-gnu-gcc
+      ;;
+    ppc64le-*)
+      container_image=debian-ppc64el-cross
+      container_cross_cc=powerpc64le-linux-gnu-gcc
+      ;;
+    riscv64-*)
+      container_image=debian-riscv64-cross
+      container_cross_cc=riscv64-linux-gnu-gcc
+      ;;
+    s390x-*)
+      container_image=debian-s390x-cross
+      container_cross_cc=s390x-linux-gnu-gcc
+      ;;
+    sh4-*)
+      container_image=debian-sh4-cross
+      container_cross_cc=sh4-linux-gnu-gcc
+      ;;
+    sparc64-*)
+      container_image=debian-sparc64-cross
+      container_cross_cc=sparc64-linux-gnu-gcc
+      ;;
+    xtensa*-softmmu)
+      container_image=debian-xtensa-cross
+
+      # default to the dc232b cpu
+      container_cross_cc=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc
+      ;;
+  esac
+
+  config_target_mak=tests/tcg/config-$target.mak
+
+  echo "# Automatically generated by configure - do not modify" > $config_target_mak
+  echo "TARGET_NAME=$arch" >> $config_target_mak
+  case $target in
+    *-linux-user | *-bsd-user)
+      echo "CONFIG_USER_ONLY=y" >> $config_target_mak
+      echo "QEMU=\$(BUILD_DIR)/$target/qemu-$arch" >> $config_target_mak
+      ;;
+    *-softmmu)
+      echo "CONFIG_SOFTMMU=y" >> $config_target_mak
+      echo "QEMU=\$(BUILD_DIR)/$target/qemu-system-$arch" >> $config_target_mak
+      ;;
+  esac
+
+  eval "target_compiler_cflags=\${cross_cc_cflags_$arch}"
+  echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
+
+  got_cross_cc=no
+  for i in $arch $arches; do
+    if eval test "x\${cross_cc_$i+yes}" != xyes; then
+      continue
+    fi
+
+    eval "target_compiler=\${cross_cc_$i}"
+    if ! has $target_compiler; then
+      continue
+    fi
+    write_c_skeleton
+    if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then
+      # For host systems we might get away with building without -static
+      if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then
+        continue
+      fi
+      echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
+    else
+      echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak
+    fi
+    echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+    enabled_cross_compilers="$enabled_cross_compilers $target_compiler"
+    got_cross_cc=yes
+    break
+  done
+
+  if test $got_cross_cc = no && test "$docker" != no && test -n "$container_image"; then
+    echo "DOCKER_IMAGE=$container_image" >> $config_target_mak
+    echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
+  fi
+done
+
+# report container support state
+echo "cross containers  $container"
+
+if test -n "$enabled_cross_compilers"; then
+    echo
+    echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
+fi
diff --git a/tests/tcg/cris/Makefile.include b/tests/tcg/cris/Makefile.include
deleted file mode 100644
index 1c037824bff..00000000000
--- a/tests/tcg/cris/Makefile.include
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile.include for all CRIS targets
-#
-
-DOCKER_IMAGE=fedora-cris-cross
-DOCKER_CROSS_COMPILER=cris-linux-gnu-gcc
diff --git a/tests/tcg/hppa/Makefile.include b/tests/tcg/hppa/Makefile.include
deleted file mode 100644
index da2353430e2..00000000000
--- a/tests/tcg/hppa/Makefile.include
+++ /dev/null
@@ -1,2 +0,0 @@
-DOCKER_IMAGE=debian-hppa-cross
-DOCKER_CROSS_COMPILER=hppa-linux-gnu-gcc
diff --git a/tests/tcg/i386/Makefile.include b/tests/tcg/i386/Makefile.include
deleted file mode 100644
index be1c3008dd7..00000000000
--- a/tests/tcg/i386/Makefile.include
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Makefile.include for all i386
-#
-# There is enough brokeness in x86_64 compilers that we don't default
-# to using the x86_64 system compiler for i386 binaries.
-#
-
-DOCKER_IMAGE=fedora-i386-cross
-DOCKER_CROSS_COMPILER=gcc
diff --git a/tests/tcg/m68k/Makefile.include b/tests/tcg/m68k/Makefile.include
deleted file mode 100644
index cd7c6bf50d7..00000000000
--- a/tests/tcg/m68k/Makefile.include
+++ /dev/null
@@ -1,2 +0,0 @@
-DOCKER_IMAGE=debian-m68k-cross
-DOCKER_CROSS_COMPILER=m68k-linux-gnu-gcc
diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include
deleted file mode 100644
index 4a14fc078d2..00000000000
--- a/tests/tcg/mips/Makefile.include
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Makefile.include for all MIPs targets
-#
-# As Debian doesn't support mip64 in big endian mode the only way to
-# build BE is to pass a working cross compiler to ./configure
-#
-
-ifeq ($(TARGET_NAME),mips64el)
-DOCKER_IMAGE=debian-mips64el-cross
-DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
-else ifeq ($(TARGET_NAME),mips64)
-DOCKER_IMAGE=debian-mips64-cross
-DOCKER_CROSS_COMPILER=mips64-linux-gnuabi64-gcc
-else ifeq ($(TARGET_NAME),mipsel)
-DOCKER_IMAGE=debian-mipsel-cross
-DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
-else ifeq ($(TARGET_NAME),mips)
-DOCKER_IMAGE=debian-mips-cross
-DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
-endif
diff --git a/tests/tcg/ppc/Makefile.include b/tests/tcg/ppc/Makefile.include
deleted file mode 100644
index ae01fb8fadd..00000000000
--- a/tests/tcg/ppc/Makefile.include
+++ /dev/null
@@ -1,10 +0,0 @@
-ifeq ($(TARGET_NAME),ppc)
-DOCKER_IMAGE=debian-powerpc-cross
-DOCKER_CROSS_COMPILER=powerpc-linux-gnu-gcc
-else ifeq ($(TARGET_NAME),ppc64)
-DOCKER_IMAGE=debian-ppc64-cross
-DOCKER_CROSS_COMPILER=powerpc64-linux-gnu-gcc
-else ifeq ($(TARGET_NAME),ppc64le)
-DOCKER_IMAGE=debian-ppc64el-cross
-DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc
-endif
diff --git a/tests/tcg/riscv/Makefile.include b/tests/tcg/riscv/Makefile.include
deleted file mode 100644
index d92ac6c89f0..00000000000
--- a/tests/tcg/riscv/Makefile.include
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile.include for all RISCV targets
-#
-# Debian only really cares about 64 bit going forward
-#
-
-ifeq ($(TARGET_NAME),riscv64)
-DOCKER_IMAGE=debian-riscv64-cross
-DOCKER_CROSS_COMPILER=riscv64-linux-gnu-gcc
-endif
diff --git a/tests/tcg/s390x/Makefile.include b/tests/tcg/s390x/Makefile.include
deleted file mode 100644
index 1f58115d961..00000000000
--- a/tests/tcg/s390x/Makefile.include
+++ /dev/null
@@ -1,2 +0,0 @@
-DOCKER_IMAGE=debian-s390x-cross
-DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc
diff --git a/tests/tcg/sh4/Makefile.include b/tests/tcg/sh4/Makefile.include
deleted file mode 100644
index ad21594d9d8..00000000000
--- a/tests/tcg/sh4/Makefile.include
+++ /dev/null
@@ -1,4 +0,0 @@
-ifneq ($(TARGET_NAME), sh4eb)
-DOCKER_IMAGE=debian-sh4-cross
-DOCKER_CROSS_COMPILER=sh4-linux-gnu-gcc
-endif
diff --git a/tests/tcg/sparc64/Makefile.include b/tests/tcg/sparc64/Makefile.include
deleted file mode 100644
index 95fc8dee9f4..00000000000
--- a/tests/tcg/sparc64/Makefile.include
+++ /dev/null
@@ -1,2 +0,0 @@
-DOCKER_IMAGE=debian-sparc64-cross
-DOCKER_CROSS_COMPILER=sparc64-linux-gnu-gcc
diff --git a/tests/tcg/xtensa/Makefile.include b/tests/tcg/xtensa/Makefile.include
deleted file mode 100644
index 423c00a5d31..00000000000
--- a/tests/tcg/xtensa/Makefile.include
+++ /dev/null
@@ -1,11 +0,0 @@
-# Makefile.include for xtensa targets
-#
-# The compilers can only be used for building system tests
-
-ifeq ($(CONFIG_SOFTMMU),y)
-DOCKER_IMAGE=debian-xtensa-cross
-
-# default to the dc232b cpu
-DOCKER_CROSS_COMPILER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc
-DOCKER_CROSS_LINKER=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-ld
-endif
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 07/42] tests/tcg: add .gitignore for in source builds
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (5 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 08/42] tests/docker: move DEF_TARGET_LIST setting to common.rc Alex Bennée
                   ` (36 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, cota, stefanha, marcandre.lureau, pbonzini, aurelien

This hides the new build artefacts from the re-organised TCG tests when
you are doing an in-source build.

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

diff --git a/tests/tcg/.gitignore b/tests/tcg/.gitignore
new file mode 100644
index 00000000000..84d7541b286
--- /dev/null
+++ b/tests/tcg/.gitignore
@@ -0,0 +1,5 @@
+# These are build artefacts which only appear when you are doing
+# builds directly in the source tree.
+config-*.mak
+*-softmmu/
+*-linux-user/
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 08/42] tests/docker: move DEF_TARGET_LIST setting to common.rc
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (6 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 07/42] tests/tcg: add .gitignore for in source builds Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 09/42] tests/docker: set DEF_TARGET_LIST for some containers Alex Bennée
                   ` (35 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

We might as well not repeat ourselves. At the same time allow it to be
overridden which we will use later from docker targets.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/docker/common.rc  | 4 ++++
 tests/docker/test-build | 1 -
 tests/docker/test-mingw | 1 -
 tests/docker/test-quick | 1 -
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/docker/common.rc b/tests/docker/common.rc
index 4011561587a..512202b0a19 100755
--- a/tests/docker/common.rc
+++ b/tests/docker/common.rc
@@ -11,6 +11,10 @@
 # or (at your option) any later version. See the COPYING file in
 # the top-level directory.
 
+# This might be set by ENV of a docker container... it is always
+# overriden by TARGET_LIST if the user sets it.
+DEF_TARGET_LIST=${DEF_TARGET_LIST:-"x86_64-softmmu,aarch64-softmmu"}
+
 requires()
 {
     for c in $@; do
diff --git a/tests/docker/test-build b/tests/docker/test-build
index 22766cfacc0..2b2a7832f15 100755
--- a/tests/docker/test-build
+++ b/tests/docker/test-build
@@ -15,7 +15,6 @@
 
 cd "$BUILD_DIR"
 
-DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
 install_qemu
diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw
index fdb1c2c879d..c30eb654eb7 100755
--- a/tests/docker/test-mingw
+++ b/tests/docker/test-mingw
@@ -16,7 +16,6 @@
 requires mingw dtc
 
 cd "$BUILD_DIR"
-DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 
 for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
     TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
diff --git a/tests/docker/test-quick b/tests/docker/test-quick
index eee59c55fba..feee44b2476 100755
--- a/tests/docker/test-quick
+++ b/tests/docker/test-quick
@@ -15,7 +15,6 @@
 
 cd "$BUILD_DIR"
 
-DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
 check_qemu
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 09/42] tests/docker: set DEF_TARGET_LIST for some containers
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (7 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 08/42] tests/docker: move DEF_TARGET_LIST setting to common.rc Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES Alex Bennée
                   ` (34 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

You can assume the failures most people are interested in are the
cross-compile failures that are specific to the cross compile target.
Set DEF_TARGET_LIST based on what we use for shippable, the user can
always override by calling with TARGET_LIST set.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-arm64-cross.docker    | 1 +
 tests/docker/dockerfiles/debian-armel-cross.docker    | 1 +
 tests/docker/dockerfiles/debian-armhf-cross.docker    | 1 +
 tests/docker/dockerfiles/debian-mips-cross.docker     | 1 +
 tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 +
 tests/docker/dockerfiles/debian-ppc64el-cross.docker  | 1 +
 tests/docker/dockerfiles/debian-s390x-cross.docker    | 1 +
 7 files changed, 7 insertions(+)

diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index 7c2cc93daf8..6b59ef0843a 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -17,6 +17,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
+ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index d866fe5d75b..363a162a253 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -15,6 +15,7 @@ RUN dpkg --add-architecture armel && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
+ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index 2b8627673c3..d5365881e79 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -17,6 +17,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
+ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker
index 3c4d6f9ec1f..a54efa7253a 100644
--- a/tests/docker/dockerfiles/debian-mips-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips-cross.docker
@@ -20,6 +20,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
+ENV DEF_TARGET_LIST mips-softmmu,mipsel-linux-user
 
 # Install extra libraries to increase code coverage
 RUN apt update && \
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index 34b0b828957..a1481e16e2c 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -21,6 +21,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
+ENV DEF_TARGET_LIST mips64el-softmmu,mips64el-linux-user
 
 # Install extra libraries to increase code coverage
 RUN apt update && \
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index fc056d7bc35..f10883c8188 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -16,6 +16,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
+ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
 
 # Install extra libraries to increase code coverage
 RUN apt update && \
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index 6732f9ec789..efa346007d6 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -21,6 +21,7 @@ RUN apt update && \
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
+ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user
 
 # Install extra libraries to increase code coverage
 RUN apt update && \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (8 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 09/42] tests/docker: set DEF_TARGET_LIST for some containers Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 10:34   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster Alex Bennée
                   ` (33 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

We need to add additional packages to the base images to be able to
build QEMU so lets avoid building with it.

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

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index cf535cbd196..89881fb5f5d 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
 DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
 DOCKER_DEPRECATED_IMAGES := debian
 # we don't run tests on intermediate images (used as base by another image)
-DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap
+DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-sid debian-bootstrap
 DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
 DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
 # Use a global constant ccache directory to speed up repetitive builds
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (9 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 10:35   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc " Alex Bennée
                   ` (32 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can unify our cross build images for both
QEMU and tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                    |  5 ++---
 .../docker/dockerfiles/debian-arm64-cross.docker |  4 ++--
 .../dockerfiles/debian-buster-arm64-cross.docker | 16 ----------------
 tests/tcg/configure.sh                           |  2 +-
 4 files changed, 5 insertions(+), 22 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 89881fb5f5d..48c22ae40c0 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -86,13 +86,10 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
 endif
 
 # Enforce dependencies for composite images
-docker-image-debian: docker-image-debian9
 docker-image-debian9-mxe: docker-image-debian9
 docker-image-debian-amd64: docker-image-debian9
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
-docker-image-debian-arm64-cross: docker-image-debian9
-docker-image-debian-buster-arm64-cross: docker-image-debian10
 docker-image-debian-mips-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-mips64el-cross: docker-image-debian9
@@ -101,6 +98,8 @@ docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-win32-cross: docker-image-debian9-mxe
 docker-image-debian-win64-cross: docker-image-debian9-mxe
 
+docker-image-debian-arm64-cross: docker-image-debian10
+
 docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid
 docker-image-debian-m68k-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index 6b59ef0843a..55045ff5d5a 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -1,9 +1,9 @@
 #
 # Docker arm64 cross-compiler target
 #
-# This docker target builds on the debian Stretch base image.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian9
+FROM qemu:debian10
 
 # Add the foreign architecture we want and install dependencies
 RUN dpkg --add-architecture arm64
diff --git a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker b/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
deleted file mode 100644
index 52787edcc2c..00000000000
--- a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Docker arm64 cross-compiler target
-#
-# This docker target builds on the Debian's Buster base image. There
-# are no QEMU pre-requistes so this image can only be used to build
-# test cases.
-#
-FROM qemu:debian10
-
-# Add the foreign architecture we want and install dependencies
-RUN dpkg --add-architecture arm64
-RUN apt update && \
-    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
-    DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt-get install -y --no-install-recommends \
-        crossbuild-essential-arm64
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 5f794b664b8..2a351a00048 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -95,7 +95,7 @@ for target in $target_list; do
   case $target in
     aarch64-*)
       # We don't have any bigendian build tools so we only use this for AArch64
-      container_image=debian-buster-arm64-cross
+      container_image=debian-arm64-cross
       container_cross_cc=aarch64-linux-gnu-gcc
       ;;
     alpha-*)
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (10 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:32   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha " Alex Bennée
                   ` (31 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                        | 2 +-
 tests/docker/dockerfiles/debian-powerpc-cross.docker | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 48c22ae40c0..7c1ff677a13 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -99,6 +99,7 @@ docker-image-debian-win32-cross: docker-image-debian9-mxe
 docker-image-debian-win64-cross: docker-image-debian9-mxe
 
 docker-image-debian-arm64-cross: docker-image-debian10
+docker-image-debian-powerpc-cross: docker-image-debian10
 
 docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid
@@ -107,7 +108,6 @@ docker-image-debian-sh4-cross: docker-image-debian-sid
 docker-image-debian-sparc64-cross: docker-image-debian-sid
 docker-image-debian-mips64-cross: docker-image-debian-sid
 docker-image-debian-riscv64-cross: docker-image-debian-sid
-docker-image-debian-powerpc-cross: docker-image-debian-sid
 docker-image-debian-ppc64-cross: docker-image-debian-sid
 docker-image-travis: NOUSER=1
 
diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/docker/dockerfiles/debian-powerpc-cross.docker
index 5d08fad7cd3..89dd4fbf870 100644
--- a/tests/docker/dockerfiles/debian-powerpc-cross.docker
+++ b/tests/docker/dockerfiles/debian-powerpc-cross.docker
@@ -1,14 +1,12 @@
 #
 # Docker powerpc cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets. The original
-# Jessie based no longer builds.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
         gcc-powerpc-linux-gnu \
-        libc6-dev-powerpc-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
+        libc6-dev-powerpc-cross
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (11 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:23   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA " Alex Bennée
                   ` (30 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                      | 2 +-
 tests/docker/dockerfiles/debian-alpha-cross.docker | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 7c1ff677a13..e7379f1d732 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -98,10 +98,10 @@ docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-win32-cross: docker-image-debian9-mxe
 docker-image-debian-win64-cross: docker-image-debian9-mxe
 
+docker-image-debian-alpha-cross: docker-image-debian10
 docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
 
-docker-image-debian-alpha-cross: docker-image-debian-sid
 docker-image-debian-hppa-cross: docker-image-debian-sid
 docker-image-debian-m68k-cross: docker-image-debian-sid
 docker-image-debian-sh4-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/docker/dockerfiles/debian-alpha-cross.docker
index 23444342f03..74bcabfdb12 100644
--- a/tests/docker/dockerfiles/debian-alpha-cross.docker
+++ b/tests/docker/dockerfiles/debian-alpha-cross.docker
@@ -1,13 +1,12 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
         gcc-alpha-linux-gnu \
-        libc6.1-dev-alpha-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
+        libc6.1-dev-alpha-cross
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (12 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:22   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k " Alex Bennée
                   ` (29 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                     | 2 +-
 tests/docker/dockerfiles/debian-hppa-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index e7379f1d732..ba5a624eaec 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -100,9 +100,9 @@ docker-image-debian-win64-cross: docker-image-debian9-mxe
 
 docker-image-debian-alpha-cross: docker-image-debian10
 docker-image-debian-arm64-cross: docker-image-debian10
+docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
 
-docker-image-debian-hppa-cross: docker-image-debian-sid
 docker-image-debian-m68k-cross: docker-image-debian-sid
 docker-image-debian-sh4-cross: docker-image-debian-sid
 docker-image-debian-sparc64-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-hppa-cross.docker b/tests/docker/dockerfiles/debian-hppa-cross.docker
index ee6d9a24ce8..5c68b2d3304 100644
--- a/tests/docker/dockerfiles/debian-hppa-cross.docker
+++ b/tests/docker/dockerfiles/debian-hppa-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (13 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:28   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 " Alex Bennée
                   ` (28 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                     | 2 +-
 tests/docker/dockerfiles/debian-m68k-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index ba5a624eaec..62f2733eb66 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -101,9 +101,9 @@ docker-image-debian-win64-cross: docker-image-debian9-mxe
 docker-image-debian-alpha-cross: docker-image-debian10
 docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-hppa-cross: docker-image-debian10
+docker-image-debian-m68k-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
 
-docker-image-debian-m68k-cross: docker-image-debian-sid
 docker-image-debian-sh4-cross: docker-image-debian-sid
 docker-image-debian-sparc64-cross: docker-image-debian-sid
 docker-image-debian-mips64-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/docker/dockerfiles/debian-m68k-cross.docker
index 4311c9cf86d..25edc80e9a3 100644
--- a/tests/docker/dockerfiles/debian-m68k-cross.docker
+++ b/tests/docker/dockerfiles/debian-m68k-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (14 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:27   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 " Alex Bennée
                   ` (27 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                        | 2 +-
 tests/docker/dockerfiles/debian-sparc64-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 62f2733eb66..50c5e64212a 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -103,9 +103,9 @@ docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-m68k-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
+docker-image-debian-sparc64-cross: docker-image-debian10
 
 docker-image-debian-sh4-cross: docker-image-debian-sid
-docker-image-debian-sparc64-cross: docker-image-debian-sid
 docker-image-debian-mips64-cross: docker-image-debian-sid
 docker-image-debian-riscv64-cross: docker-image-debian-sid
 docker-image-debian-ppc64-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/docker/dockerfiles/debian-sparc64-cross.docker
index 7a2c2ab19c2..31fd34f120b 100644
--- a/tests/docker/dockerfiles/debian-sparc64-cross.docker
+++ b/tests/docker/dockerfiles/debian-sparc64-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (15 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:23   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 " Alex Bennée
                   ` (26 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                    | 2 +-
 tests/docker/dockerfiles/debian-sh4-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 50c5e64212a..e946aae14fa 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -103,9 +103,9 @@ docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-m68k-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
+docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
 
-docker-image-debian-sh4-cross: docker-image-debian-sid
 docker-image-debian-mips64-cross: docker-image-debian-sid
 docker-image-debian-riscv64-cross: docker-image-debian-sid
 docker-image-debian-ppc64-cross: docker-image-debian-sid
diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docker/dockerfiles/debian-sh4-cross.docker
index 29983b2d75b..9d7663764e4 100644
--- a/tests/docker/dockerfiles/debian-sh4-cross.docker
+++ b/tests/docker/dockerfiles/debian-sh4-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (16 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-06 19:05   ` Aleksandar Markovic
  2019-09-07 11:33   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 " Alex Bennée
                   ` (25 subsequent siblings)
  43 siblings, 2 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, Aleksandar Markovic, stefanb, Aleksandar Rikalo,
	Alex Bennée, richard.henderson, f4bug,
	Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                       | 2 +-
 tests/docker/dockerfiles/debian-mips64-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index e946aae14fa..896c1c5a601 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -102,11 +102,11 @@ docker-image-debian-alpha-cross: docker-image-debian10
 docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-m68k-cross: docker-image-debian10
+docker-image-debian-mips64-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
 docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
 
-docker-image-debian-mips64-cross: docker-image-debian-sid
 docker-image-debian-riscv64-cross: docker-image-debian-sid
 docker-image-debian-ppc64-cross: docker-image-debian-sid
 docker-image-travis: NOUSER=1
diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/docker/dockerfiles/debian-mips64-cross.docker
index bf0073a4662..1a79505d696 100644
--- a/tests/docker/dockerfiles/debian-mips64-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (17 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:24   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 " Alex Bennée
                   ` (24 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                        | 2 +-
 tests/docker/dockerfiles/debian-riscv64-cross.docker | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 896c1c5a601..93190b1e2a2 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -104,10 +104,10 @@ docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-m68k-cross: docker-image-debian10
 docker-image-debian-mips64-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
+docker-image-debian-riscv64-cross: docker-image-debian10
 docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
 
-docker-image-debian-riscv64-cross: docker-image-debian-sid
 docker-image-debian-ppc64-cross: docker-image-debian-sid
 docker-image-travis: NOUSER=1
 
diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker
index 221697f9d11..5e2d6ddb600 100644
--- a/tests/docker/dockerfiles/debian-riscv64-cross.docker
+++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker
@@ -1,10 +1,9 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian-sid
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 cross compile to Buster
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (18 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:29   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image Alex Bennée
                   ` (23 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Now Buster is released we can stop relying on the movable feast that
is Sid for our cross-compiler for building tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                      | 4 ++--
 tests/docker/dockerfiles/debian-ppc64-cross.docker | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 93190b1e2a2..b6c04059502 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -104,11 +104,11 @@ docker-image-debian-hppa-cross: docker-image-debian10
 docker-image-debian-m68k-cross: docker-image-debian10
 docker-image-debian-mips64-cross: docker-image-debian10
 docker-image-debian-powerpc-cross: docker-image-debian10
+docker-image-debian-ppc64-cross: docker-image-debian10
 docker-image-debian-riscv64-cross: docker-image-debian10
 docker-image-debian-sh4-cross: docker-image-debian10
 docker-image-debian-sparc64-cross: docker-image-debian10
 
-docker-image-debian-ppc64-cross: docker-image-debian-sid
 docker-image-travis: NOUSER=1
 
 # Specialist build images, sometimes very limited tools
@@ -117,7 +117,7 @@ docker-image-tricore-cross: docker-image-debian9
 # These images may be good enough for building tests but not for test builds
 DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
 DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
-DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-cross
+DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross debian-ppc64-cross fedora-i386-cross
 DOCKER_PARTIAL_IMAGES += fedora-cris-cross
 
 # Rules for building linux-user powered images
diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/docker/dockerfiles/debian-ppc64-cross.docker
index e5757fe46ee..4bf88ab02dd 100644
--- a/tests/docker/dockerfiles/debian-ppc64-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64-cross.docker
@@ -1,12 +1,11 @@
 #
 # Docker ppc64 cross-compiler target
 #
-# This docker target builds on the debian sid base image which
-# contains cross compilers for Debian "ports" targets.
-FROM qemu:debian-sid
+# This docker target builds on the debian Buster base image.
+FROM qemu:debian10
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
        gcc-powerpc64-linux-gnu \
-       libc6-dev-ppc64-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
+       libc6-dev-ppc64-cross
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (19 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 20:02   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds Alex Bennée
                   ` (22 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Debian Sid was only ever a stop gap and thanks to the much better
cross compiler in the Buster release we don't need it any more. Send
it on its merry way.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include              |  2 +-
 tests/docker/dockerfiles/debian-sid.docker | 41 ----------------------
 2 files changed, 1 insertion(+), 42 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/debian-sid.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index b6c04059502..59fbebbe2e6 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
 DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
 DOCKER_DEPRECATED_IMAGES := debian
 # we don't run tests on intermediate images (used as base by another image)
-DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-sid debian-bootstrap
+DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-bootstrap
 DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
 DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
 # Use a global constant ccache directory to speed up repetitive builds
diff --git a/tests/docker/dockerfiles/debian-sid.docker b/tests/docker/dockerfiles/debian-sid.docker
deleted file mode 100644
index 513459ca7f8..00000000000
--- a/tests/docker/dockerfiles/debian-sid.docker
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Debian Sid Base
-#
-# A number of our guests exist as ports only. We can either use the
-# ports repo or get everything from Sid. However Sid is a rolling
-# distro which may be broken at any particular time. If you are
-# unlucky and try and build your images while gcc is in the process of
-# being uploaded this can fail. Your only recourse is to try again in
-# a few hours when the repos have re-synced. Once built however you
-# won't be affected by repo changes unless the docker recipies are
-# updated and trigger a re-build.
-#
-
-# This must be earlier than the snapshot date we are aiming for
-FROM debian:sid-20181011-slim
-
-# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
-ENV DEBIAN_SNAPSHOT_DATE "20181030"
-RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
-
-# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
-ENV DEBIAN_SNAPSHOT_DATE "20181030"
-RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
-
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
-
-# Install common build utilities
-RUN apt update && \
-    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
-    DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt install -y --no-install-recommends \
-        bison \
-        build-essential \
-        ca-certificates \
-        flex \
-        git \
-        pkg-config \
-        psmisc \
-        python \
-        texinfo || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (20 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 20:21   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES Alex Bennée
                   ` (21 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien,
	David Gibson

Now Jessie has entered LTS the powerpc architecture has been dropped
so we can no longer build the image from scratch. We will still
support a minimal powerpc-cross image for building testcases.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
---
 tests/docker/Makefile.include                     |  8 --------
 .../dockerfiles/debian-powerpc-user-cross.docker  | 15 ---------------
 2 files changed, 23 deletions(-)
 delete mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 59fbebbe2e6..f4e9dfc0120 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -126,14 +126,6 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
 # work around issues with poorly working multi-arch systems and broken
 # packages.
 
-# Jessie is the last supported release for powerpc, but multi-arch is
-# broken so we need a qemu-linux-user for this target
-docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
-docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
-docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
-docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
-DOCKER_USER_IMAGES += debian-powerpc-user
-
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \
 	$(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \
diff --git a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker b/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
deleted file mode 100644
index 6938a845ee2..00000000000
--- a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Docker powerpc cross-compiler target for QEMU
-#
-# We can't use current Debian stable cross-compilers to build powerpc
-# as it has been dropped as a release architecture. Using Debian Sid
-# is just far too sketchy a build environment. This leaves us the
-# final option of using linux-user. This image is based of the
-# debootstrapped qemu:debian-powerpc-user but doesn't need any extra
-# magic once it is setup.
-#
-FROM qemu:debian-powerpc-user
-
-RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (21 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 12:06   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe " Alex Bennée
                   ` (20 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

This should have been marked when the docker recipe was added to
prevent it being used for cross compiling QEMU. Sort the
DEBIAN_PARTIAL_IMAGE list while we are at it.

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

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index f4e9dfc0120..8d7f9376578 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -115,10 +115,15 @@ docker-image-travis: NOUSER=1
 docker-image-tricore-cross: docker-image-debian9
 
 # These images may be good enough for building tests but not for test builds
-DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
-DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
-DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross debian-ppc64-cross fedora-i386-cross
-DOCKER_PARTIAL_IMAGES += fedora-cris-cross
+DOCKER_PARTIAL_IMAGES += debian-alpha-cross
+DOCKER_PARTIAL_IMAGES += debian-hppa-cross
+DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
+DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
+DOCKER_PARTIAL_IMAGES += debian-riscv64-cross
+DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
+DOCKER_PARTIAL_IMAGES += debian-tricore-cross
+DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
+DOCKER_PARTIAL_IMAGES += fedora-i386-cross fedora-cris-cross
 
 # Rules for building linux-user powered images
 #
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (22 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 10:36   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly Alex Bennée
                   ` (19 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Another image that can't be used directly to build QEMU.

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

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 8d7f9376578..2c8cb790ad0 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
 DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
 DOCKER_DEPRECATED_IMAGES := debian
 # we don't run tests on intermediate images (used as base by another image)
-DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-bootstrap
+DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian9-mxe debian-ports debian-bootstrap
 DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
 DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
 # Use a global constant ccache directory to speed up repetitive builds
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (23 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe " Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-05 10:40   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 26/42] tests/docker: add debian-amd64-cross for non-x86 hosts Alex Bennée
                   ` (18 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

On some images SHELL is pointing at a limited /bin/sh which doesn't
understand noprofile/norc. Given the run script is running bash just
invoke it directly.

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

diff --git a/tests/docker/run b/tests/docker/run
index 1014871fec0..8edc7026ee3 100755
--- a/tests/docker/run
+++ b/tests/docker/run
@@ -62,7 +62,7 @@ echo "* Prepared to run command:"
 echo "  $CMD"
 echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
 echo
-$SHELL --noprofile --norc
+env bash --noprofile --norc
 
 if "$CMD"; then
     exit 0
@@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then
     echo "* Hit Ctrl-D to exit"
     echo
     # Force error after shell exits
-    $SHELL --noprofile --norc && exit 1
+    env bash --noprofile --norc && exit 1
 else
     exit 1
 fi
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 26/42] tests/docker: add debian-amd64-cross for non-x86 hosts
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (24 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps Alex Bennée
                   ` (17 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

When building on a non-x86 host we need to setup the x86 build like
any other cross compiler.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/Makefile.include                 |  6 +++++
 .../dockerfiles/debian-amd64-cross.docker     | 22 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 2c8cb790ad0..cb0961a69e4 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -87,7 +87,13 @@ endif
 
 # Enforce dependencies for composite images
 docker-image-debian9-mxe: docker-image-debian9
+ifeq ($(ARCH),x86_64)
 docker-image-debian-amd64: docker-image-debian9
+DOCKER_PARTIAL_IMAGES += debian-amd64-cross
+else
+docker-image-debian-amd64-cross: docker-image-debian10
+DOCKER_PARTIAL_IMAGES += debian-amd64
+endif
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-mips-cross: docker-image-debian9
diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker
new file mode 100644
index 00000000000..5d890419251
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-amd64-cross.docker
@@ -0,0 +1,22 @@
+#
+# Docker x86_64 cross target
+#
+# This docker target is used on non-x86_64 machines which need the
+# x86_64 cross compilers installed.
+#
+FROM qemu:debian10
+MAINTAINER Alex Bennée <alex.bennee@linaro.org>
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture amd64
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt install -y --no-install-recommends \
+        crossbuild-essential-amd64
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt build-dep -yy -a amd64 --arch-only qemu
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-linux-gnu-
+ENV DEF_TARGET_LIST x86_64-softmmu,x86_64-linux-user,i386-softmmu,i386-linux-user
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (25 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 26/42] tests/docker: add debian-amd64-cross for non-x86 hosts Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-07 11:40   ` Philippe Mathieu-Daudé
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 28/42] tests/docker: add more images to PARTIAL_IMAGES when not on x86_64 Alex Bennée
                   ` (16 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

The Debian QEMU packages require a bunch of cross compilers for
building firmware which aren't available on all host architectures.
Using --arch-only skips this particular requirement and allows us to
install just the dependencies we need.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-arm64-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-armel-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-armhf-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-mips-cross.docker     | 6 +++---
 tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 +-
 tests/docker/dockerfiles/debian-mipsel-cross.docker   | 2 +-
 tests/docker/dockerfiles/debian-ppc64el-cross.docker  | 2 +-
 tests/docker/dockerfiles/debian-s390x-cross.docker    | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index 55045ff5d5a..09ca0a1ba79 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -13,7 +13,7 @@ RUN apt update && \
         crossbuild-essential-arm64
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a arm64 qemu
+    apt build-dep -yy -a arm64 --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index 363a162a253..15378f8ea2c 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -11,7 +11,7 @@ RUN dpkg --add-architecture armel && \
     apt update && \
     apt install -yy crossbuild-essential-armel && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a armel qemu
+    apt build-dep -yy -a armel --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index d5365881e79..4a20af6fe1a 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -13,7 +13,7 @@ RUN apt update && \
         crossbuild-essential-armhf
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a armhf qemu
+    apt build-dep -yy -a armhf --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker
index a54efa7253a..08a8e1c29cc 100644
--- a/tests/docker/dockerfiles/debian-mips-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips-cross.docker
@@ -1,9 +1,9 @@
 #
 # Docker mips cross-compiler target
 #
-# This docker target builds on the debian Stretch base image.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian9
+FROM qemu:debian10
 
 MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
 
@@ -16,7 +16,7 @@ RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mips qemu
+    apt build-dep -yy -a mips --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index a1481e16e2c..2fca1124053 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -17,7 +17,7 @@ RUN dpkg --add-architecture mips64el && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mips64el qemu
+    apt build-dep -yy -a mips64el --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index 88accad2692..4abf7832ac6 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -16,7 +16,7 @@ RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mipsel qemu
+    apt build-dep -yy -a mipsel --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index f10883c8188..9973df9ff74 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -12,7 +12,7 @@ RUN dpkg --add-architecture ppc64el && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a ppc64el qemu
+    apt build-dep -yy -a ppc64el --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index efa346007d6..eb73c988559 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -17,7 +17,7 @@ RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a s390x qemu
+    apt build-dep -yy -a s390x --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 28/42] tests/docker: add more images to PARTIAL_IMAGES when not on x86_64
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (26 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps Alex Bennée
@ 2019-09-04 20:29 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first Alex Bennée
                   ` (15 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

This prevents us trying to do builds which we can't complete.

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

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index cb0961a69e4..46f95320e54 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -104,6 +104,15 @@ docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-win32-cross: docker-image-debian9-mxe
 docker-image-debian-win64-cross: docker-image-debian9-mxe
 
+# For non-x86 hosts not all cross-compilers have been packaged
+ifneq ($(ARCH),x86_64)
+DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross
+DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross
+DOCKER_PARTIAL_IMAGES += debian-s390x-cross
+DOCKER_PARTIAL_IMAGES += debian-win32-cross debian-win64-cross
+DOCKER_PARTIAL_IMAGES += fedora travis
+endif
+
 docker-image-debian-alpha-cross: docker-image-debian10
 docker-image-debian-arm64-cross: docker-image-debian10
 docker-image-debian-hppa-cross: docker-image-debian10
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (27 preceding siblings ...)
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 28/42] tests/docker: add more images to PARTIAL_IMAGES when not on x86_64 Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 30/42] .travis.yml: Enable multiple caching features Alex Bennée
                   ` (14 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, cota, stefanha, marcandre.lureau, pbonzini, aurelien

For whatever reason this doesn't trigger normally but because
compile_prog uses QEMU_CFLAGS we end up trying to build a -pie
--no-pie build which confuses compilers on some non-x86 hosts.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 7860bbc3121..30aad233d17 100755
--- a/configure
+++ b/configure
@@ -2021,6 +2021,12 @@ static THREAD int tls_var;
 int main(void) { return tls_var; }
 
 EOF
+  # check we support --no-pie first...
+  if compile_prog "-Werror -fno-pie" "-no-pie"; then
+    CFLAGS_NOPIE="-fno-pie"
+    LDFLAGS_NOPIE="-nopie"
+  fi
+
   if compile_prog "-fPIE -DPIE" "-pie"; then
     QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
     LDFLAGS="-pie $LDFLAGS"
@@ -2036,11 +2042,6 @@ EOF
       pie="no"
     fi
   fi
-
-  if compile_prog "-Werror -fno-pie" "-nopie"; then
-    CFLAGS_NOPIE="-fno-pie"
-    LDFLAGS_NOPIE="-nopie"
-  fi
 fi
 
 ##########################################
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 30/42] .travis.yml: Enable multiple caching features
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (28 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 31/42] .travis.yml: Increase cache timeout from 3min to 20min Alex Bennée
                   ` (13 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

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

Using the 'multiple caching features' means explode the YAML array,
thus it eases the git workflow (it is easier to move patches around).

See https://docs.travis-ci.com/user/caching#enabling-multiple-caching-features

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20170809202712.6951-4-f4bug@amsat.org>
---
 .travis.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 92b00927d4f..612caabc6cf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,8 @@ dist: xenial
 language: c
 compiler:
   - gcc
-cache: ccache
+cache:
+  ccache: true
 
 
 addons:
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 31/42] .travis.yml: Increase cache timeout from 3min to 20min
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (29 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 30/42] .travis.yml: Enable multiple caching features Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 32/42] .travis.yml: Cache Python PIP packages Alex Bennée
                   ` (12 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

We are going to cache few gigabytes, increase the cache timeout
to avoid build failures when uploading our cache.

See https://docs.travis-ci.com/user/caching/#setting-the-timeout

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 612caabc6cf..8c376d22239 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,7 @@ language: c
 compiler:
   - gcc
 cache:
+  timeout: 1200
   ccache: true
 
 
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 32/42] .travis.yml: Cache Python PIP packages
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (30 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 31/42] .travis.yml: Increase cache timeout from 3min to 20min Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 33/42] .travis.yml: Cache Avocado cache Alex Bennée
                   ` (11 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

We always install the same packages ever and ever, cache them.

See https://docs.travis-ci.com/user/caching/#pip-cache

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 8c376d22239..d51125c9569 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,7 @@ compiler:
 cache:
   timeout: 1200
   ccache: true
+  pip: true
 
 
 addons:
-- 
2.20.1



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

* [Qemu-devel] [PATCH  v1 33/42] .travis.yml: Cache Avocado cache
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (31 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 32/42] .travis.yml: Cache Python PIP packages Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 34/42] .travis.yml: Improve ccache use Alex Bennée
                   ` (10 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

Avocado tests download artifacts from various sources.
These sources sometime have network issues resulting in build
failures. Cache Avocado cache to reduce build failure.

See https://docs.travis-ci.com/user/caching/#arbitrary-directories

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index d51125c9569..8d2e89da533 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,8 @@ cache:
   timeout: 1200
   ccache: true
   pip: true
+  directories:
+  - $HOME/avocado/data/cache
 
 
 addons:
-- 
2.20.1



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

* [Qemu-devel] [PATCH  v1 34/42] .travis.yml: Improve ccache use
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (32 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 33/42] .travis.yml: Cache Avocado cache Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 35/42] .travis.yml: Enable ccache on OSX Alex Bennée
                   ` (9 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

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

Per https://ccache.dev/manual/latest.html:

  By default, ccache tries to give as few false cache hits as
  possible. However, in certain situations it’s possible that
  you know things that ccache can’t take for granted.

  [The CCACHE_SLOPINESS environment variable] makes it possible
  to tell ccache to relax some checks in order to increase the
  hit rate.

We can relax the ctime/mtime header checks:

  - include_file_ctime

    By default, ccache also will not cache a file if it
    includes a header whose ctime is too new. This option
    disables that check.

  - include_file_mtime

    By default, ccache will not cache a file if it includes
    a header whose mtime is too new. This option disables
    that check.

We also add a call to clear the cache statistics before running
the build, and display them when the build finishes.

See https://docs.travis-ci.com/user/caching/#ccache-cache

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .travis.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 8d2e89da533..5a878ae6ae9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -70,6 +70,9 @@ env:
     - TEST_CMD="make check -j3 V=1"
     # This is broadly a list of "mainline" softmmu targets which have support across the major distros
     - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
+    - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
+    - CCACHE_MAXSIZE=1G
+
 
 git:
   # we want to do this ourselves
@@ -77,10 +80,13 @@ git:
 
 
 before_script:
+  - command -v ccache && ccache --zero-stats
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
 script:
   - make -j3 && travis_retry ${TEST_CMD}
+after_script:
+  - command -v ccache && ccache --show-stats
 
 
 matrix:
-- 
2.20.1



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

* [Qemu-devel] [PATCH  v1 35/42] .travis.yml: Enable ccache on OSX
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (33 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 34/42] .travis.yml: Improve ccache use Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 36/42] .travis.yml: Document how the build matrix use caches Alex Bennée
                   ` (8 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

By default, ccache is not installed on macOS environments.

See https://docs.travis-ci.com/user/caching/#ccache-on-macos

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 5a878ae6ae9..2dd26486abc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,6 +45,7 @@ addons:
       - gcovr
   homebrew:
     packages:
+      - ccache
       - glib
       - pixman
       - gnu-sed
@@ -80,6 +81,7 @@ git:
 
 
 before_script:
+  - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
   - command -v ccache && ccache --zero-stats
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
   - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 36/42] .travis.yml: Document how the build matrix use caches
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (34 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 35/42] .travis.yml: Enable ccache on OSX Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 37/42] .travis.yml: Cache Linux/GCC 'debug profile' jobs together Alex Bennée
                   ` (7 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

We will set the CACHE_NAME variable to improve the caching
of various jobs using the same characteristics. Document it
first.

See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 2dd26486abc..ab3e4ebaadf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,6 +6,12 @@ language: c
 compiler:
   - gcc
 cache:
+  # There is one cache per branch and compiler version.
+  # characteristics of each job are used to identify the cache:
+  # - OS name (currently, linux, osx, or windows)
+  # - OS distribution (for Linux, xenial, trusty, or precise)
+  # - macOS image name (e.g., xcode7.2)
+  # - Names and values of visible environment variables set in .travis.yml or Settings panel
   timeout: 1200
   ccache: true
   pip: true
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 37/42] .travis.yml: Cache Linux/GCC 'debug profile' jobs together
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (35 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 36/42] .travis.yml: Document how the build matrix use caches Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 38/42] .travis.yml: Cache Linux/GCC 'non-debug " Alex Bennée
                   ` (6 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

These jobs build different components but use the same
host features. Put them in the same cache bucket.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ab3e4ebaadf..ab4ee425e4f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -120,11 +120,13 @@ matrix:
 
     - env:
         - CONFIG="--enable-debug --enable-debug-tcg --disable-user"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
 
 
     # TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
     - env:
         - CONFIG="--enable-debug-tcg --disable-system"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
 
 
     - env:
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 38/42] .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (36 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 37/42] .travis.yml: Cache Linux/GCC 'debug profile' jobs together Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 39/42] .travis.yml: Cache Linux/Clang " Alex Bennée
                   ` (5 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

These jobs build different components but use the same
host features. Put them in the same cache bucket.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index ab4ee425e4f..63cbf41e573 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -101,15 +101,18 @@ matrix:
   include:
     - env:
         - CONFIG="--disable-system --static"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
     # we split the system builds as it takes a while to build them all
     - env:
         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
     - env:
         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
     # Just build tools and run minimal unit and softfloat checks
@@ -117,6 +120,8 @@ matrix:
         - BASE_CONFIG="--enable-tools"
         - CONFIG="--disable-user --disable-system"
         - TEST_CMD="make check-unit check-softfloat -j3"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
+
 
     - env:
         - CONFIG="--enable-debug --enable-debug-tcg --disable-user"
@@ -136,6 +141,7 @@ matrix:
     # Module builds are mostly of interest to major distros
     - env:
         - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
 
 
     # Alternate coroutines implementations are only really of interest to KVM users
@@ -155,6 +161,7 @@ matrix:
         - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
         - BASE_CONFIG="--enable-tools --enable-docs"
         - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
       addons:
         apt:
           packages:
@@ -196,6 +203,7 @@ matrix:
     # We manually include builds which we disable "make check" for
     - env:
         - CONFIG="--without-default-devices --disable-user"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
         - TEST_CMD=""
 
 
@@ -239,6 +247,7 @@ matrix:
     # Python builds
     - env:
         - CONFIG="--target-list=x86_64-softmmu"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
       language: python
       python:
         - "3.4"
@@ -246,6 +255,7 @@ matrix:
 
     - env:
         - CONFIG="--target-list=x86_64-softmmu"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
       language: python
       python:
         - "3.6"
@@ -312,8 +322,11 @@ matrix:
     - env:
         - CONFIG="--disable-system"
         - TEST_CMD="make -j3 check-tcg V=1"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
+
 
     # Run check-tcg against softmmu targets
     - env:
         - CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
         - TEST_CMD="make -j3 check-tcg V=1"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 39/42] .travis.yml: Cache Linux/Clang jobs together
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (37 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 38/42] .travis.yml: Cache Linux/GCC 'non-debug " Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org" Alex Bennée
                   ` (4 subsequent siblings)
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, Alex Bennée, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

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

These jobs build different components but use the same
host features. Put them in the same cache bucket.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 .travis.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 63cbf41e573..17aca3cd9c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -173,11 +173,13 @@ matrix:
     # Test with Clang for compile portability (Travis uses clang-5.0)
     - env:
         - CONFIG="--disable-system"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
 
     - env:
         - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
 
@@ -190,6 +192,7 @@ matrix:
 
     - env:
         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
       compiler: clang
 
 
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org"
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (38 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 39/42] .travis.yml: Cache Linux/Clang " Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-05 10:33   ` Philippe Mathieu-Daudé
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds Alex Bennée
                   ` (3 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, Yash Mankad, berrange, stefanb, Alex Bennée,
	Cleber Rosa, richard.henderson, f4bug,
	Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

From: Cleber Rosa <crosa@redhat.com>

The LinuxInitrd.test_with_2gib_file_should_work_with_linux_v4_16 test,
from tests/acceptance/linux_initrd.py, is currently failing to fetch
the "vmlinuz" file.  The reason for the failure is that the Fedora
project retires older versions from the "dl.fedoraproject.org" URL,
and keeps them in "archives.fedoraproject.org".  As an added note,
that test uses a Fedora 28 image, because of the specific Linux kernel
version requirements of the test.

For the sake of stability, let's use URLs from the archived and
supposedely ever stable URLs.  The good news is that the currently
supported versions are also hosted on the later.  This change limits
itself to change the URLs, while keeping the fetched files the same
(as can be evidenced by the unchanged hashes).

Documentation and the "vm tests" fedora definition were also updated.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Yash Mankad <ymankad@redhat.com>
Message-Id: <20190904005218.12536-1-crosa@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 qemu-doc.texi                          |  6 +++---
 tests/acceptance/boot_linux_console.py | 25 +++++++++++++++----------
 tests/acceptance/linux_initrd.py       |  5 +++--
 tests/vm/fedora                        |  2 +-
 4 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/qemu-doc.texi b/qemu-doc.texi
index 577d1e83764..37795f86fb6 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -440,15 +440,15 @@ of <protocol>.
 
 Example: boot from a remote Fedora 20 live ISO image
 @example
-qemu-system-x86_64 --drive media=cdrom,file=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
+qemu-system-x86_64 --drive media=cdrom,file=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
 
-qemu-system-x86_64 --drive media=cdrom,file.driver=http,file.url=http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
+qemu-system-x86_64 --drive media=cdrom,file.driver=http,file.url=http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
 @end example
 
 Example: boot from a remote Fedora 20 cloud image using a local overlay for
 writes, copy-on-read, and a readahead of 64k
 @example
-qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
+qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
 
 qemu-system-x86_64 -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
 @end example
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index 2504ef01507..8a9a314ab49 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -76,8 +76,9 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:x86_64
         :avocado: tags=machine:pc
         """
-        kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
-                      'releases/29/Everything/x86_64/os/images/pxeboot/vmlinuz')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+                      '/linux/releases/29/Everything/x86_64/os/images/pxeboot'
+                      '/vmlinuz')
         kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
 
@@ -250,8 +251,9 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:aarch64
         :avocado: tags=machine:virt
         """
-        kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
-                      'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+                      '/linux/releases/29/Everything/aarch64/os/images/pxeboot'
+                      '/vmlinuz')
         kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
 
@@ -271,8 +273,9 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:arm
         :avocado: tags=machine:virt
         """
-        kernel_url = ('https://download.fedoraproject.org/pub/fedora/linux/'
-                      'releases/29/Everything/armhfp/os/images/pxeboot/vmlinuz')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+                      '/linux/releases/29/Everything/armhfp/os/images/pxeboot'
+                      '/vmlinuz')
         kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
 
@@ -318,8 +321,9 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:s390x
         :avocado: tags=machine:s390_ccw_virtio
         """
-        kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/'
-                      'releases/29/Everything/s390x/os/images/kernel.img')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive'
+                      '/fedora-secondary/releases/29/Everything/s390x/os/images'
+                      '/kernel.img')
         kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
 
@@ -360,8 +364,9 @@ class BootLinuxConsole(Test):
         :avocado: tags=arch:ppc64
         :avocado: tags=machine:pseries
         """
-        kernel_url = ('https://download.fedoraproject.org/pub/fedora-secondary/'
-                      'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive'
+                      '/fedora-secondary/releases/29/Everything/ppc64le/os'
+                      '/ppc/ppc64/vmlinuz')
         kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
 
diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py
index 23be5a63aa8..c61d9826a45 100644
--- a/tests/acceptance/linux_initrd.py
+++ b/tests/acceptance/linux_initrd.py
@@ -54,8 +54,9 @@ class LinuxInitrd(Test):
         QEMU has supported up to 4 GiB initrd for recent kernel
         Expect guest can reach 'Unpacking initramfs...'
         """
-        kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/'
-                      'Everything/x86_64/os/images/pxeboot/vmlinuz')
+        kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
+                      '/linux/releases/28/Everything/x86_64/os/images/pxeboot/'
+                      'vmlinuz')
         kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a'
         kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
         max_size = 2 * (1024 ** 3) + 1
diff --git a/tests/vm/fedora b/tests/vm/fedora
index e8fa5bf0d21..7fec1479fb7 100755
--- a/tests/vm/fedora
+++ b/tests/vm/fedora
@@ -23,7 +23,7 @@ class FedoraVM(basevm.BaseVM):
     name = "fedora"
     arch = "x86_64"
 
-    base = "http://dl.fedoraproject.org/pub/fedora/linux/releases/30/"
+    base = "https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/"
     link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso"
     repo = base + "Server/x86_64/os/"
     full = base + "Everything/x86_64/os/"
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (39 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org" Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-05 10:32   ` Philippe Mathieu-Daudé
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 42/42] tests/docker: don't always encoding for subprocess.check_output Alex Bennée
                   ` (2 subsequent siblings)
  43 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

Currently this stops the mega:

  make docker-test-build

from working. Once the source is patched to deal with the case this
workaround can be removed.

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

diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
index 44bbf0f77ae..883f9bcf31c 100644
--- a/tests/docker/dockerfiles/ubuntu1804.docker
+++ b/tests/docker/dockerfiles/ubuntu1804.docker
@@ -56,3 +56,6 @@ RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml sdl2
+
+# https://bugs.launchpad.net/qemu/+bug/1838763
+ENV QEMU_CONFIGURE_OPTS --disable-libssh
-- 
2.20.1



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

* [Qemu-devel] [PATCH v1 42/42] tests/docker: don't always encoding for subprocess.check_output
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (40 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds Alex Bennée
@ 2019-09-04 20:30 ` Alex Bennée
  2019-09-04 22:16 ` [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) no-reply
  2019-09-06 10:20 ` Alex Bennée
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-04 20:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Alex Bennée, richard.henderson,
	f4bug, Philippe Mathieu-Daudé,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien

This was only added in Python 3.6 and not all the build hosts have
that recent a python3. However those that do will complain if
everything isn't properly utf-8 clean:

  ./tests/docker/docker.py --engine auto build qemu:debian-amd64 tests/docker/dockerfiles/debian-amd64.docker   --add-current-user
  Sending build context to Docker daemon  3.584kB

  Step 1/16 : FROM qemu:debian9
  pull access denied for qemu, repository does not exist or may require 'docker login'
  Traceback (most recent call last):
    File "./tests/docker/docker.py", line 659, in <module>
      sys.exit(main())
    File "./tests/docker/docker.py", line 655, in main
      return args.cmdobj.run(args, argv)
    File "./tests/docker/docker.py", line 452, in run
      extra_files_cksum=cksum)
    File "./tests/docker/docker.py", line 306, in build_image
      quiet=quiet)
    File "./tests/docker/docker.py", line 231, in _do_check
      return subprocess.check_call(self._command + cmd, **kwargs)
    File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'qemu:debian-amd64', '-f', '/tmp/docker_buildjvzs88tf/tmpyvtj7ub0.docker', '/tmp/docker_buildjvzs88tf']' returned non-zero exit status 1
  Error in atexit._run_exitfuncs:
  Traceback (most recent call last):
    File "./tests/docker/docker.py", line 258, in _kill_instances
      return self._do_kill_instances(True)
    File "./tests/docker/docker.py", line 239, in _do_kill_instances
      labels = json.loads(resp)[0]["Config"]["Labels"]
    File "/usr/lib/python3.4/json/__init__.py", line 312, in loads
      s.__class__.__name__))
  TypeError: the JSON object must be str, not 'bytes'
  make: *** [docker-image-debian-amd64] Error 1

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

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 8f391eb278b..e5b7632464b 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -258,10 +258,16 @@ class Docker(object):
         return self._do_kill_instances(True)
 
     def _output(self, cmd, **kwargs):
-        return subprocess.check_output(self._command + cmd,
-                                       stderr=subprocess.STDOUT,
-                                       encoding='utf-8',
-                                       **kwargs)
+        if sys.version_info[1] >= 6:
+            return subprocess.check_output(self._command + cmd,
+                                           stderr=subprocess.STDOUT,
+                                           encoding='utf-8',
+                                           **kwargs)
+        else:
+            return subprocess.check_output(self._command + cmd,
+                                           stderr=subprocess.STDOUT,
+                                           **kwargs)
+
 
     def inspect_tag(self, tag):
         try:
-- 
2.20.1



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

* Re: [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci)
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (41 preceding siblings ...)
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 42/42] tests/docker: don't always encoding for subprocess.check_output Alex Bennée
@ 2019-09-04 22:16 ` no-reply
  2019-09-06 10:20 ` Alex Bennée
  43 siblings, 0 replies; 74+ messages in thread
From: no-reply @ 2019-09-04 22:16 UTC (permalink / raw)
  To: alex.bennee
  Cc: fam, berrange, stefanb, richard.henderson, qemu-devel, f4bug,
	cota, stefanha, pbonzini, marcandre.lureau, alex.bennee,
	aurelien

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



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Subject: [Qemu-devel] [PATCH  v1 00/42] current testing/next queue (podman, docker, ci)
Message-id: 20190904203013.9028-1-alex.bennee@linaro.org

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
0fbbd2b tests/docker: don't always encoding for subprocess.check_output
5b2ad81 tests/docker: --disable-libssh on ubuntu1804 builds
c3ee1ae Fedora images: use URLs from stable "archives.fedoraproject.org"
942403a .travis.yml: Cache Linux/Clang jobs together
5e27a63 .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together
eb3387c .travis.yml: Cache Linux/GCC 'debug profile' jobs together
b88f2bb .travis.yml: Document how the build matrix use caches
a655c67 .travis.yml: Enable ccache on OSX
5ffee09 .travis.yml: Improve ccache use
aff75d2 .travis.yml: Cache Avocado cache
f16c75b .travis.yml: Cache Python PIP packages
0833369 .travis.yml: Increase cache timeout from 3min to 20min
0b7ee1a .travis.yml: Enable multiple caching features
cc73e57 configure: check if --no-pie is supported first
08b9a33 tests/docker: add more images to PARTIAL_IMAGES when not on x86_64
5cc1f1f tests/docker: use --arch-only for installing deps
0134450 tests/docker: add debian-amd64-cross for non-x86 hosts
2a70b8d tests/docker: avoid $SHELL invoke bash directly
3d28ab1 tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES
324696f tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
c465faa tests/docker: drop powerpc-user image for QEMU cross builds
213eeb6 tests/docker: drop debian-sid image
9f2f21c tests/docker: move our ppc64 cross compile to Buster
f898a09 tests/docker: move our riscv64 cross compile to Buster
a60a7b9 tests/docker: move our mips64 cross compile to Buster
2e05203 tests/docker: move our sh4 cross compile to Buster
dbcdf48 tests/docker: move our sparc64 cross compile to Buster
1c3befa tests/docker: move our m68k cross compile to Buster
654bcae tests/docker: move our HPPA cross compile to Buster
0e725a4 tests/docker: move our Alpha cross compile to Buster
ca3a13e tests/docker: move our powerpc cross compile to Buster
b92b820 tests/docker: move our arm64 cross compile to Buster
388f703 tests/docker: add Buster to DOCKER_PARTIAL_IMAGES
102d04a tests/docker: set DEF_TARGET_LIST for some containers
fc29026 tests/docker: move DEF_TARGET_LIST setting to common.rc
56cd636 tests/tcg: add .gitignore for in source builds
3bad540 tests/tcg: move configuration to a sub-shell script
5f89352 tests/tcg: cleanup Makefile inclusions
e9af276 tests/tcg: use EXTRA_CFLAGS everywhere
dac6b94 tests/docker: fix "cc" command to work with podman
eefeff4 configure: clean-up container cross compile detect
1cd7a8b hw/misc: Mark most objects as "common" code to speed up compilation a litte bit

=== OUTPUT BEGIN ===
1/42 Checking commit 1cd7a8bf605d (hw/misc: Mark most objects as "common" code to speed up compilation a litte bit)
2/42 Checking commit eefeff4f57f7 (configure: clean-up container cross compile detect)
3/42 Checking commit dac6b9434eb1 (tests/docker: fix "cc" command to work with podman)
4/42 Checking commit e9af276e922a (tests/tcg: use EXTRA_CFLAGS everywhere)
5/42 Checking commit 5f89352ea324 (tests/tcg: cleanup Makefile inclusions)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#84: 
rename from tests/tcg/Makefile.probe

total: 0 errors, 1 warnings, 341 lines checked

Patch 5/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/42 Checking commit 3bad54027509 (tests/tcg: move configuration to a sub-shell script)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#706: 
deleted file mode 100644

WARNING: line over 80 characters
#920: FILE: tests/tcg/configure.sh:174:
+      container_cross_cc=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc

WARNING: line over 80 characters
#926: FILE: tests/tcg/configure.sh:180:
+  echo "# Automatically generated by configure - do not modify" > $config_target_mak

ERROR: line over 90 characters
#953: FILE: tests/tcg/configure.sh:207:
+    if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then

WARNING: line over 80 characters
#955: FILE: tests/tcg/configure.sh:209:
+      if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then

WARNING: line over 80 characters
#968: FILE: tests/tcg/configure.sh:222:
+  if test $got_cross_cc = no && test "$docker" != no && test -n "$container_image"; then

total: 1 errors, 5 warnings, 863 lines checked

Patch 6/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/42 Checking commit 56cd636ccbbb (tests/tcg: add .gitignore for in source builds)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#14: 
new file mode 100644

total: 0 errors, 1 warnings, 5 lines checked

Patch 7/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/42 Checking commit fc29026cb47e (tests/docker: move DEF_TARGET_LIST setting to common.rc)
9/42 Checking commit 102d04a5c59a (tests/docker: set DEF_TARGET_LIST for some containers)
10/42 Checking commit 388f70343172 (tests/docker: add Buster to DOCKER_PARTIAL_IMAGES)
11/42 Checking commit b92b82082115 (tests/docker: move our arm64 cross compile to Buster)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#57: 
deleted file mode 100644

total: 0 errors, 1 warnings, 40 lines checked

Patch 11/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
12/42 Checking commit ca3a13e95f3c (tests/docker: move our powerpc cross compile to Buster)
13/42 Checking commit 0e725a419d31 (tests/docker: move our Alpha cross compile to Buster)
14/42 Checking commit 654bcae3bead (tests/docker: move our HPPA cross compile to Buster)
15/42 Checking commit 1c3befa14744 (tests/docker: move our m68k cross compile to Buster)
16/42 Checking commit dbcdf486beab (tests/docker: move our sparc64 cross compile to Buster)
17/42 Checking commit 2e0520300fdf (tests/docker: move our sh4 cross compile to Buster)
18/42 Checking commit a60a7b9d64be (tests/docker: move our mips64 cross compile to Buster)
19/42 Checking commit f898a09c7fc6 (tests/docker: move our riscv64 cross compile to Buster)
20/42 Checking commit 9f2f21c480e7 (tests/docker: move our ppc64 cross compile to Buster)
21/42 Checking commit 213eeb6def1e (tests/docker: drop debian-sid image)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28: 
deleted file mode 100644

total: 0 errors, 1 warnings, 8 lines checked

Patch 21/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
22/42 Checking commit c465faafdef8 (tests/docker: drop powerpc-user image for QEMU cross builds)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
deleted file mode 100644

total: 0 errors, 1 warnings, 14 lines checked

Patch 22/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
23/42 Checking commit 324696f9c362 (tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES)
24/42 Checking commit 3d28ab1cff6e (tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES)
25/42 Checking commit 2a70b8df701a (tests/docker: avoid $SHELL invoke bash directly)
26/42 Checking commit 01344502cbaa (tests/docker: add debian-amd64-cross for non-x86 hosts)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#32: 
new file mode 100644

total: 0 errors, 1 warnings, 35 lines checked

Patch 26/42 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
27/42 Checking commit 5cc1f1fd5605 (tests/docker: use --arch-only for installing deps)
28/42 Checking commit 08b9a3310119 (tests/docker: add more images to PARTIAL_IMAGES when not on x86_64)
29/42 Checking commit cc73e576887a (configure: check if --no-pie is supported first)
30/42 Checking commit 0b7ee1a3bfea (.travis.yml: Enable multiple caching features)
31/42 Checking commit 083336916ba0 (.travis.yml: Increase cache timeout from 3min to 20min)
32/42 Checking commit f16c75bc40ac (.travis.yml: Cache Python PIP packages)
33/42 Checking commit aff75d22d044 (.travis.yml: Cache Avocado cache)
34/42 Checking commit 5ffee09da795 (.travis.yml: Improve ccache use)
35/42 Checking commit a655c67011d0 (.travis.yml: Enable ccache on OSX)
36/42 Checking commit b88f2bb3bd9b (.travis.yml: Document how the build matrix use caches)
37/42 Checking commit eb3387cf994d (.travis.yml: Cache Linux/GCC 'debug profile' jobs together)
38/42 Checking commit 5e27a63aee94 (.travis.yml: Cache Linux/GCC 'non-debug profile' jobs together)
39/42 Checking commit 942403a1ad9c (.travis.yml: Cache Linux/Clang jobs together)
40/42 Checking commit c3ee1aec4faf (Fedora images: use URLs from stable "archives.fedoraproject.org")
41/42 Checking commit 5b2ad81bb4a1 (tests/docker: --disable-libssh on ubuntu1804 builds)
42/42 Checking commit 0fbbd2b57dd7 (tests/docker: don't always encoding for subprocess.check_output)
=== OUTPUT END ===

Test command exited with code: 1


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

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

* Re: [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman Alex Bennée
@ 2019-09-04 23:31   ` John Snow
  2019-09-05  9:51     ` Alex Bennée
  0 siblings, 1 reply; 74+ messages in thread
From: John Snow @ 2019-09-04 23:31 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	pbonzini, marcandre.lureau, Philippe Mathieu-Daudé,
	aurelien



On 9/4/19 4:29 PM, Alex Bennée wrote:
> Podman requires a little bit of additional magic to the uid mapping
> which was already done for the normal RunCommand. We simplify the
> logic by pushing it directly into the Docker::run method to avoid
> instantiating an extra Docker() object and ensure the CC command
> always runs as the current user.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/docker.py     | 30 +++++++++++++++---------------
>  tests/tcg/Makefile.include |  2 +-
>  2 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index e23209f71ee..8f391eb278b 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -318,10 +318,20 @@ class Docker(object):
>              return False
>          return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
>  
> -    def run(self, cmd, keep, quiet):
> +    def run(self, cmd, keep, quiet, as_user=False):
>          label = uuid.uuid1().hex
>          if not keep:
>              self._instances.append(label)
> +
> +        if as_user:
> +            uid = os.getuid()
> +            cmd = [ "-u", str(uid) ] + cmd
> +            # podman requires a bit more fiddling
> +            if self._command[0] == "podman":
> +                cmd = [ "--uidmap", "%d:0:1" % uid,
> +                        "--uidmap", "0:1:%d" % uid,
> +                        "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + cmd
> +

I was having problems with constructs like these recently. I think we
either need to use --userns=keep-id (vastly preferred) or adjust 64536
there to read as "65536 - uid" because not everyone will have a UID of 1000.

(My UID is over 20,000 and for whatever reason, this causes podman to
crash very badly when using this hackaround.)

>          ret = self._do_check(["run", "--label",
>                               "com.qemu.instance.uuid=" + label] + cmd,
>                               quiet=quiet)
> @@ -364,15 +374,8 @@ class RunCommand(SubCommand):
>                              help="Run container using the current user's uid")
>  
>      def run(self, args, argv):
> -        if args.run_as_current_user:
> -            uid = os.getuid()
> -            argv = [ "-u", str(uid) ] + argv
> -            docker = Docker()
> -            if docker._command[0] == "podman":
> -                argv = [ "--uidmap", "%d:0:1" % uid,
> -                         "--uidmap", "0:1:%d" % uid,
> -                         "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
> -        return Docker().run(argv, args.keep, quiet=args.quiet)
> +        return Docker().run(argv, args.keep, quiet=args.quiet,
> +                            as_user=args.run_as_current_user)
>  
>  
>  class BuildCommand(SubCommand):
> @@ -556,8 +559,6 @@ class CcCommand(SubCommand):
>                              help="The docker image in which to run cc")
>          parser.add_argument("--cc", default="cc",
>                              help="The compiler executable to call")
> -        parser.add_argument("--user",
> -                            help="The user-id to run under")
>          parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
>                              help="""Extra paths to (ro) mount into container for
>                              reading sources""")
> @@ -571,11 +572,10 @@ class CcCommand(SubCommand):
>          if args.paths:
>              for p in args.paths:
>                  cmd += ["-v", "%s:%s:ro,z" % (p, p)]
> -        if args.user:
> -            cmd += ["-u", args.user]
>          cmd += [args.image, args.cc]
>          cmd += argv
> -        return Docker().command("run", cmd, args.quiet)
> +        return Docker().run(cmd, False, quiet=args.quiet,
> +                            as_user=True)
>  
>  
>  class CheckCommand(SubCommand):
> diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
> index 73b5626fc5f..210f8428237 100644
> --- a/tests/tcg/Makefile.include
> +++ b/tests/tcg/Makefile.include
> @@ -41,7 +41,7 @@ ifneq ($(DOCKER_IMAGE),)
>  # We also need the Docker make rules to depend on
>  include $(SRC_PATH)/tests/docker/Makefile.include
>  
> -DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
> +DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
>  		--cc $(DOCKER_CROSS_COMPILER) \
>  		-i qemu:$(DOCKER_IMAGE) \
>  		-s $(SRC_PATH) -- "
> 

-- 
—js


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

* Re: [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman
  2019-09-04 23:31   ` John Snow
@ 2019-09-05  9:51     ` Alex Bennée
  2019-09-05 17:18       ` John Snow
  0 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-05  9:51 UTC (permalink / raw)
  To: John Snow
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, qemu-devel,
	cota, stefanha, pbonzini, marcandre.lureau,
	Philippe Mathieu-Daudé,
	aurelien


John Snow <jsnow@redhat.com> writes:

> On 9/4/19 4:29 PM, Alex Bennée wrote:
>> Podman requires a little bit of additional magic to the uid mapping
>> which was already done for the normal RunCommand. We simplify the
>> logic by pushing it directly into the Docker::run method to avoid
>> instantiating an extra Docker() object and ensure the CC command
>> always runs as the current user.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/docker/docker.py     | 30 +++++++++++++++---------------
>>  tests/tcg/Makefile.include |  2 +-
>>  2 files changed, 16 insertions(+), 16 deletions(-)
>>
>> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>> index e23209f71ee..8f391eb278b 100755
>> --- a/tests/docker/docker.py
>> +++ b/tests/docker/docker.py
>> @@ -318,10 +318,20 @@ class Docker(object):
>>              return False
>>          return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
>>
>> -    def run(self, cmd, keep, quiet):
>> +    def run(self, cmd, keep, quiet, as_user=False):
>>          label = uuid.uuid1().hex
>>          if not keep:
>>              self._instances.append(label)
>> +
>> +        if as_user:
>> +            uid = os.getuid()
>> +            cmd = [ "-u", str(uid) ] + cmd
>> +            # podman requires a bit more fiddling
>> +            if self._command[0] == "podman":
>> +                cmd = [ "--uidmap", "%d:0:1" % uid,
>> +                        "--uidmap", "0:1:%d" % uid,
>> +                        "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + cmd
>> +
>
> I was having problems with constructs like these recently. I think we
> either need to use --userns=keep-id (vastly preferred) or adjust 64536
> there to read as "65536 - uid" because not everyone will have a UID of
> 1000.

From Marc-André's original commit:

  With a user 1000, the default mapping is: 1000 (host) -> 0 (container).

  So write access to /var/tmp/ccache ends will end with permission
  denied error.

  With "--uidmap 1000:0:1 --uidmap 0:1:1000", the mapping is:
  1000 (host) -> 0 (container, 1st namespace) -> 1000 (container, 2nd namespace).
  (the rest is mumbo jumbo to avoid holes in the range of UIDs)

  A future podman version may have an option such as --userns-keep-uid.
  Thanks to Debarshi Ray <rishi@redhat.com> for the help!

So I assumed this doesn't exist for all versions of podman yet. Given
how new the support is I guess we could just say you need a minimum
version for working podman support.

>
> (My UID is over 20,000 and for whatever reason, this causes podman to
> crash very badly when using this hackaround.)
>
>>          ret = self._do_check(["run", "--label",
>>                               "com.qemu.instance.uuid=" + label] + cmd,
>>                               quiet=quiet)
>> @@ -364,15 +374,8 @@ class RunCommand(SubCommand):
>>                              help="Run container using the current user's uid")
>>
>>      def run(self, args, argv):
>> -        if args.run_as_current_user:
>> -            uid = os.getuid()
>> -            argv = [ "-u", str(uid) ] + argv
>> -            docker = Docker()
>> -            if docker._command[0] == "podman":
>> -                argv = [ "--uidmap", "%d:0:1" % uid,
>> -                         "--uidmap", "0:1:%d" % uid,
>> -                         "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + argv
>> -        return Docker().run(argv, args.keep, quiet=args.quiet)
>> +        return Docker().run(argv, args.keep, quiet=args.quiet,
>> +                            as_user=args.run_as_current_user)
>>
>>
>>  class BuildCommand(SubCommand):
>> @@ -556,8 +559,6 @@ class CcCommand(SubCommand):
>>                              help="The docker image in which to run cc")
>>          parser.add_argument("--cc", default="cc",
>>                              help="The compiler executable to call")
>> -        parser.add_argument("--user",
>> -                            help="The user-id to run under")
>>          parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
>>                              help="""Extra paths to (ro) mount into container for
>>                              reading sources""")
>> @@ -571,11 +572,10 @@ class CcCommand(SubCommand):
>>          if args.paths:
>>              for p in args.paths:
>>                  cmd += ["-v", "%s:%s:ro,z" % (p, p)]
>> -        if args.user:
>> -            cmd += ["-u", args.user]
>>          cmd += [args.image, args.cc]
>>          cmd += argv
>> -        return Docker().command("run", cmd, args.quiet)
>> +        return Docker().run(cmd, False, quiet=args.quiet,
>> +                            as_user=True)
>>
>>
>>  class CheckCommand(SubCommand):
>> diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
>> index 73b5626fc5f..210f8428237 100644
>> --- a/tests/tcg/Makefile.include
>> +++ b/tests/tcg/Makefile.include
>> @@ -41,7 +41,7 @@ ifneq ($(DOCKER_IMAGE),)
>>  # We also need the Docker make rules to depend on
>>  include $(SRC_PATH)/tests/docker/Makefile.include
>>
>> -DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
>> +DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc \
>>  		--cc $(DOCKER_CROSS_COMPILER) \
>>  		-i qemu:$(DOCKER_IMAGE) \
>>  		-s $(SRC_PATH) -- "
>>


--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script Alex Bennée
@ 2019-09-05 10:29   ` Alex Bennée
  0 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-05 10:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, Philippe Mathieu-Daudé,
	richard.henderson, f4bug, cota, stefanha, marcandre.lureau,
	pbonzini, aurelien


Alex Bennée <alex.bennee@linaro.org> writes:

> From: Paolo Bonzini <pbonzini@redhat.com>
>
> Avoid the repeated inclusions of config-target.mak, which have
> risks of namespace pollution, and instead build minimal configuration
> files in a configuration script.  The same configuration files can
> also be included in Makefile and Makefile.qemu
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-Id: <20190807143523.15917-4-pbonzini@redhat.com>
> [AJB: s/docker/container/, rm last bits from configure]
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
<snip>
> +
> +  if test $got_cross_cc = no && test "$docker" != no && test -n
> "$container_image"; then

Oops, missed one. This is causing the breakage in the last GitLab CI
test.

--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds Alex Bennée
@ 2019-09-05 10:32   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:32 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:30 PM, Alex Bennée wrote:
> Currently this stops the mega:
> 
>   make docker-test-build
> 
> from working. Once the source is patched to deal with the case this
> workaround can be removed.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/dockerfiles/ubuntu1804.docker | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker
> index 44bbf0f77ae..883f9bcf31c 100644
> --- a/tests/docker/dockerfiles/ubuntu1804.docker
> +++ b/tests/docker/dockerfiles/ubuntu1804.docker
> @@ -56,3 +56,6 @@ RUN apt-get update && \
>      DEBIAN_FRONTEND=noninteractive apt-get -y install $PACKAGES
>  RUN dpkg -l $PACKAGES | sort > /packages.txt
>  ENV FEATURES clang pyyaml sdl2
> +
> +# https://bugs.launchpad.net/qemu/+bug/1838763
> +ENV QEMU_CONFIGURE_OPTS --disable-libssh
> 

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


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

* Re: [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org"
  2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org" Alex Bennée
@ 2019-09-05 10:33   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:33 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, Yash Mankad, berrange, stefanb, Cleber Rosa,
	richard.henderson, f4bug, cota, stefanha, marcandre.lureau,
	pbonzini, aurelien

On 9/4/19 10:30 PM, Alex Bennée wrote:
> From: Cleber Rosa <crosa@redhat.com>
> 
> The LinuxInitrd.test_with_2gib_file_should_work_with_linux_v4_16 test,
> from tests/acceptance/linux_initrd.py, is currently failing to fetch
> the "vmlinuz" file.  The reason for the failure is that the Fedora
> project retires older versions from the "dl.fedoraproject.org" URL,
> and keeps them in "archives.fedoraproject.org".  As an added note,
> that test uses a Fedora 28 image, because of the specific Linux kernel
> version requirements of the test.
> 
> For the sake of stability, let's use URLs from the archived and
> supposedely ever stable URLs.  The good news is that the currently
> supported versions are also hosted on the later.  This change limits
> itself to change the URLs, while keeping the fetched files the same
> (as can be evidenced by the unchanged hashes).
> 
> Documentation and the "vm tests" fedora definition were also updated.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> Reviewed-by: Yash Mankad <ymankad@redhat.com>
> Message-Id: <20190904005218.12536-1-crosa@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

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


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

* Re: [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES Alex Bennée
@ 2019-09-05 10:34   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:34 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> We need to add additional packages to the base images to be able to
> build QEMU so lets avoid building with it.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/Makefile.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index cf535cbd196..89881fb5f5d 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
>  DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
>  DOCKER_DEPRECATED_IMAGES := debian
>  # we don't run tests on intermediate images (used as base by another image)
> -DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap
> +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-sid debian-bootstrap
>  DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
>  DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
>  # Use a global constant ccache directory to speed up repetitive builds
> 

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


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

* Re: [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster Alex Bennée
@ 2019-09-05 10:35   ` Philippe Mathieu-Daudé
  2019-09-07 11:26     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:35 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can unify our cross build images for both
> QEMU and tests.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/Makefile.include                    |  5 ++---
>  .../docker/dockerfiles/debian-arm64-cross.docker |  4 ++--
>  .../dockerfiles/debian-buster-arm64-cross.docker | 16 ----------------
>  tests/tcg/configure.sh                           |  2 +-
>  4 files changed, 5 insertions(+), 22 deletions(-)
>  delete mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 89881fb5f5d..48c22ae40c0 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -86,13 +86,10 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
>  endif
>  
>  # Enforce dependencies for composite images
> -docker-image-debian: docker-image-debian9
>  docker-image-debian9-mxe: docker-image-debian9
>  docker-image-debian-amd64: docker-image-debian9
>  docker-image-debian-armel-cross: docker-image-debian9
>  docker-image-debian-armhf-cross: docker-image-debian9
> -docker-image-debian-arm64-cross: docker-image-debian9
> -docker-image-debian-buster-arm64-cross: docker-image-debian10
>  docker-image-debian-mips-cross: docker-image-debian9
>  docker-image-debian-mipsel-cross: docker-image-debian9
>  docker-image-debian-mips64el-cross: docker-image-debian9
> @@ -101,6 +98,8 @@ docker-image-debian-s390x-cross: docker-image-debian9
>  docker-image-debian-win32-cross: docker-image-debian9-mxe
>  docker-image-debian-win64-cross: docker-image-debian9-mxe
>  
> +docker-image-debian-arm64-cross: docker-image-debian10
> +
>  docker-image-debian-alpha-cross: docker-image-debian-sid
>  docker-image-debian-hppa-cross: docker-image-debian-sid
>  docker-image-debian-m68k-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
> index 6b59ef0843a..55045ff5d5a 100644
> --- a/tests/docker/dockerfiles/debian-arm64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
> @@ -1,9 +1,9 @@
>  #
>  # Docker arm64 cross-compiler target
>  #
> -# This docker target builds on the debian Stretch base image.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian9
> +FROM qemu:debian10
>  
>  # Add the foreign architecture we want and install dependencies
>  RUN dpkg --add-architecture arm64
> diff --git a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker b/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
> deleted file mode 100644
> index 52787edcc2c..00000000000
> --- a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -#
> -# Docker arm64 cross-compiler target
> -#
> -# This docker target builds on the Debian's Buster base image. There
> -# are no QEMU pre-requistes so this image can only be used to build
> -# test cases.
> -#
> -FROM qemu:debian10
> -
> -# Add the foreign architecture we want and install dependencies
> -RUN dpkg --add-architecture arm64
> -RUN apt update && \
> -    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
> -    DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt-get install -y --no-install-recommends \
> -        crossbuild-essential-arm64
> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
> index 5f794b664b8..2a351a00048 100755
> --- a/tests/tcg/configure.sh
> +++ b/tests/tcg/configure.sh
> @@ -95,7 +95,7 @@ for target in $target_list; do
>    case $target in
>      aarch64-*)
>        # We don't have any bigendian build tools so we only use this for AArch64
> -      container_image=debian-buster-arm64-cross
> +      container_image=debian-arm64-cross
>        container_cross_cc=aarch64-linux-gnu-gcc
>        ;;
>      alpha-*)
> 

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


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

* Re: [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe " Alex Bennée
@ 2019-09-05 10:36   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:36 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Another image that can't be used directly to build QEMU.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/Makefile.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 8d7f9376578..2c8cb790ad0 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
>  DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
>  DOCKER_DEPRECATED_IMAGES := debian
>  # we don't run tests on intermediate images (used as base by another image)
> -DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-bootstrap
> +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian9-mxe debian-ports debian-bootstrap
>  DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
>  DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
>  # Use a global constant ccache directory to speed up repetitive builds
> 

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


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

* Re: [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly Alex Bennée
@ 2019-09-05 10:40   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-05 10:40 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> On some images SHELL is pointing at a limited /bin/sh which doesn't
> understand noprofile/norc. Given the run script is running bash just
> invoke it directly.
> 

This fixes:

  $ make docker-test-build@IMAGE DEBUG=1
  [...]
  + echo '  ./test-build'
  ./test-build
  + echo '* Hit Ctrl-D to continue, or type '\''exit 1'\'' to abort'
  * Hit Ctrl-D to continue, or type 'exit 1' to abort
  + echo
  + /bin/sh --noprofile --norc
  /bin/sh: 0: Illegal option --

Fixes: 2b0c4fa13f3

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/docker/run | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/docker/run b/tests/docker/run
> index 1014871fec0..8edc7026ee3 100755
> --- a/tests/docker/run
> +++ b/tests/docker/run
> @@ -62,7 +62,7 @@ echo "* Prepared to run command:"
>  echo "  $CMD"
>  echo "* Hit Ctrl-D to continue, or type 'exit 1' to abort"
>  echo
> -$SHELL --noprofile --norc
> +env bash --noprofile --norc
>  
>  if "$CMD"; then
>      exit 0
> @@ -72,7 +72,7 @@ elif test -n "$DEBUG"; then
>      echo "* Hit Ctrl-D to exit"
>      echo
>      # Force error after shell exits
> -    $SHELL --noprofile --norc && exit 1
> +    env bash --noprofile --norc && exit 1
>  else
>      exit 1
>  fi
> 


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

* Re: [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman
  2019-09-05  9:51     ` Alex Bennée
@ 2019-09-05 17:18       ` John Snow
  0 siblings, 0 replies; 74+ messages in thread
From: John Snow @ 2019-09-05 17:18 UTC (permalink / raw)
  To: Alex Bennée
  Cc: fam, berrange, stefanb, Matt Heon, richard.henderson, f4bug,
	qemu-devel, cota, stefanha, pbonzini, marcandre.lureau,
	Philippe Mathieu-Daudé,
	aurelien



On 9/5/19 5:51 AM, Alex Bennée wrote:
> 
> John Snow <jsnow@redhat.com> writes:
> 
>> On 9/4/19 4:29 PM, Alex Bennée wrote:
>>> Podman requires a little bit of additional magic to the uid mapping
>>> which was already done for the normal RunCommand. We simplify the
>>> logic by pushing it directly into the Docker::run method to avoid
>>> instantiating an extra Docker() object and ensure the CC command
>>> always runs as the current user.
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>>  tests/docker/docker.py     | 30 +++++++++++++++---------------
>>>  tests/tcg/Makefile.include |  2 +-
>>>  2 files changed, 16 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>>> index e23209f71ee..8f391eb278b 100755
>>> --- a/tests/docker/docker.py
>>> +++ b/tests/docker/docker.py
>>> @@ -318,10 +318,20 @@ class Docker(object):
>>>              return False
>>>          return checksum == _text_checksum(_dockerfile_preprocess(dockerfile))
>>>
>>> -    def run(self, cmd, keep, quiet):
>>> +    def run(self, cmd, keep, quiet, as_user=False):
>>>          label = uuid.uuid1().hex
>>>          if not keep:
>>>              self._instances.append(label)
>>> +
>>> +        if as_user:
>>> +            uid = os.getuid()
>>> +            cmd = [ "-u", str(uid) ] + cmd
>>> +            # podman requires a bit more fiddling
>>> +            if self._command[0] == "podman":
>>> +                cmd = [ "--uidmap", "%d:0:1" % uid,
>>> +                        "--uidmap", "0:1:%d" % uid,
>>> +                        "--uidmap", "%d:%d:64536" % (uid + 1, uid + 1)] + cmd
>>> +
>>
>> I was having problems with constructs like these recently. I think we
>> either need to use --userns=keep-id (vastly preferred) or adjust 64536
>> there to read as "65536 - uid" because not everyone will have a UID of
>> 1000.
> 
> From Marc-André's original commit:
> 
>   With a user 1000, the default mapping is: 1000 (host) -> 0 (container).
> 
>   So write access to /var/tmp/ccache ends will end with permission
>   denied error.
> 
>   With "--uidmap 1000:0:1 --uidmap 0:1:1000", the mapping is:
>   1000 (host) -> 0 (container, 1st namespace) -> 1000 (container, 2nd namespace).
>   (the rest is mumbo jumbo to avoid holes in the range of UIDs)
> 
>   A future podman version may have an option such as --userns-keep-uid.
>   Thanks to Debarshi Ray <rishi@redhat.com> for the help!
> 
> So I assumed this doesn't exist for all versions of podman yet. Given
> how new the support is I guess we could just say you need a minimum
> version for working podman support.
> 

I think that's probably fine to say. Matt Heon says that 1.4.x should be
available in RHEL7 and RHEL8 both, and it's available in Fedora 30, so
it should be reasonably well represented on modern development machines.

It's also entirely optional as you may continue using docker if you wish.

Thanks for staging the patch to fix this; I'll try to test it out in
conjunction with your patchset here later when time permits.

--js


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

* Re: [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect Alex Bennée
@ 2019-09-05 17:53   ` David Hildenbrand
  2019-09-05 18:35     ` Alex Bennée
  0 siblings, 1 reply; 74+ messages in thread
From: David Hildenbrand @ 2019-09-05 17:53 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	pbonzini, marcandre.lureau, Philippe Mathieu-Daudé,
	aurelien

On 04.09.19 22:29, Alex Bennée wrote:
> The introduction of podman support inadvertently broke configure's
> detect of the container support as the configure probe didn't specify
> an engine type. To fix this in docker.py:
> 
>   - only (re)set USE_ENGINE if --engine is specified
>   - enhance the output so docker is no longer just yes
> 
> In the configure script we can at least start cleaning up the
> detecting and naming of variables. To avoid too much churn the
> conversion of the various make DOCKER_foo variables has been left for
> future clean-ups.

This is not only a "clean-up" but an actual fix :) (maybe add a Fixes: tag).

This makes it work again for me.

t460s: ~/git/qemu mvc $ tests/docker/docker.py probe
docker

Thanks!

> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure              | 10 +++++-----
>  tests/docker/docker.py |  7 ++++---
>  2 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/configure b/configure
> index 95134c0180b..94845fc5101 100755
> --- a/configure
> +++ b/configure
> @@ -495,7 +495,7 @@ qed="yes"
>  parallels="yes"
>  sheepdog="yes"
>  libxml2=""
> -docker="no"
> +container="no"
>  debug_mutex="no"
>  libpmem=""
>  default_devices="yes"
> @@ -5894,14 +5894,14 @@ EOF
>  fi
>  
>  ##########################################
> -# Docker and cross-compiler support
> +# Container based cross-compiler support
>  #
>  # This is specifically for building test
>  # cases for foreign architectures, not
>  # cross-compiling QEMU itself.
>  
> -if has "docker"; then
> -    docker=$($python $source_path/tests/docker/docker.py probe)
> +if has "docker" || has "podman"; then
> +    container=$($python $source_path/tests/docker/docker.py probe)
>  fi
>  
>  ##########################################
> @@ -6474,7 +6474,7 @@ echo "qed support       $qed"
>  echo "parallels support $parallels"
>  echo "sheepdog support  $sheepdog"
>  echo "capstone          $capstone"
> -echo "docker            $docker"
> +echo "container support $container"
>  echo "libpmem support   $libpmem"
>  echo "libudev           $libudev"
>  echo "default devices   $default_devices"
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 4bba29e104e..e23209f71ee 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -536,9 +536,9 @@ class ProbeCommand(SubCommand):
>          try:
>              docker = Docker()
>              if docker._command[0] == "docker":
> -                print("yes")
> +                print("docker")
>              elif docker._command[0] == "sudo":
> -                print("sudo")
> +                print("sudo docker")
>              elif docker._command[0] == "podman":
>                  print("podman")
>          except Exception:
> @@ -651,7 +651,8 @@ def main():
>          cmd.args(subp)
>          subp.set_defaults(cmdobj=cmd)
>      args, argv = parser.parse_known_args()
> -    USE_ENGINE = args.engine
> +    if args.engine:
> +        USE_ENGINE = args.engine
>      return args.cmdobj.run(args, argv)
>  
>  
> 


-- 

Thanks,

David / dhildenb


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

* Re: [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect
  2019-09-05 17:53   ` David Hildenbrand
@ 2019-09-05 18:35     ` Alex Bennée
  2019-09-05 18:37       ` David Hildenbrand
  0 siblings, 1 reply; 74+ messages in thread
From: Alex Bennée @ 2019-09-05 18:35 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, qemu-devel,
	cota, stefanha, pbonzini, marcandre.lureau,
	Philippe Mathieu-Daudé,
	aurelien


David Hildenbrand <david@redhat.com> writes:

> On 04.09.19 22:29, Alex Bennée wrote:
>> The introduction of podman support inadvertently broke configure's
>> detect of the container support as the configure probe didn't specify
>> an engine type. To fix this in docker.py:
>>
>>   - only (re)set USE_ENGINE if --engine is specified
>>   - enhance the output so docker is no longer just yes
>>
>> In the configure script we can at least start cleaning up the
>> detecting and naming of variables. To avoid too much churn the
>> conversion of the various make DOCKER_foo variables has been left for
>> future clean-ups.
>
> This is not only a "clean-up" but an actual fix :) (maybe add a Fixes:
> tag).

Done... do I get a Tested-by: ?

>
> This makes it work again for me.
>
> t460s: ~/git/qemu mvc $ tests/docker/docker.py probe
> docker
>
> Thanks!
>
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  configure              | 10 +++++-----
>>  tests/docker/docker.py |  7 ++++---
>>  2 files changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 95134c0180b..94845fc5101 100755
>> --- a/configure
>> +++ b/configure
>> @@ -495,7 +495,7 @@ qed="yes"
>>  parallels="yes"
>>  sheepdog="yes"
>>  libxml2=""
>> -docker="no"
>> +container="no"
>>  debug_mutex="no"
>>  libpmem=""
>>  default_devices="yes"
>> @@ -5894,14 +5894,14 @@ EOF
>>  fi
>>
>>  ##########################################
>> -# Docker and cross-compiler support
>> +# Container based cross-compiler support
>>  #
>>  # This is specifically for building test
>>  # cases for foreign architectures, not
>>  # cross-compiling QEMU itself.
>>
>> -if has "docker"; then
>> -    docker=$($python $source_path/tests/docker/docker.py probe)
>> +if has "docker" || has "podman"; then
>> +    container=$($python $source_path/tests/docker/docker.py probe)
>>  fi
>>
>>  ##########################################
>> @@ -6474,7 +6474,7 @@ echo "qed support       $qed"
>>  echo "parallels support $parallels"
>>  echo "sheepdog support  $sheepdog"
>>  echo "capstone          $capstone"
>> -echo "docker            $docker"
>> +echo "container support $container"
>>  echo "libpmem support   $libpmem"
>>  echo "libudev           $libudev"
>>  echo "default devices   $default_devices"
>> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
>> index 4bba29e104e..e23209f71ee 100755
>> --- a/tests/docker/docker.py
>> +++ b/tests/docker/docker.py
>> @@ -536,9 +536,9 @@ class ProbeCommand(SubCommand):
>>          try:
>>              docker = Docker()
>>              if docker._command[0] == "docker":
>> -                print("yes")
>> +                print("docker")
>>              elif docker._command[0] == "sudo":
>> -                print("sudo")
>> +                print("sudo docker")
>>              elif docker._command[0] == "podman":
>>                  print("podman")
>>          except Exception:
>> @@ -651,7 +651,8 @@ def main():
>>          cmd.args(subp)
>>          subp.set_defaults(cmdobj=cmd)
>>      args, argv = parser.parse_known_args()
>> -    USE_ENGINE = args.engine
>> +    if args.engine:
>> +        USE_ENGINE = args.engine
>>      return args.cmdobj.run(args, argv)
>>
>>
>>


--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect
  2019-09-05 18:35     ` Alex Bennée
@ 2019-09-05 18:37       ` David Hildenbrand
  0 siblings, 0 replies; 74+ messages in thread
From: David Hildenbrand @ 2019-09-05 18:37 UTC (permalink / raw)
  To: Alex Bennée
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, qemu-devel,
	cota, stefanha, pbonzini, marcandre.lureau,
	Philippe Mathieu-Daudé,
	aurelien

On 05.09.19 20:35, Alex Bennée wrote:
> 
> David Hildenbrand <david@redhat.com> writes:
> 
>> On 04.09.19 22:29, Alex Bennée wrote:
>>> The introduction of podman support inadvertently broke configure's
>>> detect of the container support as the configure probe didn't specify
>>> an engine type. To fix this in docker.py:
>>>
>>>   - only (re)set USE_ENGINE if --engine is specified
>>>   - enhance the output so docker is no longer just yes
>>>
>>> In the configure script we can at least start cleaning up the
>>> detecting and naming of variables. To avoid too much churn the
>>> conversion of the various make DOCKER_foo variables has been left for
>>> future clean-ups.
>>
>> This is not only a "clean-up" but an actual fix :) (maybe add a Fixes:
>> tag).
> 
> Done... do I get a Tested-by: ?

Most certainly, you saved me quite some time today:

Tested-by: David Hildenbrand <david@redhat.com>

Thanks!

-- 

Thanks,

David / dhildenb


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

* Re: [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci)
  2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
                   ` (42 preceding siblings ...)
  2019-09-04 22:16 ` [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) no-reply
@ 2019-09-06 10:20 ` Alex Bennée
  43 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-06 10:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien


Alex Bennée <alex.bennee@linaro.org> writes:

> Hi All,
>
<snip>
>
> Please review ;-)

The following still need review:

unreviewed - 3bf0fc78ddf - Alex Bennée: configure: check if --no-pie is supported first
unreviewed - 91debbbd08e - Alex Bennée: tests/docker: add more images to PARTIAL_IMAGES when not on x86_64
unreviewed - aea7785222a - Alex Bennée: tests/docker: use --arch-only for installing deps
unreviewed - 01c19df4c75 - Alex Bennée: tests/docker: add debian-amd64-cross for non-x86 hosts
unreviewed - ba90db8ad06 - Alex Bennée: tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
unreviewed - 0929a7cb881 - Alex Bennée: tests/docker: drop powerpc-user image for QEMU cross builds
unreviewed - cf2bf8f11b2 - Alex Bennée: tests/docker: drop debian-sid image
unreviewed - 160f58adec6 - Alex Bennée: tests/docker: move our ppc64 cross compile to Buster
unreviewed - a94f07dff2f - Alex Bennée: tests/docker: move our riscv64 cross compile to Buster
unreviewed - 174ab0f54ab - Alex Bennée: tests/docker: move our mips64 cross compile to Buster
unreviewed - a7bd356187e - Alex Bennée: tests/docker: move our sh4 cross compile to Buster
unreviewed - 6747f17e0fb - Alex Bennée: tests/docker: move our sparc64 cross compile to Buster
unreviewed - 1e220361d95 - Alex Bennée: tests/docker: move our m68k cross compile to Buster
unreviewed - 437dafd4044 - Alex Bennée: tests/docker: move our HPPA cross compile to Buster
unreviewed - a846639d89d - Alex Bennée: tests/docker: move our Alpha cross compile to Buster
unreviewed - 6dd1c889393 - Alex Bennée: tests/docker: move our powerpc cross compile to Buster
unreviewed - 3373c3eb84e - Alex Bennée: tests/docker: set DEF_TARGET_LIST for some containers
unreviewed - d14f1b84dc3 - Alex Bennée: tests/tcg: add .gitignore for in source builds
unreviewed - 659b98caba3 - Alex Bennée: tests/docker: handle missing encoding keyword for subprocess.check_output
unreviewed - 450795acac1 - Alex Bennée: tests/docker: fix "cc" command to work with podman
unreviewed - 131dc565937 - Alex Bennée: configure: clean-up container cross compile detect


>
> Alex Bennée (27):
>   configure: clean-up container cross compile detect
>   tests/docker: fix "cc" command to work with podman
>   tests/tcg: add .gitignore for in source builds
>   tests/docker: move DEF_TARGET_LIST setting to common.rc
>   tests/docker: set DEF_TARGET_LIST for some containers
>   tests/docker: add Buster to DOCKER_PARTIAL_IMAGES
>   tests/docker: move our arm64 cross compile to Buster
>   tests/docker: move our powerpc cross compile to Buster
>   tests/docker: move our Alpha cross compile to Buster
>   tests/docker: move our HPPA cross compile to Buster
>   tests/docker: move our m68k cross compile to Buster
>   tests/docker: move our sparc64 cross compile to Buster
>   tests/docker: move our sh4 cross compile to Buster
>   tests/docker: move our mips64 cross compile to Buster
>   tests/docker: move our riscv64 cross compile to Buster
>   tests/docker: move our ppc64 cross compile to Buster
>   tests/docker: drop debian-sid image
>   tests/docker: drop powerpc-user image for QEMU cross builds
>   tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
>   tests/docker: add debian9-mxe to DEBIAN_PARTIAL_IMAGES
>   tests/docker: avoid $SHELL invoke bash directly
>   tests/docker: add debian-amd64-cross for non-x86 hosts
>   tests/docker: use --arch-only for installing deps
>   tests/docker: add more images to PARTIAL_IMAGES when not on x86_64
>   configure: check if --no-pie is supported first
>   tests/docker: --disable-libssh on ubuntu1804 builds
>   tests/docker: don't always encoding for subprocess.check_output
>
> Cleber Rosa (1):
>   Fedora images: use URLs from stable "archives.fedoraproject.org"
>
> Paolo Bonzini (3):
>   tests/tcg: use EXTRA_CFLAGS everywhere
>   tests/tcg: cleanup Makefile inclusions
>   tests/tcg: move configuration to a sub-shell script
>
> Philippe Mathieu-Daudé (10):
>   .travis.yml: Enable multiple caching features
>   .travis.yml: Increase cache timeout from 3min to 20min
>   .travis.yml: Cache Python PIP packages
>   .travis.yml: Cache Avocado cache
>   .travis.yml: Improve ccache use
>   .travis.yml: Enable ccache on OSX
>   .travis.yml: Document how the build matrix use caches
>   .travis.yml: Cache Linux/GCC 'debug profile' jobs together
>   .travis.yml: Cache Linux/GCC 'non-debug profile' jobs together
>   .travis.yml: Cache Linux/Clang jobs together
>
> Thomas Huth (1):
>   hw/misc: Mark most objects as "common" code to speed up compilation a
>     litte bit
>
>  .travis.yml                                   |  39 ++-
>  Makefile                                      |   1 +
>  Makefile.target                               |   3 -
>  configure                                     | 168 ++-----------
>  hw/misc/Makefile.objs                         |  90 +++----
>  qemu-doc.texi                                 |   6 +-
>  tests/Makefile.include                        |  25 +-
>  tests/acceptance/boot_linux_console.py        |  25 +-
>  tests/acceptance/linux_initrd.py              |   5 +-
>  tests/docker/Makefile.include                 |  61 +++--
>  tests/docker/common.rc                        |   4 +
>  tests/docker/docker.py                        |  51 ++--
>  .../dockerfiles/debian-alpha-cross.docker     |   7 +-
>  .../dockerfiles/debian-amd64-cross.docker     |  22 ++
>  .../dockerfiles/debian-arm64-cross.docker     |   7 +-
>  .../dockerfiles/debian-armel-cross.docker     |   3 +-
>  .../dockerfiles/debian-armhf-cross.docker     |   3 +-
>  .../debian-buster-arm64-cross.docker          |  16 --
>  .../dockerfiles/debian-hppa-cross.docker      |   5 +-
>  .../dockerfiles/debian-m68k-cross.docker      |   5 +-
>  .../dockerfiles/debian-mips-cross.docker      |   7 +-
>  .../dockerfiles/debian-mips64-cross.docker    |   5 +-
>  .../dockerfiles/debian-mips64el-cross.docker  |   3 +-
>  .../dockerfiles/debian-mipsel-cross.docker    |   2 +-
>  .../dockerfiles/debian-powerpc-cross.docker   |   8 +-
>  .../debian-powerpc-user-cross.docker          |  15 --
>  .../dockerfiles/debian-ppc64-cross.docker     |   7 +-
>  .../dockerfiles/debian-ppc64el-cross.docker   |   3 +-
>  .../dockerfiles/debian-riscv64-cross.docker   |   5 +-
>  .../dockerfiles/debian-s390x-cross.docker     |   3 +-
>  .../dockerfiles/debian-sh4-cross.docker       |   5 +-
>  tests/docker/dockerfiles/debian-sid.docker    |  41 ---
>  .../dockerfiles/debian-sparc64-cross.docker   |   5 +-
>  tests/docker/dockerfiles/ubuntu1804.docker    |   3 +
>  tests/docker/run                              |   4 +-
>  tests/docker/test-build                       |   1 -
>  tests/docker/test-mingw                       |   1 -
>  tests/docker/test-quick                       |   1 -
>  tests/tcg/.gitignore                          |   5 +
>  tests/tcg/Makefile.include                    |  88 -------
>  tests/tcg/Makefile.prereqs                    |  18 ++
>  tests/tcg/Makefile.probe                      |  31 ---
>  tests/tcg/Makefile.qemu                       |  95 +++++++
>  tests/tcg/{Makefile => Makefile.target}       |  15 +-
>  tests/tcg/aarch64/Makefile.include            |   8 -
>  tests/tcg/aarch64/Makefile.softmmu-target     |   4 +-
>  tests/tcg/aarch64/Makefile.target             |  12 +-
>  tests/tcg/alpha/Makefile.include              |   2 -
>  tests/tcg/alpha/Makefile.softmmu-target       |   4 +-
>  tests/tcg/arm/Makefile.include                |   8 -
>  tests/tcg/arm/Makefile.softmmu-target         |   6 +-
>  tests/tcg/configure.sh                        | 234 ++++++++++++++++++
>  tests/tcg/cris/Makefile.include               |   6 -
>  tests/tcg/hppa/Makefile.include               |   2 -
>  tests/tcg/i386/Makefile.include               |   9 -
>  tests/tcg/i386/Makefile.softmmu-target        |  12 +-
>  tests/tcg/i386/Makefile.target                |  13 +-
>  tests/tcg/m68k/Makefile.include               |   2 -
>  tests/tcg/minilib/Makefile.target             |   2 +-
>  tests/tcg/mips/Makefile.include               |  20 --
>  tests/tcg/ppc/Makefile.include                |  10 -
>  tests/tcg/riscv/Makefile.include              |  10 -
>  tests/tcg/s390x/Makefile.include              |   2 -
>  tests/tcg/sh4/Makefile.include                |   4 -
>  tests/tcg/sparc64/Makefile.include            |   2 -
>  tests/tcg/x86_64/Makefile.softmmu-target      |  36 +++
>  tests/tcg/x86_64/Makefile.target              |   7 +-
>  tests/tcg/xtensa/Makefile.include             |  11 -
>  tests/tcg/xtensa/Makefile.softmmu-target      |   4 +-
>  tests/vm/fedora                               |   2 +-
>  70 files changed, 693 insertions(+), 656 deletions(-)
>  create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker
>  delete mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
>  delete mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker
>  delete mode 100644 tests/docker/dockerfiles/debian-sid.docker
>  create mode 100644 tests/tcg/.gitignore
>  delete mode 100644 tests/tcg/Makefile.include
>  create mode 100644 tests/tcg/Makefile.prereqs
>  delete mode 100644 tests/tcg/Makefile.probe
>  create mode 100644 tests/tcg/Makefile.qemu
>  rename tests/tcg/{Makefile => Makefile.target} (90%)
>  delete mode 100644 tests/tcg/aarch64/Makefile.include
>  delete mode 100644 tests/tcg/alpha/Makefile.include
>  delete mode 100644 tests/tcg/arm/Makefile.include
>  create mode 100755 tests/tcg/configure.sh
>  delete mode 100644 tests/tcg/cris/Makefile.include
>  delete mode 100644 tests/tcg/hppa/Makefile.include
>  delete mode 100644 tests/tcg/i386/Makefile.include
>  delete mode 100644 tests/tcg/m68k/Makefile.include
>  delete mode 100644 tests/tcg/mips/Makefile.include
>  delete mode 100644 tests/tcg/ppc/Makefile.include
>  delete mode 100644 tests/tcg/riscv/Makefile.include
>  delete mode 100644 tests/tcg/s390x/Makefile.include
>  delete mode 100644 tests/tcg/sh4/Makefile.include
>  delete mode 100644 tests/tcg/sparc64/Makefile.include
>  create mode 100644 tests/tcg/x86_64/Makefile.softmmu-target
>  delete mode 100644 tests/tcg/xtensa/Makefile.include


--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 " Alex Bennée
@ 2019-09-06 19:05   ` Aleksandar Markovic
  2019-09-07 11:33   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 74+ messages in thread
From: Aleksandar Markovic @ 2019-09-06 19:05 UTC (permalink / raw)
  To: Alex Bennée
  Cc: fam, berrange, Aleksandar Markovic, stefanb, Aleksandar Rikalo,
	richard.henderson, qemu-devel, f4bug, cota, stefanha, pbonzini,
	marcandre.lureau, Philippe Mathieu-Daudé,
	aurelien

04.09.2019. 23.59, "Alex Bennée" <alex.bennee@linaro.org> је написао/ла:
>
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>

>  tests/docker/Makefile.include                       | 2 +-
>  tests/docker/dockerfiles/debian-mips64-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index e946aae14fa..896c1c5a601 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -102,11 +102,11 @@ docker-image-debian-alpha-cross:
docker-image-debian10
>  docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
> +docker-image-debian-mips64-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
>  docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
>
> -docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
>  docker-image-travis: NOUSER=1
> diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker
b/tests/docker/dockerfiles/debian-mips64-cross.docker
> index bf0073a4662..1a79505d696 100644
> --- a/tests/docker/dockerfiles/debian-mips64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-mips64-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> --
> 2.20.1
>
>

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

* Re: [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA " Alex Bennée
@ 2019-09-07 11:22   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:22 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                     | 2 +-
>  tests/docker/dockerfiles/debian-hppa-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index e7379f1d732..ba5a624eaec 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -100,9 +100,9 @@ docker-image-debian-win64-cross: docker-image-debian9-mxe
>  
>  docker-image-debian-alpha-cross: docker-image-debian10
>  docker-image-debian-arm64-cross: docker-image-debian10
> +docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
>  
> -docker-image-debian-hppa-cross: docker-image-debian-sid
>  docker-image-debian-m68k-cross: docker-image-debian-sid
>  docker-image-debian-sh4-cross: docker-image-debian-sid
>  docker-image-debian-sparc64-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-hppa-cross.docker b/tests/docker/dockerfiles/debian-hppa-cross.docker
> index ee6d9a24ce8..5c68b2d3304 100644
> --- a/tests/docker/dockerfiles/debian-hppa-cross.docker
> +++ b/tests/docker/dockerfiles/debian-hppa-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha " Alex Bennée
@ 2019-09-07 11:23   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:23 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                      | 2 +-
>  tests/docker/dockerfiles/debian-alpha-cross.docker | 7 +++----
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 7c1ff677a13..e7379f1d732 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -98,10 +98,10 @@ docker-image-debian-s390x-cross: docker-image-debian9
>  docker-image-debian-win32-cross: docker-image-debian9-mxe
>  docker-image-debian-win64-cross: docker-image-debian9-mxe
>  
> +docker-image-debian-alpha-cross: docker-image-debian10
>  docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
>  
> -docker-image-debian-alpha-cross: docker-image-debian-sid
>  docker-image-debian-hppa-cross: docker-image-debian-sid
>  docker-image-debian-m68k-cross: docker-image-debian-sid
>  docker-image-debian-sh4-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/docker/dockerfiles/debian-alpha-cross.docker
> index 23444342f03..74bcabfdb12 100644
> --- a/tests/docker/dockerfiles/debian-alpha-cross.docker
> +++ b/tests/docker/dockerfiles/debian-alpha-cross.docker
> @@ -1,13 +1,12 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
>      apt install -y --no-install-recommends \
>          gcc-alpha-linux-gnu \
> -        libc6.1-dev-alpha-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
> +        libc6.1-dev-alpha-cross
> 


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

* Re: [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 " Alex Bennée
@ 2019-09-07 11:23   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:23 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                    | 2 +-
>  tests/docker/dockerfiles/debian-sh4-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 50c5e64212a..e946aae14fa 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -103,9 +103,9 @@ docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
> +docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
>  
> -docker-image-debian-sh4-cross: docker-image-debian-sid
>  docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docker/dockerfiles/debian-sh4-cross.docker
> index 29983b2d75b..9d7663764e4 100644
> --- a/tests/docker/dockerfiles/debian-sh4-cross.docker
> +++ b/tests/docker/dockerfiles/debian-sh4-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 " Alex Bennée
@ 2019-09-07 11:24   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:24 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                        | 2 +-
>  tests/docker/dockerfiles/debian-riscv64-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 896c1c5a601..93190b1e2a2 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -104,10 +104,10 @@ docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
>  docker-image-debian-mips64-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
> +docker-image-debian-riscv64-cross: docker-image-debian10
>  docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
>  
> -docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
>  docker-image-travis: NOUSER=1
>  
> diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker
> index 221697f9d11..5e2d6ddb600 100644
> --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster
  2019-09-05 10:35   ` Philippe Mathieu-Daudé
@ 2019-09-07 11:26     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:26 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/5/19 12:35 PM, Philippe Mathieu-Daudé wrote:
> On 9/4/19 10:29 PM, Alex Bennée wrote:
>> Now Buster is released we can unify our cross build images for both
>> QEMU and tests.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/docker/Makefile.include                    |  5 ++---
>>  .../docker/dockerfiles/debian-arm64-cross.docker |  4 ++--
>>  .../dockerfiles/debian-buster-arm64-cross.docker | 16 ----------------
>>  tests/tcg/configure.sh                           |  2 +-
>>  4 files changed, 5 insertions(+), 22 deletions(-)
>>  delete mode 100644 tests/docker/dockerfiles/debian-buster-arm64-cross.docker
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 89881fb5f5d..48c22ae40c0 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -86,13 +86,10 @@ docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
>>  endif
>>  
>>  # Enforce dependencies for composite images
>> -docker-image-debian: docker-image-debian9
>>  docker-image-debian9-mxe: docker-image-debian9
>>  docker-image-debian-amd64: docker-image-debian9
>>  docker-image-debian-armel-cross: docker-image-debian9
>>  docker-image-debian-armhf-cross: docker-image-debian9
>> -docker-image-debian-arm64-cross: docker-image-debian9
>> -docker-image-debian-buster-arm64-cross: docker-image-debian10
>>  docker-image-debian-mips-cross: docker-image-debian9
>>  docker-image-debian-mipsel-cross: docker-image-debian9
>>  docker-image-debian-mips64el-cross: docker-image-debian9
>> @@ -101,6 +98,8 @@ docker-image-debian-s390x-cross: docker-image-debian9
>>  docker-image-debian-win32-cross: docker-image-debian9-mxe
>>  docker-image-debian-win64-cross: docker-image-debian9-mxe
>>  
>> +docker-image-debian-arm64-cross: docker-image-debian10
>> +
>>  docker-image-debian-alpha-cross: docker-image-debian-sid
>>  docker-image-debian-hppa-cross: docker-image-debian-sid
>>  docker-image-debian-m68k-cross: docker-image-debian-sid
>> diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
>> index 6b59ef0843a..55045ff5d5a 100644
>> --- a/tests/docker/dockerfiles/debian-arm64-cross.docker
>> +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
>> @@ -1,9 +1,9 @@
>>  #
>>  # Docker arm64 cross-compiler target
>>  #
>> -# This docker target builds on the debian Stretch base image.
>> +# This docker target builds on the debian Buster base image.
>>  #
>> -FROM qemu:debian9
>> +FROM qemu:debian10
>>  
>>  # Add the foreign architecture we want and install dependencies
>>  RUN dpkg --add-architecture arm64
>> diff --git a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker b/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
>> deleted file mode 100644
>> index 52787edcc2c..00000000000
>> --- a/tests/docker/dockerfiles/debian-buster-arm64-cross.docker
>> +++ /dev/null
>> @@ -1,16 +0,0 @@
>> -#
>> -# Docker arm64 cross-compiler target
>> -#
>> -# This docker target builds on the Debian's Buster base image. There
>> -# are no QEMU pre-requistes so this image can only be used to build
>> -# test cases.
>> -#
>> -FROM qemu:debian10
>> -
>> -# Add the foreign architecture we want and install dependencies
>> -RUN dpkg --add-architecture arm64
>> -RUN apt update && \
>> -    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
>> -    DEBIAN_FRONTEND=noninteractive eatmydata \
>> -    apt-get install -y --no-install-recommends \
>> -        crossbuild-essential-arm64
>> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
>> index 5f794b664b8..2a351a00048 100755
>> --- a/tests/tcg/configure.sh
>> +++ b/tests/tcg/configure.sh
>> @@ -95,7 +95,7 @@ for target in $target_list; do
>>    case $target in
>>      aarch64-*)
>>        # We don't have any bigendian build tools so we only use this for AArch64
>> -      container_image=debian-buster-arm64-cross
>> +      container_image=debian-arm64-cross
>>        container_cross_cc=aarch64-linux-gnu-gcc
>>        ;;
>>      alpha-*)
>>
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

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



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

* Re: [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 " Alex Bennée
@ 2019-09-07 11:27   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:27 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                        | 2 +-
>  tests/docker/dockerfiles/debian-sparc64-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 62f2733eb66..50c5e64212a 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -103,9 +103,9 @@ docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
> +docker-image-debian-sparc64-cross: docker-image-debian10
>  
>  docker-image-debian-sh4-cross: docker-image-debian-sid
> -docker-image-debian-sparc64-cross: docker-image-debian-sid
>  docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/docker/dockerfiles/debian-sparc64-cross.docker
> index 7a2c2ab19c2..31fd34f120b 100644
> --- a/tests/docker/dockerfiles/debian-sparc64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-sparc64-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k " Alex Bennée
@ 2019-09-07 11:28   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:28 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                     | 2 +-
>  tests/docker/dockerfiles/debian-m68k-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index ba5a624eaec..62f2733eb66 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -101,9 +101,9 @@ docker-image-debian-win64-cross: docker-image-debian9-mxe
>  docker-image-debian-alpha-cross: docker-image-debian10
>  docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-hppa-cross: docker-image-debian10
> +docker-image-debian-m68k-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
>  
> -docker-image-debian-m68k-cross: docker-image-debian-sid
>  docker-image-debian-sh4-cross: docker-image-debian-sid
>  docker-image-debian-sparc64-cross: docker-image-debian-sid
>  docker-image-debian-mips64-cross: docker-image-debian-sid
> diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/docker/dockerfiles/debian-m68k-cross.docker
> index 4311c9cf86d..25edc80e9a3 100644
> --- a/tests/docker/dockerfiles/debian-m68k-cross.docker
> +++ b/tests/docker/dockerfiles/debian-m68k-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 " Alex Bennée
@ 2019-09-07 11:29   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:29 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                      | 4 ++--
>  tests/docker/dockerfiles/debian-ppc64-cross.docker | 7 +++----
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 93190b1e2a2..b6c04059502 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -104,11 +104,11 @@ docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
>  docker-image-debian-mips64-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
> +docker-image-debian-ppc64-cross: docker-image-debian10
>  docker-image-debian-riscv64-cross: docker-image-debian10
>  docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
>  
> -docker-image-debian-ppc64-cross: docker-image-debian-sid
>  docker-image-travis: NOUSER=1
>  
>  # Specialist build images, sometimes very limited tools
> @@ -117,7 +117,7 @@ docker-image-tricore-cross: docker-image-debian9
>  # These images may be good enough for building tests but not for test builds
>  DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
>  DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
> -DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross fedora-i386-cross
> +DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross debian-ppc64-cross fedora-i386-cross
>  DOCKER_PARTIAL_IMAGES += fedora-cris-cross
>  
>  # Rules for building linux-user powered images
> diff --git a/tests/docker/dockerfiles/debian-ppc64-cross.docker b/tests/docker/dockerfiles/debian-ppc64-cross.docker
> index e5757fe46ee..4bf88ab02dd 100644
> --- a/tests/docker/dockerfiles/debian-ppc64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-ppc64-cross.docker
> @@ -1,12 +1,11 @@
>  #
>  # Docker ppc64 cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> -FROM qemu:debian-sid
> +# This docker target builds on the debian Buster base image.
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
>      apt install -y --no-install-recommends \
>         gcc-powerpc64-linux-gnu \
> -       libc6-dev-ppc64-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
> +       libc6-dev-ppc64-cross
> 


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

* Re: [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc " Alex Bennée
@ 2019-09-07 11:32   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:32 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                        | 2 +-
>  tests/docker/dockerfiles/debian-powerpc-cross.docker | 8 +++-----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 48c22ae40c0..7c1ff677a13 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -99,6 +99,7 @@ docker-image-debian-win32-cross: docker-image-debian9-mxe
>  docker-image-debian-win64-cross: docker-image-debian9-mxe
>  
>  docker-image-debian-arm64-cross: docker-image-debian10
> +docker-image-debian-powerpc-cross: docker-image-debian10
>  
>  docker-image-debian-alpha-cross: docker-image-debian-sid
>  docker-image-debian-hppa-cross: docker-image-debian-sid
> @@ -107,7 +108,6 @@ docker-image-debian-sh4-cross: docker-image-debian-sid
>  docker-image-debian-sparc64-cross: docker-image-debian-sid
>  docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
> -docker-image-debian-powerpc-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
>  docker-image-travis: NOUSER=1
>  
> diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker b/tests/docker/dockerfiles/debian-powerpc-cross.docker
> index 5d08fad7cd3..89dd4fbf870 100644
> --- a/tests/docker/dockerfiles/debian-powerpc-cross.docker
> +++ b/tests/docker/dockerfiles/debian-powerpc-cross.docker
> @@ -1,14 +1,12 @@
>  #
>  # Docker powerpc cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets. The original
> -# Jessie based no longer builds.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
>      apt install -y --no-install-recommends \
>          gcc-powerpc-linux-gnu \
> -        libc6-dev-powerpc-cross || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
> +        libc6-dev-powerpc-cross
> 


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

* Re: [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 cross compile to Buster
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 " Alex Bennée
  2019-09-06 19:05   ` Aleksandar Markovic
@ 2019-09-07 11:33   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:33 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, Aleksandar Markovic, stefanb, Aleksandar Rikalo,
	richard.henderson, f4bug, cota, stefanha, marcandre.lureau,
	pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Buster is released we can stop relying on the movable feast that
> is Sid for our cross-compiler for building tests.
> 
> 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/docker/Makefile.include                       | 2 +-
>  tests/docker/dockerfiles/debian-mips64-cross.docker | 5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index e946aae14fa..896c1c5a601 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -102,11 +102,11 @@ docker-image-debian-alpha-cross: docker-image-debian10
>  docker-image-debian-arm64-cross: docker-image-debian10
>  docker-image-debian-hppa-cross: docker-image-debian10
>  docker-image-debian-m68k-cross: docker-image-debian10
> +docker-image-debian-mips64-cross: docker-image-debian10
>  docker-image-debian-powerpc-cross: docker-image-debian10
>  docker-image-debian-sh4-cross: docker-image-debian10
>  docker-image-debian-sparc64-cross: docker-image-debian10
>  
> -docker-image-debian-mips64-cross: docker-image-debian-sid
>  docker-image-debian-riscv64-cross: docker-image-debian-sid
>  docker-image-debian-ppc64-cross: docker-image-debian-sid
>  docker-image-travis: NOUSER=1
> diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/docker/dockerfiles/debian-mips64-cross.docker
> index bf0073a4662..1a79505d696 100644
> --- a/tests/docker/dockerfiles/debian-mips64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-mips64-cross.docker
> @@ -1,10 +1,9 @@
>  #
>  # Docker cross-compiler target
>  #
> -# This docker target builds on the debian sid base image which
> -# contains cross compilers for Debian "ports" targets.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian-sid
> +FROM qemu:debian10
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> 


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

* Re: [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps Alex Bennée
@ 2019-09-07 11:40   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 11:40 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> The Debian QEMU packages require a bunch of cross compilers for
> building firmware which aren't available on all host architectures.
> Using --arch-only skips this particular requirement and allows us to
> install just the dependencies we need.

Nice finding!

> 
> 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/docker/dockerfiles/debian-arm64-cross.docker    | 2 +-
>  tests/docker/dockerfiles/debian-armel-cross.docker    | 2 +-
>  tests/docker/dockerfiles/debian-armhf-cross.docker    | 2 +-
>  tests/docker/dockerfiles/debian-mips-cross.docker     | 6 +++---
>  tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 +-
>  tests/docker/dockerfiles/debian-mipsel-cross.docker   | 2 +-
>  tests/docker/dockerfiles/debian-ppc64el-cross.docker  | 2 +-
>  tests/docker/dockerfiles/debian-s390x-cross.docker    | 2 +-
>  8 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
> index 55045ff5d5a..09ca0a1ba79 100644
> --- a/tests/docker/dockerfiles/debian-arm64-cross.docker
> +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
> @@ -13,7 +13,7 @@ RUN apt update && \
>          crossbuild-essential-arm64
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a arm64 qemu
> +    apt build-dep -yy -a arm64 --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
> diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
> index 363a162a253..15378f8ea2c 100644
> --- a/tests/docker/dockerfiles/debian-armel-cross.docker
> +++ b/tests/docker/dockerfiles/debian-armel-cross.docker
> @@ -11,7 +11,7 @@ RUN dpkg --add-architecture armel && \
>      apt update && \
>      apt install -yy crossbuild-essential-armel && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a armel qemu
> +    apt build-dep -yy -a armel --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
> diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
> index d5365881e79..4a20af6fe1a 100644
> --- a/tests/docker/dockerfiles/debian-armhf-cross.docker
> +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
> @@ -13,7 +13,7 @@ RUN apt update && \
>          crossbuild-essential-armhf
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a armhf qemu
> +    apt build-dep -yy -a armhf --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
> diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker
> index a54efa7253a..08a8e1c29cc 100644
> --- a/tests/docker/dockerfiles/debian-mips-cross.docker
> +++ b/tests/docker/dockerfiles/debian-mips-cross.docker
> @@ -1,9 +1,9 @@
>  #
>  # Docker mips cross-compiler target
>  #
> -# This docker target builds on the debian Stretch base image.
> +# This docker target builds on the debian Buster base image.
>  #
> -FROM qemu:debian9
> +FROM qemu:debian10
>  
>  MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
>  
> @@ -16,7 +16,7 @@ RUN apt update && \
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a mips qemu
> +    apt build-dep -yy -a mips --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
> diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
> index a1481e16e2c..2fca1124053 100644
> --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
> +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
> @@ -17,7 +17,7 @@ RUN dpkg --add-architecture mips64el && \
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a mips64el qemu
> +    apt build-dep -yy -a mips64el --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
> diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
> index 88accad2692..4abf7832ac6 100644
> --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
> +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
> @@ -16,7 +16,7 @@ RUN apt update && \
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a mipsel qemu
> +    apt build-dep -yy -a mipsel --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
> diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
> index f10883c8188..9973df9ff74 100644
> --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
> +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
> @@ -12,7 +12,7 @@ RUN dpkg --add-architecture ppc64el && \
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a ppc64el qemu
> +    apt build-dep -yy -a ppc64el --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
> diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
> index efa346007d6..eb73c988559 100644
> --- a/tests/docker/dockerfiles/debian-s390x-cross.docker
> +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
> @@ -17,7 +17,7 @@ RUN apt update && \
>  
>  RUN apt update && \
>      DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt build-dep -yy -a s390x qemu
> +    apt build-dep -yy -a s390x --arch-only qemu
>  
>  # Specify the cross prefix for this image (see tests/docker/common.rc)
>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
> 


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

* Re: [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES Alex Bennée
@ 2019-09-07 12:06   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 12:06 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> This should have been marked when the docker recipe was added to

Oops

... was added (in c72d9df1818) to ...?

> prevent it being used for cross compiling QEMU. Sort the
> DEBIAN_PARTIAL_IMAGE list while we are at it.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/Makefile.include | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index f4e9dfc0120..8d7f9376578 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -115,10 +115,15 @@ docker-image-travis: NOUSER=1
>  docker-image-tricore-cross: docker-image-debian9
>  
>  # These images may be good enough for building tests but not for test builds
> -DOCKER_PARTIAL_IMAGES += debian-alpha-cross debian-hppa-cross debian-m68k-cross debian-sh4-cross
> -DOCKER_PARTIAL_IMAGES += debian-sparc64-cross debian-mips64-cross debian-riscv64-cross
> -DOCKER_PARTIAL_IMAGES += debian-tricore-cross debian-powerpc-cross debian-ppc64-cross fedora-i386-cross
> -DOCKER_PARTIAL_IMAGES += fedora-cris-cross
> +DOCKER_PARTIAL_IMAGES += debian-alpha-cross
> +DOCKER_PARTIAL_IMAGES += debian-hppa-cross
> +DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross

If possible, let's use one image per line
(I think it is acceptable if you do it before your pull
request, no need to respin).

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

> +DOCKER_PARTIAL_IMAGES += debian-powerpc-cross debian-ppc64-cross
> +DOCKER_PARTIAL_IMAGES += debian-riscv64-cross
> +DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
> +DOCKER_PARTIAL_IMAGES += debian-tricore-cross
> +DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
> +DOCKER_PARTIAL_IMAGES += fedora-i386-cross fedora-cris-cross
>  
>  # Rules for building linux-user powered images
>  #
> 


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

* Re: [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image Alex Bennée
@ 2019-09-07 20:02   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 20:02 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Debian Sid was only ever a stop gap and thanks to the much better
> cross compiler in the Buster release we don't need it any more. Send
> it on its merry way.

I'm not sure about this one... Why not update and keep it?

-- >8 --
-FROM debian:sid-20181011-slim
+FROM debian:sid-20190812-slim

 # Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
-ENV DEBIAN_SNAPSHOT_DATE "20181030"
+ENV DEBIAN_SNAPSHOT_DATE "20190820"
---

> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/Makefile.include              |  2 +-
>  tests/docker/dockerfiles/debian-sid.docker | 41 ----------------------
>  2 files changed, 1 insertion(+), 42 deletions(-)
>  delete mode 100644 tests/docker/dockerfiles/debian-sid.docker
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index b6c04059502..59fbebbe2e6 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker
>  DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
>  DOCKER_DEPRECATED_IMAGES := debian
>  # we don't run tests on intermediate images (used as base by another image)
> -DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-sid debian-bootstrap
> +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian10 debian8-mxe debian-ports debian-bootstrap
>  DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker)))))
>  DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES))
>  # Use a global constant ccache directory to speed up repetitive builds
> diff --git a/tests/docker/dockerfiles/debian-sid.docker b/tests/docker/dockerfiles/debian-sid.docker
> deleted file mode 100644
> index 513459ca7f8..00000000000
> --- a/tests/docker/dockerfiles/debian-sid.docker
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -#
> -# Debian Sid Base
> -#
> -# A number of our guests exist as ports only. We can either use the
> -# ports repo or get everything from Sid. However Sid is a rolling
> -# distro which may be broken at any particular time. If you are
> -# unlucky and try and build your images while gcc is in the process of
> -# being uploaded this can fail. Your only recourse is to try again in
> -# a few hours when the repos have re-synced. Once built however you
> -# won't be affected by repo changes unless the docker recipies are
> -# updated and trigger a re-build.
> -#
> -
> -# This must be earlier than the snapshot date we are aiming for
> -FROM debian:sid-20181011-slim
> -
> -# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
> -ENV DEBIAN_SNAPSHOT_DATE "20181030"
> -RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
> -
> -# Use a snapshot known to work (see http://snapshot.debian.org/#Usage)
> -ENV DEBIAN_SNAPSHOT_DATE "20181030"
> -RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list
> -
> -# Duplicate deb line as deb-src
> -RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
> -
> -# Install common build utilities
> -RUN apt update && \
> -    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
> -    DEBIAN_FRONTEND=noninteractive eatmydata \
> -    apt install -y --no-install-recommends \
> -        bison \
> -        build-essential \
> -        ca-certificates \
> -        flex \
> -        git \
> -        pkg-config \
> -        psmisc \
> -        python \
> -        texinfo || { echo "Failed to build - see debian-sid.docker notes"; exit 1; }
> 


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

* Re: [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds
  2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds Alex Bennée
@ 2019-09-07 20:21   ` Philippe Mathieu-Daudé
  2019-09-09  9:54     ` Alex Bennée
  0 siblings, 1 reply; 74+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-07 20:21 UTC (permalink / raw)
  To: Alex Bennée, qemu-devel
  Cc: fam, berrange, stefanb, richard.henderson, f4bug, cota, stefanha,
	marcandre.lureau, pbonzini, aurelien, David Gibson

On 9/4/19 10:29 PM, Alex Bennée wrote:
> Now Jessie has entered LTS the powerpc architecture has been dropped
> so we can no longer build the image from scratch. We will still
> support a minimal powerpc-cross image for building testcases.

This one still works using:

DEB_URL=http://snapshot.debian.org/archive/debian/20180615T211437Z

So I'd rather keep it with this snippet:

-- >8 --
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -68,10 +68,13 @@ docker-binfmt-image-debian-%:
$(DOCKER_FILES_DIR)/debian-bootstrap.docker
                $(error DEB_ARCH not set, debootstrap of debian-$* would
fail))
        $(if $(DEB_TYPE),,\
                $(error DEB_TYPE not set, debootstrap of debian-$* would
fail))
+       $(if $(DEB_URL),,\
+               $(error DEB_URL not set, debootstrap of debian-$* would
fail))
        $(if $(wildcard $(EXECUTABLE)),
        \
                $(call quiet-command,
        \
                        DEB_ARCH=$(DEB_ARCH)
        \
                        DEB_TYPE=$(DEB_TYPE)
        \
+                       DEB_URL=$(DEB_URL)
                \
                        $(DOCKER_SCRIPT) build qemu:debian-$* $<
        \
                        $(if $V,,--quiet) $(if $(NOCACHE),--no-cache)
        \
                        $(if $(NOUSER),,--add-current-user)
        \
@@ -130,6 +133,7 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
 # broken so we need a qemu-linux-user for this target
 docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
 docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
+docker-binfmt-image-debian-powerpc-user: DEB_URL =
http://snapshot.debian.org/archive/debian/20180615T211437Z
 docker-binfmt-image-debian-powerpc-user: EXECUTABLE =
${BUILD_DIR}/ppc-linux-user/qemu-ppc
 docker-image-debian-powerpc-user-cross:
docker-binfmt-image-debian-powerpc-user
 DOCKER_USER_IMAGES += debian-powerpc-user
---

> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> ---
>  tests/docker/Makefile.include                     |  8 --------
>  .../dockerfiles/debian-powerpc-user-cross.docker  | 15 ---------------
>  2 files changed, 23 deletions(-)
>  delete mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 59fbebbe2e6..f4e9dfc0120 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -126,14 +126,6 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
>  # work around issues with poorly working multi-arch systems and broken
>  # packages.
>  
> -# Jessie is the last supported release for powerpc, but multi-arch is
> -# broken so we need a qemu-linux-user for this target
> -docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
> -docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
> -docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
> -docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
> -DOCKER_USER_IMAGES += debian-powerpc-user
> -
>  # Expand all the pre-requistes for each docker image and test combination
>  $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \
>  	$(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \
> diff --git a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker b/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
> deleted file mode 100644
> index 6938a845ee2..00000000000
> --- a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -#
> -# Docker powerpc cross-compiler target for QEMU
> -#
> -# We can't use current Debian stable cross-compilers to build powerpc
> -# as it has been dropped as a release architecture. Using Debian Sid
> -# is just far too sketchy a build environment. This leaves us the
> -# final option of using linux-user. This image is based of the
> -# debootstrapped qemu:debian-powerpc-user but doesn't need any extra
> -# magic once it is setup.
> -#
> -FROM qemu:debian-powerpc-user
> -
> -RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
> -RUN apt-get update && \
> -    DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu
> 


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

* Re: [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds
  2019-09-07 20:21   ` Philippe Mathieu-Daudé
@ 2019-09-09  9:54     ` Alex Bennée
  0 siblings, 0 replies; 74+ messages in thread
From: Alex Bennée @ 2019-09-09  9:54 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: fam, berrange, stefanb, richard.henderson, qemu-devel, f4bug,
	cota, stefanha, marcandre.lureau, pbonzini, aurelien,
	David Gibson


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

> On 9/4/19 10:29 PM, Alex Bennée wrote:
>> Now Jessie has entered LTS the powerpc architecture has been dropped
>> so we can no longer build the image from scratch. We will still
>> support a minimal powerpc-cross image for building testcases.
>
> This one still works using:
>
> DEB_URL=http://snapshot.debian.org/archive/debian/20180615T211437Z
>
> So I'd rather keep it with this snippet:
>
> -- >8 --
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -68,10 +68,13 @@ docker-binfmt-image-debian-%:
> $(DOCKER_FILES_DIR)/debian-bootstrap.docker
>                 $(error DEB_ARCH not set, debootstrap of debian-$* would
> fail))
>         $(if $(DEB_TYPE),,\
>                 $(error DEB_TYPE not set, debootstrap of debian-$* would
> fail))
> +       $(if $(DEB_URL),,\
> +               $(error DEB_URL not set, debootstrap of debian-$* would
> fail))

I'm not sure we want to force a fail here - DEB_URL will set to a
reasonable default if not set.

>         $(if $(wildcard $(EXECUTABLE)),
>         \
>                 $(call quiet-command,
>         \
>                         DEB_ARCH=$(DEB_ARCH)
>         \
>                         DEB_TYPE=$(DEB_TYPE)
>         \
> +                       DEB_URL=$(DEB_URL)
>                 \
>                         $(DOCKER_SCRIPT) build qemu:debian-$* $<
>         \
>                         $(if $V,,--quiet) $(if $(NOCACHE),--no-cache)
>         \
>                         $(if $(NOUSER),,--add-current-user)
>         \
> @@ -130,6 +133,7 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
>  # broken so we need a qemu-linux-user for this target
>  docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
>  docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
> +docker-binfmt-image-debian-powerpc-user: DEB_URL =
> http://snapshot.debian.org/archive/debian/20180615T211437Z

These seems reasonable though.

>  docker-binfmt-image-debian-powerpc-user: EXECUTABLE =
> ${BUILD_DIR}/ppc-linux-user/qemu-ppc
>  docker-image-debian-powerpc-user-cross:
> docker-binfmt-image-debian-powerpc-user
>  DOCKER_USER_IMAGES += debian-powerpc-user
> ---
>
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: David Gibson <david@gibson.dropbear.id.au>
>> ---
>>  tests/docker/Makefile.include                     |  8 --------
>>  .../dockerfiles/debian-powerpc-user-cross.docker  | 15 ---------------
>>  2 files changed, 23 deletions(-)
>>  delete mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 59fbebbe2e6..f4e9dfc0120 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -126,14 +126,6 @@ DOCKER_PARTIAL_IMAGES += fedora-cris-cross
>>  # work around issues with poorly working multi-arch systems and broken
>>  # packages.
>>
>> -# Jessie is the last supported release for powerpc, but multi-arch is
>> -# broken so we need a qemu-linux-user for this target
>> -docker-binfmt-image-debian-powerpc-user: DEB_ARCH = powerpc
>> -docker-binfmt-image-debian-powerpc-user: DEB_TYPE = jessie
>> -docker-binfmt-image-debian-powerpc-user: EXECUTABLE = ${BUILD_DIR}/ppc-linux-user/qemu-ppc
>> -docker-image-debian-powerpc-user-cross: docker-binfmt-image-debian-powerpc-user
>> -DOCKER_USER_IMAGES += debian-powerpc-user
>> -
>>  # Expand all the pre-requistes for each docker image and test combination
>>  $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPRECATED_IMAGES)), \
>>  	$(foreach t,$(DOCKER_TESTS) $(DOCKER_TOOLS), \
>> diff --git a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker b/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
>> deleted file mode 100644
>> index 6938a845ee2..00000000000
>> --- a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker
>> +++ /dev/null
>> @@ -1,15 +0,0 @@
>> -#
>> -# Docker powerpc cross-compiler target for QEMU
>> -#
>> -# We can't use current Debian stable cross-compilers to build powerpc
>> -# as it has been dropped as a release architecture. Using Debian Sid
>> -# is just far too sketchy a build environment. This leaves us the
>> -# final option of using linux-user. This image is based of the
>> -# debootstrapped qemu:debian-powerpc-user but doesn't need any extra
>> -# magic once it is setup.
>> -#
>> -FROM qemu:debian-powerpc-user
>> -
>> -RUN echo man-db man-db/auto-update boolean false | debconf-set-selections
>> -RUN apt-get update && \
>> -    DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu
>>


--
Alex Bennée


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

end of thread, other threads:[~2019-09-09  9:56 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 20:29 [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 01/42] hw/misc: Mark most objects as "common" code to speed up compilation a litte bit Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 02/42] configure: clean-up container cross compile detect Alex Bennée
2019-09-05 17:53   ` David Hildenbrand
2019-09-05 18:35     ` Alex Bennée
2019-09-05 18:37       ` David Hildenbrand
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 03/42] tests/docker: fix "cc" command to work with podman Alex Bennée
2019-09-04 23:31   ` John Snow
2019-09-05  9:51     ` Alex Bennée
2019-09-05 17:18       ` John Snow
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 04/42] tests/tcg: use EXTRA_CFLAGS everywhere Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 05/42] tests/tcg: cleanup Makefile inclusions Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script Alex Bennée
2019-09-05 10:29   ` Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 07/42] tests/tcg: add .gitignore for in source builds Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 08/42] tests/docker: move DEF_TARGET_LIST setting to common.rc Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 09/42] tests/docker: set DEF_TARGET_LIST for some containers Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES Alex Bennée
2019-09-05 10:34   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster Alex Bennée
2019-09-05 10:35   ` Philippe Mathieu-Daudé
2019-09-07 11:26     ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 12/42] tests/docker: move our powerpc " Alex Bennée
2019-09-07 11:32   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha " Alex Bennée
2019-09-07 11:23   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA " Alex Bennée
2019-09-07 11:22   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k " Alex Bennée
2019-09-07 11:28   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 16/42] tests/docker: move our sparc64 " Alex Bennée
2019-09-07 11:27   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 17/42] tests/docker: move our sh4 " Alex Bennée
2019-09-07 11:23   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 18/42] tests/docker: move our mips64 " Alex Bennée
2019-09-06 19:05   ` Aleksandar Markovic
2019-09-07 11:33   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 " Alex Bennée
2019-09-07 11:24   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 20/42] tests/docker: move our ppc64 " Alex Bennée
2019-09-07 11:29   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 21/42] tests/docker: drop debian-sid image Alex Bennée
2019-09-07 20:02   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 22/42] tests/docker: drop powerpc-user image for QEMU cross builds Alex Bennée
2019-09-07 20:21   ` Philippe Mathieu-Daudé
2019-09-09  9:54     ` Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 23/42] tests/docker: add debian-xtensa-cross to DEBIAN_PARTIAL_IMAGES Alex Bennée
2019-09-07 12:06   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 24/42] tests/docker: add debian9-mxe " Alex Bennée
2019-09-05 10:36   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 25/42] tests/docker: avoid $SHELL invoke bash directly Alex Bennée
2019-09-05 10:40   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 26/42] tests/docker: add debian-amd64-cross for non-x86 hosts Alex Bennée
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 27/42] tests/docker: use --arch-only for installing deps Alex Bennée
2019-09-07 11:40   ` Philippe Mathieu-Daudé
2019-09-04 20:29 ` [Qemu-devel] [PATCH v1 28/42] tests/docker: add more images to PARTIAL_IMAGES when not on x86_64 Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 30/42] .travis.yml: Enable multiple caching features Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 31/42] .travis.yml: Increase cache timeout from 3min to 20min Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 32/42] .travis.yml: Cache Python PIP packages Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 33/42] .travis.yml: Cache Avocado cache Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 34/42] .travis.yml: Improve ccache use Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 35/42] .travis.yml: Enable ccache on OSX Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 36/42] .travis.yml: Document how the build matrix use caches Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 37/42] .travis.yml: Cache Linux/GCC 'debug profile' jobs together Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 38/42] .travis.yml: Cache Linux/GCC 'non-debug " Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 39/42] .travis.yml: Cache Linux/Clang " Alex Bennée
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 40/42] Fedora images: use URLs from stable "archives.fedoraproject.org" Alex Bennée
2019-09-05 10:33   ` Philippe Mathieu-Daudé
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 41/42] tests/docker: --disable-libssh on ubuntu1804 builds Alex Bennée
2019-09-05 10:32   ` Philippe Mathieu-Daudé
2019-09-04 20:30 ` [Qemu-devel] [PATCH v1 42/42] tests/docker: don't always encoding for subprocess.check_output Alex Bennée
2019-09-04 22:16 ` [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci) no-reply
2019-09-06 10:20 ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.