qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
@ 2023-03-01 15:15 Alex Bennée
  2023-03-01 15:15 ` [PULL v2 01/24] tests: don't run socat tests on MacOS as well Alex Bennée
                   ` (25 more replies)
  0 siblings, 26 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Alex Bennée

The following changes since commit 627634031092e1514f363fd8659a579398de0f0e:

  Merge tag 'buildsys-qom-qdev-ui-20230227' of https://github.com/philmd/qemu into staging (2023-02-28 15:09:18 +0000)

are available in the Git repository at:

  https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1

for you to fetch changes up to c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:

  tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01 12:51:01 +0000)

----------------------------------------------------------------
testing updates:

  - ensure socat available for tests
  - skip socat tests for MacOS
  - properly clean up fifos after use
  - make fp-test less chatty
  - store test artefacts on Cirrus
  - control custom runners with QEMU_CI knobs
  - disable benchmark runs under tsan build
  - update ubuntu 2004 to 2204
  - skip nios2 kernel replay test
  - add tuxrun baselines to avocado
  - binary build of tricore tools
  - export test results on cross builds
  - improve windows builds
  - ensure we properly print TAP headers
  - migrate away from docker.py for building containers
  - be more efficient in our handling of build artefacts between stages
  - enable ztsd in containers so we can run tux_baselines
  - disable heavyweight PPC64 Boot Linux test in CI

----------------------------------------------------------------
Alex Bennée (19):
      tests: don't run socat tests on MacOS as well
      tests: add socat dependency for tests
      tests: be a bit more strict cleaning up fifos
      tests: make fp-test less chatty when running from test suite
      gitlab: extend custom runners with base_job_template
      tests: don't run benchmarks for the tsan build
      testing: update ubuntu2004 to ubuntu2204
      tests: skip the nios2 replay_kernel test
      tests: add tuxrun baseline test to avocado
      tests: ensure we export job results for some cross builds
      tests/dockerfiles: unify debian-toolchain references
      configure: expose the direct container command
      tests/lcitool: append user setting stanza to dockerfiles
      tests/docker: add USER stanzas to non-lci images
      tests/docker: use direct RUNC call to build containers
      tests/docker: use direct RUNC call to run test jobs
      gitlab: move the majority of artefact handling to a template
      tests/docker: add zstdtools to the images
      tests/avocado: disable BootLinuxPPC64 test in CI

Bastian Koppelmann (1):
      tests/docker: Use binaries for debian-tricore-cross

Fabiano Rosas (1):
      gitlab: Use plain docker in container-template.yml

Richard W.M. Jones (1):
      tests: Ensure TAP version is printed before other messages

Thomas Huth (2):
      gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs
      cirrus.yml: Improve the windows_msys2_task

 MAINTAINERS                                        |   1 +
 docs/devel/testing.rst                             |   4 +-
 configure                                          |   3 +
 tests/tcg/tricore/macros.h                         |   2 +-
 tests/fp/fp-test.c                                 |  19 +-
 tests/qtest/fuzz-lsi53c895a-test.c                 |   4 +-
 tests/qtest/rtl8139-test.c                         |   3 +-
 tests/unit/test-io-channel-command.c               |  10 +-
 .cirrus.yml                                        |   8 +-
 .gitlab-ci.d/buildtest-template.yml                |  16 +
 .gitlab-ci.d/buildtest.yml                         | 100 ++---
 .gitlab-ci.d/cirrus/build.yml                      |   7 +-
 .gitlab-ci.d/cirrus/freebsd-12.vars                |   2 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars                |   2 +-
 .gitlab-ci.d/cirrus/macos-12.vars                  |   2 +-
 .gitlab-ci.d/container-template.yml                |   9 +-
 .gitlab-ci.d/containers.yml                        |   4 +-
 .gitlab-ci.d/crossbuild-template.yml               |  11 +
 .gitlab-ci.d/crossbuilds.yml                       |  12 +-
 .gitlab-ci.d/custom-runners.yml                    |   3 +-
 .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml |  10 +-
 .../custom-runners/ubuntu-22.04-aarch32.yml        |   2 +-
 .../custom-runners/ubuntu-22.04-aarch64.yml        |  10 +-
 tests/avocado/boot_linux.py                        |   3 +
 tests/avocado/replay_kernel.py                     |   1 +
 tests/avocado/tuxrun_baselines.py                  | 423 +++++++++++++++++++++
 tests/docker/Makefile.include                      |  28 +-
 tests/docker/dockerfiles/alpine.docker             |   7 +
 tests/docker/dockerfiles/centos8.docker            |   9 +-
 .../dockerfiles/debian-all-test-cross.docker       |   5 +
 tests/docker/dockerfiles/debian-alpha-cross.docker |   5 +
 tests/docker/dockerfiles/debian-amd64-cross.docker |   9 +-
 tests/docker/dockerfiles/debian-amd64.docker       |   9 +-
 tests/docker/dockerfiles/debian-arm64-cross.docker |   9 +-
 tests/docker/dockerfiles/debian-armel-cross.docker |   9 +-
 tests/docker/dockerfiles/debian-armhf-cross.docker |   9 +-
 .../docker/dockerfiles/debian-hexagon-cross.docker |   5 +
 tests/docker/dockerfiles/debian-hppa-cross.docker  |   5 +
 .../dockerfiles/debian-loongarch-cross.docker      |   5 +
 tests/docker/dockerfiles/debian-m68k-cross.docker  |   5 +
 tests/docker/dockerfiles/debian-mips-cross.docker  |   5 +
 .../docker/dockerfiles/debian-mips64-cross.docker  |   5 +
 .../dockerfiles/debian-mips64el-cross.docker       |   9 +-
 .../docker/dockerfiles/debian-mipsel-cross.docker  |   9 +-
 tests/docker/dockerfiles/debian-native.docker      |   5 +
 .../dockerfiles/debian-powerpc-test-cross.docker   |   6 +-
 .../docker/dockerfiles/debian-ppc64el-cross.docker |   9 +-
 .../docker/dockerfiles/debian-riscv64-cross.docker |   5 +
 .../dockerfiles/debian-riscv64-test-cross.docker   |   5 +
 tests/docker/dockerfiles/debian-s390x-cross.docker |   9 +-
 tests/docker/dockerfiles/debian-sh4-cross.docker   |   5 +
 .../docker/dockerfiles/debian-sparc64-cross.docker |   5 +
 tests/docker/dockerfiles/debian-toolchain.docker   |   9 +-
 .../docker/dockerfiles/debian-tricore-cross.docker |  15 +-
 .../docker/dockerfiles/debian-xtensa-cross.docker  |   5 +
 tests/docker/dockerfiles/fedora-cris-cross.docker  |   5 +
 tests/docker/dockerfiles/fedora-i386-cross.docker  |   5 +
 tests/docker/dockerfiles/fedora-win32-cross.docker |   9 +-
 tests/docker/dockerfiles/fedora-win64-cross.docker |   9 +-
 tests/docker/dockerfiles/fedora.docker             |   9 +-
 tests/docker/dockerfiles/opensuse-leap.docker      |   9 +-
 tests/docker/dockerfiles/python.docker             |   5 +
 tests/docker/dockerfiles/ubuntu2004.docker         |  12 +-
 tests/docker/dockerfiles/ubuntu2204.docker         | 153 ++++++++
 tests/docker/test-tsan                             |   2 +-
 tests/fp/berkeley-testfloat-3                      |   2 +-
 tests/fp/meson.build                               |   2 +-
 tests/lcitool/libvirt-ci                           |   2 +-
 tests/lcitool/projects/qemu.yml                    |   2 +
 tests/lcitool/refresh                              |  26 +-
 tests/tcg/tricore/Makefile.softmmu-target          |   6 +-
 71 files changed, 994 insertions(+), 160 deletions(-)
 create mode 100644 tests/avocado/tuxrun_baselines.py
 create mode 100644 tests/docker/dockerfiles/ubuntu2204.docker

-- 
2.39.2



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

* [PULL v2 01/24] tests: don't run socat tests on MacOS as well
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 02/24] tests: add socat dependency for tests Alex Bennée
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Daniel P. Berrangé

In preparation for the next patch when we enable socat for our CI
images we need to disable this part of the test for MacOS. The bug has
been raised here:

  https://gitlab.com/qemu-project/qemu/-/issues/1495

Once that is fixed we should re-enable the test.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-2-alex.bennee@linaro.org>

diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c
index 425e2f5594..04b75ab3b4 100644
--- a/tests/unit/test-io-channel-command.c
+++ b/tests/unit/test-io-channel-command.c
@@ -31,7 +31,7 @@
 
 static char *socat = NULL;
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(CONFIG_DARWIN)
 static void test_io_channel_command_fifo(bool async)
 {
     g_autofree gchar *tmpdir = g_dir_make_tmp("qemu-test-io-channel.XXXXXX", NULL);
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
 
     socat = g_find_program_in_path("socat");
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(CONFIG_DARWIN)
     g_test_add_func("/io/channel/command/fifo/sync",
                     test_io_channel_command_fifo_sync);
     g_test_add_func("/io/channel/command/fifo/async",
-- 
2.39.2



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

* [PULL v2 02/24] tests: add socat dependency for tests
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
  2023-03-01 15:15 ` [PULL v2 01/24] tests: don't run socat tests on MacOS as well Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 03/24] tests: be a bit more strict cleaning up fifos Alex Bennée
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Marc-André Lureau, Ed Maste, Li-Wen Hsu, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

We only use it for test-io-channel-command at the moment.
Unfortunately bringing socat into CI exposed an existing bug in the
test-io-channel-command unit test so we disabled it for MacOS in the
previous patch.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230228190653.1602033-3-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/freebsd-12.vars
index 8934e5d57f..44d8a2a511 100644
--- a/.gitlab-ci.d/cirrus/freebsd-12.vars
+++ b/.gitlab-ci.d/cirrus/freebsd-12.vars
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
 PACKAGING_COMMAND='pkg'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 zstd'
 PYPI_PKGS=''
 PYTHON='/usr/local/bin/python3'
diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/freebsd-13.vars
index 65ce456c48..7622c849b2 100644
--- a/.gitlab-ci.d/cirrus/freebsd-13.vars
+++ b/.gitlab-ci.d/cirrus/freebsd-13.vars
@@ -11,6 +11,6 @@ MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
 PACKAGING_COMMAND='pkg'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio spice-protocol tesseract usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bison bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage cmocka ctags curl cyrus-sasl dbus diffutils dtc flex fusefs-libs3 gettext git glib gmake gnutls gsed gtk3 json-c libepoxy libffi libgcrypt libjpeg-turbo libnfs libslirp libspice-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv pixman pkgconf png py39-numpy py39-pillow py39-pip py39-sphinx py39-sphinx_rtd_theme py39-yaml python3 rpm2cpio sdl2 sdl2_image snappy sndio socat spice-protocol tesseract usbredir virglrenderer vte3 zstd'
 PYPI_PKGS=''
 PYTHON='/usr/local/bin/python3'
diff --git a/.gitlab-ci.d/cirrus/macos-12.vars b/.gitlab-ci.d/cirrus/macos-12.vars
index 65b78fa08f..da6aa6469b 100644
--- a/.gitlab-ci.d/cirrus/macos-12.vars
+++ b/.gitlab-ci.d/cirrus/macos-12.vars
@@ -11,6 +11,6 @@ MAKE='/opt/homebrew/bin/gmake'
 NINJA='/opt/homebrew/bin/ninja'
 PACKAGING_COMMAND='brew'
 PIP3='/opt/homebrew/bin/pip3'
-PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract usbredir vde vte3 zlib zstd'
+PKGS='bash bc bison bzip2 capstone ccache cmocka ctags curl dbus diffutils dtc flex gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo json-c libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy socat sparse spice-protocol tesseract usbredir vde vte3 zlib zstd'
 PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme'
 PYTHON='/opt/homebrew/bin/python3'
diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 66c499c097..7589f6c6ed 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -94,6 +94,7 @@ RUN apk update && \
         sed \
         snappy-dev \
         sndio-dev \
+        socat \
         sparse \
         spice-dev \
         spice-protocol \
diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index 3c74be09a6..bab67ccd41 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -103,6 +103,7 @@ RUN dnf distro-sync -y && \
         rpm \
         sed \
         snappy-devel \
+        socat \
         spice-protocol \
         spice-server-devel \
         systemd-devel \
diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker
index 5175095a85..856db95100 100644
--- a/tests/docker/dockerfiles/debian-amd64-cross.docker
+++ b/tests/docker/dockerfiles/debian-amd64-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker
index b61f664ea2..e3dba71ad5 100644
--- a/tests/docker/dockerfiles/debian-amd64.docker
+++ b/tests/docker/dockerfiles/debian-amd64.docker
@@ -120,6 +120,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       systemtap-sdt-dev \
                       tar \
diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index b69958c69f..b00e9e9bcf 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index 96b524fab6..fb1129f256 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index 08a75cebdb..7a2b864a38 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index 5930e6fa5d..5a3340e964 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index c65d9830e7..422fdebe8f 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index 2ae56c978e..78d7ae6211 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index 0db86a0fcd..d06ea3605a 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       tar \
                       tesseract-ocr \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index 41769fc94a..5b66b0e256 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -52,6 +52,7 @@ exec "$@"' > /usr/bin/nosync && \
                python3-sphinx_rtd_theme \
                rpm \
                sed \
+               socat \
                sparse \
                spice-protocol \
                tar \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index 46d5d05763..b94fd63cca 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -52,6 +52,7 @@ exec "$@"' > /usr/bin/nosync && \
                python3-sphinx_rtd_theme \
                rpm \
                sed \
+               socat \
                sparse \
                spice-protocol \
                tar \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 5d60a96141..8e06d080b8 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -113,6 +113,7 @@ exec "$@"' > /usr/bin/nosync && \
                rpm \
                sed \
                snappy-devel \
+               socat \
                sparse \
                spice-protocol \
                spice-server-devel \
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 5b8dbf2b83..9bf9b50dad 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -97,6 +97,7 @@ RUN zypper update -y && \
            sed \
            snappy-devel \
            sndio-devel \
+           socat \
            sparse \
            spice-protocol-devel \
            systemd-devel \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 5b27b89f1c..936e4f9b2e 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -119,6 +119,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       python3-yaml \
                       rpm2cpio \
                       sed \
+                      socat \
                       sparse \
                       systemtap-sdt-dev \
                       tar \
diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml
index 6467bcf08a..2854748f49 100644
--- a/tests/lcitool/projects/qemu.yml
+++ b/tests/lcitool/projects/qemu.yml
@@ -101,6 +101,7 @@ packages:
  - sed
  - snappy
  - sndio
+ - socat
  - sparse
  - spice-protocol
  - spice-server
-- 
2.39.2



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

* [PULL v2 03/24] tests: be a bit more strict cleaning up fifos
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
  2023-03-01 15:15 ` [PULL v2 01/24] tests: don't run socat tests on MacOS as well Alex Bennée
  2023-03-01 15:15 ` [PULL v2 02/24] tests: add socat dependency for tests Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 04/24] tests: make fp-test less chatty when running from test suite Alex Bennée
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Thomas Huth, Richard Henderson, Daniel P. Berrangé

When we re-factored we dropped the unlink() step which turns out to be
required for rmdir to do its thing. If we had been checking the return
value we would have noticed so lets do that with this fix.

Fixes: 68406d1085 (tests/unit: cleanups for test-io-channel-command)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230228190653.1602033-4-alex.bennee@linaro.org>

diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c
index 04b75ab3b4..c6e66a8c33 100644
--- a/tests/unit/test-io-channel-command.c
+++ b/tests/unit/test-io-channel-command.c
@@ -42,6 +42,7 @@ static void test_io_channel_command_fifo(bool async)
     g_auto(GStrv) dstargv = g_strsplit(dstargs, " ", -1);
     QIOChannel *src, *dst;
     QIOChannelTest *test;
+    int err;
 
     if (mkfifo(fifo, 0600)) {
         g_error("mkfifo: %s", strerror(errno));
@@ -61,7 +62,10 @@ static void test_io_channel_command_fifo(bool async)
     object_unref(OBJECT(src));
     object_unref(OBJECT(dst));
 
-    g_rmdir(tmpdir);
+    err = g_unlink(fifo);
+    g_assert(err == 0);
+    err = g_rmdir(tmpdir);
+    g_assert(err == 0);
 }
 
 static void test_io_channel_command_fifo_async(void)
-- 
2.39.2



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

* [PULL v2 04/24] tests: make fp-test less chatty when running from test suite
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (2 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 03/24] tests: be a bit more strict cleaning up fifos Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs Alex Bennée
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth, Richard Henderson,
	Aurelien Jarno

As we like to run tests under CI with V=1 flags the softfloat tests
can add up to a fair amount of extra log lines. With an update to the
testfloat library we can now call fp-test with the -q flag and reduce
the output to a terse one line per function tested.

  make check-softfloat V=1 | wc -l
  759

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230228190653.1602033-5-alex.bennee@linaro.org>

diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c
index 35829ad5f7..36b5712cda 100644
--- a/tests/fp/fp-test.c
+++ b/tests/fp/fp-test.c
@@ -106,7 +106,8 @@ static const char commands_string[] =
     " -l = thoroughness level (1 (default), 2)\n"
     " -r = rounding mode (even (default), zero, down, up, tieaway, odd)\n"
     "      Set to 'all' to test all rounding modes, if applicable\n"
-    " -s = stop when a test fails";
+    " -s = stop when a test fails\n"
+    " -q = minimise noise when testing, just show each function being tested";
 
 static void usage_complete(int argc, char *argv[])
 {
@@ -190,9 +191,11 @@ static void do_testfloat(int op, int rmode, bool exact)
     ab_f128M_z_bool true_ab_f128M_z_bool;
     ab_f128M_z_bool subj_ab_f128M_z_bool;
 
-    fputs(">> Testing ", stderr);
-    verCases_writeFunctionName(stderr);
-    fputs("\n", stderr);
+    if (verCases_verbosity) {
+        fputs(">> Testing ", stderr);
+        verCases_writeFunctionName(stderr);
+        fputs("\n", stderr);
+    }
 
     if (!is_allowed(op, rmode)) {
         not_implemented();
@@ -837,7 +840,7 @@ static void parse_args(int argc, char *argv[])
     int c;
 
     for (;;) {
-        c = getopt(argc, argv, "he:f:l:r:s");
+        c = getopt(argc, argv, "he:f:l:r:sq");
         if (c < 0) {
             break;
         }
@@ -874,9 +877,15 @@ static void parse_args(int argc, char *argv[])
                 }
             }
             break;
+        /*
+         * The following flags are declared in testfloat/source/verCases_common.c
+         */
         case 's':
             verCases_errorStop = true;
             break;
+        case 'q':
+            verCases_verbosity = 0;
+            break;
         case '?':
             /* invalid option or missing argument; getopt prints error info */
             exit(EXIT_FAILURE);
diff --git a/tests/fp/berkeley-testfloat-3 b/tests/fp/berkeley-testfloat-3
index 5a59dcec19..40619cbb3b 160000
--- a/tests/fp/berkeley-testfloat-3
+++ b/tests/fp/berkeley-testfloat-3
@@ -1 +1 @@
-Subproject commit 5a59dcec19327396a011a17fd924aed4fec416b3
+Subproject commit 40619cbb3bf32872df8c53cc457039229428a263
diff --git a/tests/fp/meson.build b/tests/fp/meson.build
index 312a4d301f..f9ca6a93b4 100644
--- a/tests/fp/meson.build
+++ b/tests/fp/meson.build
@@ -609,7 +609,7 @@ softfloat_tests = {
 # The full test suite can take a bit of time, default to a quick run
 # "-l 2 -r all" can take more than a day for some operations and is best
 # run manually
-fptest_args = ['-s', '-l', '1']
+fptest_args = ['-q', '-s', '-l', '1']
 fptest_rounding_args = ['-r', 'all']
 
 # Conversion Routines:
-- 
2.39.2



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

* [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (3 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 04/24] tests: make fp-test less chatty when running from test suite Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 06/24] gitlab: extend custom runners with base_job_template Alex Bennée
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Thomas Huth, Daniel P . Berrangé,
	Alex Bennée, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal

From: Thomas Huth <thuth@redhat.com>

The meson log files can get very big, especially if running the tests in
verbose mode. So dumping those logs to the console was a bad idea, since
gitlab truncates the output if it is getting too big. Let's publish the
logs as artifacts instead. This has the disadvantage that you have to
look up the logs on cirrus-ci.com now instead, but that's still better
than not having the important part of the log at all since it got
truncated.

Fixes: 998f334722 ("gitlab: show testlog.txt contents ...")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230215142503.90660-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-6-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/cirrus/build.yml b/.gitlab-ci.d/cirrus/build.yml
index 7ef6af8d33..a9444902ec 100644
--- a/.gitlab-ci.d/cirrus/build.yml
+++ b/.gitlab-ci.d/cirrus/build.yml
@@ -32,6 +32,9 @@ build_task:
     - $MAKE -j$(sysctl -n hw.ncpu)
     - for TARGET in $TEST_TARGETS ;
       do
-        $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1
-        || { cat meson-logs/testlog.txt; exit 1; } ;
+        $MAKE -j$(sysctl -n hw.ncpu) $TARGET V=1 ;
       done
+  always:
+    build_result_artifacts:
+      path: build/meson-logs/*log.txt
+      type: text/plain
-- 
2.39.2



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

* [PULL v2 06/24] gitlab: extend custom runners with base_job_template
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (4 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 07/24] tests: don't run benchmarks for the tsan build Alex Bennée
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Beraldo Leal

The base job template is responsible for controlling how we kick off
testing on our various branches. Rename and extend the
custom_runner_template so we can take advantage of all that control.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230228190653.1602033-7-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.yml
index 9fdc476c48..34a1e6f327 100644
--- a/.gitlab-ci.d/custom-runners.yml
+++ b/.gitlab-ci.d/custom-runners.yml
@@ -15,7 +15,8 @@ variables:
 
 # All custom runners can extend this template to upload the testlog
 # data as an artifact and also feed the junit report
-.custom_artifacts_template:
+.custom_runner_template:
+  extends: .base_job_template
   artifacts:
     name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
     expire_in: 7 days
diff --git a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml
index f512eaeaa3..cdae6c5212 100644
--- a/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml
+++ b/.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml
@@ -3,7 +3,7 @@
 # "Install basic packages to build QEMU on Ubuntu 20.04/20.04"
 
 ubuntu-20.04-s390x-all-linux-static:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -24,7 +24,7 @@ ubuntu-20.04-s390x-all-linux-static:
  - make --output-sync -j`nproc` check
 
 ubuntu-20.04-s390x-all:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -43,7 +43,7 @@ ubuntu-20.04-s390x-all:
  - make --output-sync -j`nproc` check
 
 ubuntu-20.04-s390x-alldbg:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -66,7 +66,7 @@ ubuntu-20.04-s390x-alldbg:
  - make --output-sync -j`nproc` check
 
 ubuntu-20.04-s390x-clang:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -108,7 +108,7 @@ ubuntu-20.04-s390x-tci:
  - make --output-sync -j`nproc`
 
 ubuntu-20.04-s390x-notcg:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
diff --git a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml b/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml
index 42137aaf2a..50e5646a44 100644
--- a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml
+++ b/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml
@@ -3,7 +3,7 @@
 # "Install basic packages to build QEMU on Ubuntu 20.04"
 
 ubuntu-22.04-aarch32-all:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
diff --git a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml b/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml
index 8ba85be440..13e14a0f87 100644
--- a/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml
+++ b/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml
@@ -3,7 +3,7 @@
 # "Install basic packages to build QEMU on Ubuntu 20.04"
 
 ubuntu-22.04-aarch64-all-linux-static:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -24,7 +24,7 @@ ubuntu-22.04-aarch64-all-linux-static:
  - make --output-sync -j`nproc --ignore=40` check
 
 ubuntu-22.04-aarch64-all:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -46,7 +46,7 @@ ubuntu-22.04-aarch64-all:
  - make --output-sync -j`nproc --ignore=40` check
 
 ubuntu-22.04-aarch64-alldbg:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -65,7 +65,7 @@ ubuntu-22.04-aarch64-alldbg:
  - make --output-sync -j`nproc --ignore=40` check
 
 ubuntu-22.04-aarch64-clang:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
@@ -107,7 +107,7 @@ ubuntu-22.04-aarch64-tci:
  - make --output-sync -j`nproc --ignore=40`
 
 ubuntu-22.04-aarch64-notcg:
- extends: .custom_artifacts_template
+ extends: .custom_runner_template
  needs: []
  stage: build
  tags:
-- 
2.39.2



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

* [PULL v2 07/24] tests: don't run benchmarks for the tsan build
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (5 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 06/24] gitlab: extend custom runners with base_job_template Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204 Alex Bennée
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth, Richard Henderson,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Beraldo Leal

All we are really doing here is checking that TSAN builds compile and are
therefor a tool available to developers. The benchmarks are not
representative of QEMU's actual threading behaviour and they burn
precious CI time. Indeed switching to check-unit reveals many
unaddressed issues which have been logged at:

  https://gitlab.com/qemu-project/qemu/-/issues/1496

So for now disable the make check and make this a build only
test.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230228190653.1602033-8-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index d903c42798..7b92767689 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -463,7 +463,6 @@ tsan-build:
     CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
           --enable-trace-backends=ust --disable-slirp
     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
-    MAKE_CHECK_ARGS: bench V=1
 
 # gcov is a GCC features
 gcov:
-- 
2.39.2



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

* [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (6 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 07/24] tests: don't run benchmarks for the tsan build Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 09/24] tests: skip the nios2 replay_kernel test Alex Bennée
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, John Snow, Thomas Huth,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Beraldo Leal

The 22.04 LTS release has been out for almost a year now so its time
to update all the remaining images to the current LTS. We can also
drop some hacks we need for older clang TSAN support.

We will keep the ubuntu2004 container around for those who wish to
test builds on the currently still supported baseline.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230228190653.1602033-9-alex.bennee@linaro.org>

diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 362a26698b..4071e72710 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -588,13 +588,13 @@ https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual
 
 Thread Sanitizer in Docker
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
-TSan is currently supported in the ubuntu2004 docker.
+TSan is currently supported in the ubuntu2204 docker.
 
 The test-tsan test will build using TSan and then run make check.
 
 .. code::
 
-  make docker-test-tsan@ubuntu2004
+  make docker-test-tsan@ubuntu2204
 
 TSan warnings under docker are placed in files located at build/tsan/.
 
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 7b92767689..43f9e4a81d 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -38,9 +38,9 @@ avocado-system-alpine:
 build-system-ubuntu:
   extends: .native_build_job_template
   needs:
-    job: amd64-ubuntu2004-container
+    job: amd64-ubuntu2204-container
   variables:
-    IMAGE: ubuntu2004
+    IMAGE: ubuntu2204
     CONFIGURE_ARGS: --enable-docs
     TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
       microblazeel-softmmu mips64el-softmmu
@@ -56,7 +56,7 @@ check-system-ubuntu:
     - job: build-system-ubuntu
       artifacts: true
   variables:
-    IMAGE: ubuntu2004
+    IMAGE: ubuntu2204
     MAKE_CHECK_ARGS: check
 
 avocado-system-ubuntu:
@@ -65,7 +65,7 @@ avocado-system-ubuntu:
     - job: build-system-ubuntu
       artifacts: true
   variables:
-    IMAGE: ubuntu2004
+    IMAGE: ubuntu2204
     MAKE_CHECK_ARGS: check-avocado
 
 build-system-debian:
@@ -457,10 +457,10 @@ avocado-cfi-x86_64:
 tsan-build:
   extends: .native_build_job_template
   needs:
-    job: amd64-ubuntu2004-container
+    job: amd64-ubuntu2204-container
   variables:
-    IMAGE: ubuntu2004
-    CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
+    IMAGE: ubuntu2204
+    CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
           --enable-trace-backends=ust --disable-slirp
     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
 
@@ -468,10 +468,10 @@ tsan-build:
 gcov:
   extends: .native_build_job_template
   needs:
-    job: amd64-ubuntu2004-container
+    job: amd64-ubuntu2204-container
   timeout: 80m
   variables:
-    IMAGE: ubuntu2004
+    IMAGE: ubuntu2204
     CONFIGURE_ARGS: --enable-gcov
     TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
     MAKE_CHECK_ARGS: check
diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 96d2a3b58b..8637a13d86 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -13,10 +13,10 @@ amd64-debian-container:
   variables:
     NAME: debian-amd64
 
-amd64-ubuntu2004-container:
+amd64-ubuntu2204-container:
   extends: .container_job_template
   variables:
-    NAME: ubuntu2004
+    NAME: ubuntu2204
 
 amd64-opensuse-leap-container:
   extends: .container_job_template
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 936e4f9b2e..95d951953f 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -146,6 +146,3 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
-# Apply patch https://reviews.llvm.org/D75820
-# This is required for TSan in clang-10 to compile with QEMU.
-RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h
diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker
new file mode 100644
index 0000000000..30b9e56793
--- /dev/null
+++ b/tests/docker/dockerfiles/ubuntu2204.docker
@@ -0,0 +1,147 @@
+# THIS FILE WAS AUTO-GENERATED
+#
+#  $ lcitool dockerfile --layers all ubuntu-2204 qemu
+#
+# https://gitlab.com/libvirt/libvirt-ci
+
+FROM docker.io/library/ubuntu:22.04
+
+RUN export DEBIAN_FRONTEND=noninteractive && \
+    apt-get update && \
+    apt-get install -y eatmydata && \
+    eatmydata apt-get dist-upgrade -y && \
+    eatmydata apt-get install --no-install-recommends -y \
+                      bash \
+                      bc \
+                      bison \
+                      bsdextrautils \
+                      bzip2 \
+                      ca-certificates \
+                      ccache \
+                      clang \
+                      dbus \
+                      debianutils \
+                      diffutils \
+                      exuberant-ctags \
+                      findutils \
+                      flex \
+                      g++ \
+                      gcc \
+                      gcovr \
+                      genisoimage \
+                      gettext \
+                      git \
+                      hostname \
+                      libaio-dev \
+                      libasan5 \
+                      libasound2-dev \
+                      libattr1-dev \
+                      libbpf-dev \
+                      libbrlapi-dev \
+                      libbz2-dev \
+                      libc6-dev \
+                      libcacard-dev \
+                      libcap-ng-dev \
+                      libcapstone-dev \
+                      libcmocka-dev \
+                      libcurl4-gnutls-dev \
+                      libdaxctl-dev \
+                      libdrm-dev \
+                      libepoxy-dev \
+                      libfdt-dev \
+                      libffi-dev \
+                      libfuse3-dev \
+                      libgbm-dev \
+                      libgcrypt20-dev \
+                      libglib2.0-dev \
+                      libglusterfs-dev \
+                      libgnutls28-dev \
+                      libgtk-3-dev \
+                      libibumad-dev \
+                      libibverbs-dev \
+                      libiscsi-dev \
+                      libjemalloc-dev \
+                      libjpeg-turbo8-dev \
+                      libjson-c-dev \
+                      liblttng-ust-dev \
+                      liblzo2-dev \
+                      libncursesw5-dev \
+                      libnfs-dev \
+                      libnuma-dev \
+                      libpam0g-dev \
+                      libpcre2-dev \
+                      libpixman-1-dev \
+                      libpmem-dev \
+                      libpng-dev \
+                      libpulse-dev \
+                      librbd-dev \
+                      librdmacm-dev \
+                      libsasl2-dev \
+                      libsdl2-dev \
+                      libsdl2-image-dev \
+                      libseccomp-dev \
+                      libselinux1-dev \
+                      libslirp-dev \
+                      libsnappy-dev \
+                      libsndio-dev \
+                      libspice-protocol-dev \
+                      libspice-server-dev \
+                      libssh-dev \
+                      libsystemd-dev \
+                      libtasn1-6-dev \
+                      libubsan1 \
+                      libudev-dev \
+                      liburing-dev \
+                      libusb-1.0-0-dev \
+                      libusbredirhost-dev \
+                      libvdeplug-dev \
+                      libvirglrenderer-dev \
+                      libvte-2.91-dev \
+                      libxen-dev \
+                      libzstd-dev \
+                      llvm \
+                      locales \
+                      make \
+                      meson \
+                      multipath-tools \
+                      ncat \
+                      nettle-dev \
+                      ninja-build \
+                      openssh-client \
+                      pkgconf \
+                      python3 \
+                      python3-numpy \
+                      python3-opencv \
+                      python3-pillow \
+                      python3-pip \
+                      python3-sphinx \
+                      python3-sphinx-rtd-theme \
+                      python3-venv \
+                      python3-yaml \
+                      rpm2cpio \
+                      sed \
+                      socat \
+                      sparse \
+                      systemtap-sdt-dev \
+                      tar \
+                      tesseract-ocr \
+                      tesseract-ocr-eng \
+                      xfslibs-dev \
+                      zlib1g-dev && \
+    eatmydata apt-get autoremove -y && \
+    eatmydata apt-get autoclean -y && \
+    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
+    dpkg-reconfigure locales && \
+    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
+    mkdir -p /usr/libexec/ccache-wrappers && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
diff --git a/tests/docker/test-tsan b/tests/docker/test-tsan
index 53d90d2f79..f6d6590e39 100755
--- a/tests/docker/test-tsan
+++ b/tests/docker/test-tsan
@@ -21,7 +21,7 @@ setup_tsan()
     tsan_log_dir="/tmp/qemu-test/build/tsan"
     mkdir -p $tsan_log_dir > /dev/null || true
     EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-tsan \
-                          --cc=clang-10 --cxx=clang++-10 \
+                          --cc=clang --cxx=clang++ \
                           --disable-werror --extra-cflags=-O0"
     # detect deadlocks is false currently simply because
     # TSan crashes immediately with deadlock detector enabled.
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index a5ea0efc3b..cc9e34ac87 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -69,13 +69,6 @@ def generate_cirrus(target, trailer=None):
     generate(filename, cmd, trailer)
 
 
-ubuntu2004_tsanhack = [
-    "# Apply patch https://reviews.llvm.org/D75820\n",
-    "# This is required for TSan in clang-10 to compile with QEMU.\n",
-    "RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h\n"
-]
-
-
 # Netmap still needs to be manually built as it is yet to be packaged
 # into a distro. We also add cscope and gtags which are used in the CI
 # test
@@ -113,8 +106,8 @@ try:
                         trailer="".join(debian11_extras))
     generate_dockerfile("fedora", "fedora-37")
     generate_dockerfile("opensuse-leap", "opensuse-leap-153")
-    generate_dockerfile("ubuntu2004", "ubuntu-2004",
-                        trailer="".join(ubuntu2004_tsanhack))
+    generate_dockerfile("ubuntu2004", "ubuntu-2004")
+    generate_dockerfile("ubuntu2204", "ubuntu-2204")
 
     #
     # Cross compiling builds
-- 
2.39.2



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

* [PULL v2 09/24] tests: skip the nios2 replay_kernel test
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (7 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204 Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 10/24] tests: add tuxrun baseline test to avocado Alex Bennée
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Pavel Dovgalyuk, Paolo Bonzini, Cleber Rosa,
	Wainer dos Santos Moschetta, Beraldo Leal

It is buggy and keeps failing.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-10-alex.bennee@linaro.org>

diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index 00a26e4a0c..f13456e1ec 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -349,6 +349,7 @@ def test_or1k_sim(self):
         file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
         self.do_test_advcal_2018(file_path, 'vmlinux')
 
+    @skip("nios2 emulation is buggy under record/replay")
     def test_nios2_10m50(self):
         """
         :avocado: tags=arch:nios2
-- 
2.39.2



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

* [PULL v2 10/24] tests: add tuxrun baseline test to avocado
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (8 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 09/24] tests: skip the nios2 replay_kernel test Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross Alex Bennée
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Anders Roxell, Thomas Huth,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Beraldo Leal, Cleber Rosa

The TuxRun project (www.tuxrun.org) uses QEMU to run tests on a wide
variety of kernel configurations on wide range of our emulated
platforms. They publish a known good set of images at:

  https://storage.tuxboot.com/

to help with bisecting regressions in either the kernel, firmware or
QEMU itself. The tests are pretty lightweight as they contain just a
kernel with a minimal rootfs which boots a lot faster than most of the
distros. In time they might be persuaded to version their known good
baselines and we can then enable proper checksums.

For a couple of tests we currently skip:

  - mips64, a regression against previous stable release
  - sh4, very unstable with intermittent oops

Total run time: 340s (default) -> 890s (debug)

Overall coverage rate (tested targets + disabled tests):
  lines......: 16.1% (126894 of 789848 lines)
  functions..: 20.6% (15954 of 77489 functions)
  branches...: 9.3% (40727 of 439365 branches)

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Anders Roxell <anders.roxell@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-11-alex.bennee@linaro.org>

diff --git a/MAINTAINERS b/MAINTAINERS
index e96e9dbfe6..76662969d7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3766,6 +3766,7 @@ F: scripts/ci/
 F: tests/docker/
 F: tests/vm/
 F: tests/lcitool/
+F: tests/avocado/tuxrun_baselines.py
 F: scripts/archive-source.sh
 F: docs/devel/testing.rst
 W: https://gitlab.com/qemu-project/qemu/pipelines
diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py
new file mode 100644
index 0000000000..30aaefc1d3
--- /dev/null
+++ b/tests/avocado/tuxrun_baselines.py
@@ -0,0 +1,423 @@
+# Functional test that boots known good tuxboot images the same way
+# that tuxrun (www.tuxrun.org) does. This tool is used by things like
+# the LKFT project to run regression tests on kernels.
+#
+# Copyright (c) 2023 Linaro Ltd.
+#
+# Author:
+#  Alex Bennée <alex.bennee@linaro.org>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+import time
+
+from avocado import skip, skipIf
+from avocado_qemu import QemuSystemTest
+from avocado_qemu import exec_command, exec_command_and_wait_for_pattern
+from avocado_qemu import wait_for_console_pattern
+from avocado.utils import process
+from avocado.utils.path import find_command
+
+class TuxRunBaselineTest(QemuSystemTest):
+    """
+    :avocado: tags=accel:tcg
+    """
+
+    KERNEL_COMMON_COMMAND_LINE = 'printk.time=0'
+    # Tests are ~10-40s, allow for --debug/--enable-gcov overhead
+    timeout = 100
+
+    def get_tag(self, tagname, default=None):
+        """
+        Get the metadata tag or return the default.
+        """
+        utag = self._get_unique_tag_val(tagname)
+        print(f"{tagname}/{default} -> {utag}")
+        if utag:
+            return utag
+
+        return default
+
+    def setUp(self):
+        super().setUp()
+
+        # We need zstd for all the tuxrun tests
+        # See https://github.com/avocado-framework/avocado/issues/5609
+        zstd = find_command('zstd', False)
+        if zstd is False:
+            self.cancel('Could not find "zstd", which is required to '
+                        'decompress rootfs')
+        self.zstd = zstd
+
+        # Process the TuxRun specific tags, most machines work with
+        # reasonable defaults but we sometimes need to tweak the
+        # config. To avoid open coding everything we store all these
+        # details in the metadata for each test.
+
+        # The tuxboot tag matches the root directory
+        self.tuxboot = self.get_tag('tuxboot')
+
+        # Most Linux's use ttyS0 for their serial port
+        self.console = self.get_tag('console', "ttyS0")
+
+        # Does the machine shutdown QEMU nicely on "halt"
+        self.shutdown = self.get_tag('shutdown')
+
+        # The name of the kernel Image file
+        self.image = self.get_tag('image', "Image")
+
+        # The block device drive type
+        self.drive = self.get_tag('drive', "virtio-blk-device")
+
+        self.root = self.get_tag('root', "vda")
+
+        # Occasionally we need extra devices to hook things up
+        self.extradev = self.get_tag('extradev')
+
+    def wait_for_console_pattern(self, success_message, vm=None):
+        wait_for_console_pattern(self, success_message,
+                                 failure_message='Kernel panic - not syncing',
+                                 vm=vm)
+
+    def fetch_tuxrun_assets(self, dt=None):
+        """
+        Fetch the TuxBoot assets. They are stored in a standard way so we
+        use the per-test tags to fetch details.
+        """
+        base_url = f"https://storage.tuxboot.com/{self.tuxboot}/"
+        kernel_image =  self.fetch_asset(base_url + self.image)
+        disk_image_zst = self.fetch_asset(base_url + "rootfs.ext4.zst")
+
+        cmd = f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs.ext4"
+        process.run(cmd)
+
+        if dt:
+            dtb = self.fetch_asset(base_url + dt)
+        else:
+            dtb = None
+
+        return (kernel_image, self.workdir + "/rootfs.ext4", dtb)
+
+    def prepare_run(self, kernel, disk, dtb=None, console_index=0):
+        """
+        Setup to run and add the common parameters to the system
+        """
+        self.vm.set_console(console_index=console_index)
+
+        # all block devices are raw ext4's
+        blockdev = "driver=raw,file.driver=file," \
+            + f"file.filename={disk},node-name=hd0"
+
+        kcmd_line = self.KERNEL_COMMON_COMMAND_LINE
+        kcmd_line += f" root=/dev/{self.root}"
+        kcmd_line += f" console={self.console}"
+
+        self.vm.add_args('-kernel', kernel,
+                         '-append', kcmd_line,
+                         '-blockdev', blockdev)
+
+        # Sometimes we need extra devices attached
+        if self.extradev:
+            self.vm.add_args('-device', self.extradev)
+
+        # Some machines already define a drive device
+        if self.drive != "none":
+            self.vm.add_args('-device',
+                             f"{self.drive},drive=hd0")
+
+        # Some machines need an explicit DTB
+        if dtb:
+            self.vm.add_args('-dtb', dtb)
+
+    def run_tuxtest_tests(self, haltmsg):
+        """
+        Wait for the system to boot up, wait for the login prompt and
+        then do a few things on the console. Trigger a shutdown and
+        wait to exit cleanly.
+        """
+        self.wait_for_console_pattern("Welcome to TuxTest")
+        time.sleep(0.2)
+        exec_command(self, 'root')
+        time.sleep(0.2)
+        exec_command(self, 'cat /proc/interrupts')
+        time.sleep(0.1)
+        exec_command(self, 'cat /proc/self/maps')
+        time.sleep(0.1)
+        exec_command(self, 'uname -a')
+        time.sleep(0.1)
+        exec_command_and_wait_for_pattern(self, 'halt', haltmsg)
+
+        # Wait for VM to shut down gracefully if it can
+        if self.shutdown == "nowait":
+            self.vm.shutdown()
+        else:
+            self.vm.wait()
+
+    def common_tuxrun(self, dt=None, haltmsg="reboot: System halted",
+                      console_index=0):
+        """
+        Common path for LKFT tests. Unless we need to do something
+        special with the command line we can process most things using
+        the tag metadata.
+        """
+        (kernel, disk, dtb) = self.fetch_tuxrun_assets(dt)
+
+        self.prepare_run(kernel, disk, dtb, console_index)
+        self.vm.launch()
+        self.run_tuxtest_tests(haltmsg)
+
+    #
+    # The tests themselves. The configuration is derived from how
+    # tuxrun invokes qemu (with minor tweaks like using -blockdev
+    # consistently). The tuxrun equivalent is something like:
+    #
+    # tuxrun --device qemu-{ARCH} \
+    #        --kernel https://storage.tuxboot.com/{TUXBOOT}/{IMAGE}
+    #
+
+    def test_arm64(self):
+        """
+        :avocado: tags=arch:aarch64
+        :avocado: tags=cpu:cortex-a57
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:arm64
+        :avocado: tags=console:ttyAMA0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_arm64be(self):
+        """
+        :avocado: tags=arch:aarch64
+        :avocado: tags=cpu:cortex-a57
+        :avocado: tags=endian:big
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:arm64be
+        :avocado: tags=console:ttyAMA0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_armv5(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=cpu:arm926
+        :avocado: tags=machine:versatilepb
+        :avocado: tags=tuxboot:armv5
+        :avocado: tags=image:zImage
+        :avocado: tags=drive:virtio-blk-pci
+        :avocado: tags=console:ttyAMA0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun(dt="versatile-pb.dtb")
+
+    def test_armv7(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=cpu:cortex-a15
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:armv7
+        :avocado: tags=image:zImage
+        :avocado: tags=console:ttyAMA0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_armv7be(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=cpu:cortex-a15
+        :avocado: tags=endian:big
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:armv7be
+        :avocado: tags=image:zImage
+        :avocado: tags=console:ttyAMA0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_i386(self):
+        """
+        :avocado: tags=arch:i386
+        :avocado: tags=cpu:coreduo
+        :avocado: tags=machine:q35
+        :avocado: tags=tuxboot:i386
+        :avocado: tags=image:bzImage
+        :avocado: tags=drive:virtio-blk-pci
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_mips32(self):
+        """
+        :avocado: tags=arch:mips
+        :avocado: tags=machine:malta
+        :avocado: tags=cpu:mips32r6-generic
+        :avocado: tags=endian:big
+        :avocado: tags=tuxboot:mips32
+        :avocado: tags=image:vmlinux
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=root:sda
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_mips32el(self):
+        """
+        :avocado: tags=arch:mipsel
+        :avocado: tags=machine:malta
+        :avocado: tags=cpu:mips32r6-generic
+        :avocado: tags=tuxboot:mips32el
+        :avocado: tags=image:vmlinux
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=root:sda
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    @skip("QEMU currently broken") # regression against stable QEMU
+    def test_mips64(self):
+        """
+        :avocado: tags=arch:mips64
+        :avocado: tags=machine:malta
+        :avocado: tags=tuxboot:mips64
+        :avocado: tags=endian:big
+        :avocado: tags=image:vmlinux
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=root:sda
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_mips64el(self):
+        """
+        :avocado: tags=arch:mips64el
+        :avocado: tags=machine:malta
+        :avocado: tags=tuxboot:mips64el
+        :avocado: tags=image:vmlinux
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=root:sda
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_ppc32(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=machine:ppce500
+        :avocado: tags=cpu:e500mc
+        :avocado: tags=tuxboot:ppc32
+        :avocado: tags=image:uImage
+        :avocado: tags=drive:virtio-blk-pci
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_ppc64(self):
+        """
+        :avocado: tags=arch:ppc64
+        :avocado: tags=machine:pseries
+        :avocado: tags=cpu:POWER8
+        :avocado: tags=endian:big
+        :avocado: tags=console:hvc0
+        :avocado: tags=tuxboot:ppc64
+        :avocado: tags=image:vmlinux
+        :avocado: tags=extradev:driver=spapr-vscsi
+        :avocado: tags=drive:scsi-hd
+        :avocado: tags=root:sda
+        """
+        self.common_tuxrun()
+
+    def test_ppc64le(self):
+        """
+        :avocado: tags=arch:ppc64
+        :avocado: tags=machine:pseries
+        :avocado: tags=cpu:POWER8
+        :avocado: tags=console:hvc0
+        :avocado: tags=tuxboot:ppc64le
+        :avocado: tags=image:vmlinux
+        :avocado: tags=extradev:driver=spapr-vscsi
+        :avocado: tags=drive:scsi-hd
+        :avocado: tags=root:sda
+        """
+        self.common_tuxrun()
+
+    def test_riscv32(self):
+        """
+        :avocado: tags=arch:riscv32
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:riscv32
+        """
+        self.common_tuxrun()
+
+    def test_riscv64(self):
+        """
+        :avocado: tags=arch:riscv64
+        :avocado: tags=machine:virt
+        :avocado: tags=tuxboot:riscv64
+        """
+        self.common_tuxrun()
+
+    def test_s390(self):
+        """
+        :avocado: tags=arch:s390x
+        :avocado: tags=endian:big
+        :avocado: tags=tuxboot:s390
+        :avocado: tags=image:bzImage
+        :avocado: tags=drive:virtio-blk-ccw
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun(haltmsg="Requesting system halt")
+
+    # Note: some segfaults caused by unaligned userspace access
+    @skipIf(os.getenv('GITLAB_CI'), 'Skipping unstable test on GitLab')
+    def test_sh4(self):
+        """
+        :avocado: tags=arch:sh4
+        :avocado: tags=machine:r2d
+        :avocado: tags=cpu:sh7785
+        :avocado: tags=tuxboot:sh4
+        :avocado: tags=image:zImage
+        :avocado: tags=root:sda
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=console:ttySC1
+        """
+        # The test is currently too unstable to do much in userspace
+        # so we skip common_tuxrun and do a minimal boot and shutdown.
+        (kernel, disk, dtb) = self.fetch_tuxrun_assets()
+
+        # the console comes on the second serial port
+        self.prepare_run(kernel, disk, console_index=1)
+        self.vm.launch()
+
+        self.wait_for_console_pattern("Welcome to TuxTest")
+        time.sleep(0.1)
+        exec_command(self, 'root')
+        time.sleep(0.1)
+        exec_command_and_wait_for_pattern(self, 'halt',
+                                          "reboot: System halted")
+
+    def test_sparc64(self):
+        """
+        :avocado: tags=arch:sparc64
+        :avocado: tags=tuxboot:sparc64
+        :avocado: tags=image:vmlinux
+        :avocado: tags=root:sda
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
+
+    def test_x86_64(self):
+        """
+        :avocado: tags=arch:x86_64
+        :avocado: tags=machine:q35
+        :avocado: tags=cpu:Nehalem
+        :avocado: tags=tuxboot:x86_64
+        :avocado: tags=image:bzImage
+        :avocado: tags=root:sda
+        :avocado: tags=drive:driver=ide-hd,bus=ide.0,unit=0
+        :avocado: tags=shutdown:nowait
+        """
+        self.common_tuxrun()
-- 
2.39.2



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

* [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (9 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 10/24] tests: add tuxrun baseline test to avocado Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 12/24] tests: ensure we export job results for some cross builds Alex Bennée
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Bastian Koppelmann, Alex Bennée,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

since binutils is pretty old, it fails our CI repeatedly during the
compilation of tricore-binutils. We created a precompiled version using
the debian docker image and download it instead of building it ourself.

We also updated the package to include a newer version of binutils, gcc,
and newlib. The default TriCore ISA version used by tricore-as changed
from the old version, so we have to specify it now. If we don't
'test_fadd' fails with 'unknown opcode'.

The new assembler also picks a new encoding in ld.h which fails the
'test_ld_h' test. We fix that by using the newest TriCore CPU for QEMU.

The old assembler accepted an extra ')' in 'test_imask'. The new one
does not, so lets remove it.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20230209145812.46730-1-kbastian@mail.uni-paderborn.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-12-alex.bennee@linaro.org>

diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h
index ec4f5bff52..3df2e0de82 100644
--- a/tests/tcg/tricore/macros.h
+++ b/tests/tcg/tricore/macros.h
@@ -174,7 +174,7 @@ test_ ## num:                                                    \
     TEST_CASE_E(num, res_lo, res_hi,                           \
     LI(DREG_RS1, rs1);                                         \
     rstv;                                                      \
-    insn EREG_CALC_RESULT, imm1, DREG_RS1, imm2);              \
+    insn EREG_CALC_RESULT, imm1, DREG_RS1, imm2;               \
     )
 
 
diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
index 5ae58efa09..82e4576485 100644
--- a/tests/docker/dockerfiles/debian-tricore-cross.docker
+++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
@@ -20,6 +20,7 @@ RUN apt update && \
        bzip2 \
        ca-certificates \
        ccache \
+       curl \
        flex \
        g++ \
        gcc \
@@ -34,13 +35,8 @@ RUN apt update && \
        python3-setuptools \
        python3-wheel
 
-RUN git clone --single-branch \
-        https://github.com/bkoppelmann/tricore-binutils.git \
-        /usr/src/binutils && \
-    cd /usr/src/binutils && chmod +x missing && \
-    CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
-    make && make install && \
-    rm -rf /usr/src/binutils
+RUN curl -#SL https://github.com/bkoppelmann/package_940/releases/download/tricore-toolchain-9.40/tricore-toolchain-9.4.0.tar.gz \
+    | tar -xzC /usr/local/
 
 # This image can only build a very minimal QEMU as well as the tests
 ENV DEF_TARGET_LIST tricore-softmmu
diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target
index d2446af8b4..b3cd56fffc 100644
--- a/tests/tcg/tricore/Makefile.softmmu-target
+++ b/tests/tcg/tricore/Makefile.softmmu-target
@@ -1,7 +1,7 @@
 TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore
 
-LDFLAGS = -T$(TESTS_PATH)/link.ld
-ASFLAGS =
+LDFLAGS = -T$(TESTS_PATH)/link.ld --mcpu=tc162
+ASFLAGS = -mtc162
 
 TESTS += test_abs.tst
 TESTS += test_bmerge.tst
@@ -19,7 +19,7 @@ TESTS += test_madd.tst
 TESTS += test_msub.tst
 TESTS += test_muls.tst
 
-QEMU_OPTS += -M tricore_testboard -nographic -kernel
+QEMU_OPTS += -M tricore_testboard -cpu tc27x -nographic -kernel
 
 %.pS: $(TESTS_PATH)/%.S
 	$(HOST_CC) -E -o $@ $<
-- 
2.39.2



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

* [PULL v2 12/24] tests: ensure we export job results for some cross builds
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (10 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task Alex Bennée
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Thomas Huth,
	Philippe Mathieu-Daudé, Wainer dos Santos Moschetta,
	Beraldo Leal

We do run tests on some cross builds. Provide a template to ensure we
export the testlog to the build artefacts and report the test results
via the junit.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230228190653.1602033-13-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml
index d07989e3b0..4f93b9e4e5 100644
--- a/.gitlab-ci.d/crossbuild-template.yml
+++ b/.gitlab-ci.d/crossbuild-template.yml
@@ -49,3 +49,14 @@
           nios2-linux-user or1k-linux-user ppc-linux-user sparc-linux-user
           xtensa-linux-user $CROSS_SKIP_TARGETS"
     - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
+
+# We can still run some tests on some of our cross build jobs. They can add this
+# template to their extends to save the build logs and test results
+.cross_test_artifacts:
+  artifacts:
+    name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
+    expire_in: 7 days
+    paths:
+      - build/meson-logs/testlog.txt
+    reports:
+      junit: build/meson-logs/testlog.junit.xml
diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml
index 101416080c..d3a31a2112 100644
--- a/.gitlab-ci.d/crossbuilds.yml
+++ b/.gitlab-ci.d/crossbuilds.yml
@@ -44,7 +44,9 @@ cross-arm64-user:
     IMAGE: debian-arm64-cross
 
 cross-i386-system:
-  extends: .cross_system_build_job
+  extends:
+    - .cross_system_build_job
+    - .cross_test_artifacts
   needs:
     job: i386-fedora-cross-container
   variables:
@@ -52,7 +54,9 @@ cross-i386-system:
     MAKE_CHECK_ARGS: check-qtest
 
 cross-i386-user:
-  extends: .cross_user_build_job
+  extends:
+    - .cross_user_build_job
+    - .cross_test_artifacts
   needs:
     job: i386-fedora-cross-container
   variables:
@@ -60,7 +64,9 @@ cross-i386-user:
     MAKE_CHECK_ARGS: check
 
 cross-i386-tci:
-  extends: .cross_accel_build_job
+  extends:
+    - .cross_accel_build_job
+    - .cross_test_artifacts
   timeout: 60m
   needs:
     job: i386-fedora-cross-container
-- 
2.39.2



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

* [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (11 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 12/24] tests: ensure we export job results for some cross builds Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references Alex Bennée
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Thomas Huth, Alex Bennée,
	Philippe Mathieu-Daudé, Yonggang Luo

From: Thomas Huth <thuth@redhat.com>

There's no need to run a full-blown bash just to create a directory.
And we can skip the "cd build" each time by doing it once at the
beginning.

Additionally, let's exclude some targets (that we already compile-test
with MinGW in the gitlab jobs) from the build, since the build time of
this task is very long already (between 80 and 90 minutes).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230208103046.618154-1-thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-14-alex.bennee@linaro.org>

diff --git a/.cirrus.yml b/.cirrus.yml
index 4895987da4..5fb00da73d 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -100,9 +100,11 @@ windows_msys2_task:
       tar xf C:\tools\archive\msys64.tar
       Write-Output "Extract msys2 time taken: $((Get-Date).Subtract($start_time))"
   script:
-    - C:\tools\msys64\usr\bin\bash.exe -lc "mkdir build"
-    - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && ../configure --python=python3"
-    - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j8"
+    - mkdir build
+    - cd build
+    - C:\tools\msys64\usr\bin\bash.exe -lc "../configure --python=python3
+        --target-list-exclude=i386-softmmu,ppc64-softmmu,aarch64-softmmu,mips64-softmmu,mipsel-softmmu,sh4-softmmu"
+    - C:\tools\msys64\usr\bin\bash.exe -lc "make -j8"
     - exit $LastExitCode
   test_script:
     - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
-- 
2.39.2



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

* [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (12 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 15/24] gitlab: Use plain docker in container-template.yml Alex Bennée
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

We use the debian release number elsewhere so fix it for consistency
along with the broken comment.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230228190653.1602033-15-alex.bennee@linaro.org>

diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker
index 6c73408b34..dc9545857f 100644
--- a/tests/docker/dockerfiles/debian-toolchain.docker
+++ b/tests/docker/dockerfiles/debian-toolchain.docker
@@ -30,7 +30,7 @@ ADD build-toolchain.sh /root/build-toolchain.sh
 RUN cd /root && ./build-toolchain.sh
 
 # Throw away the extra toolchain build deps, the downloaded source,
-# and the build trees by restoring the original debian10 image,
+# and the build trees by restoring the original image,
 # then copying the built toolchain from stage 0.
-FROM docker.io/library/debian:bullseye-slim
+FROM docker.io/library/debian:11-slim
 COPY --from=0 /usr/local /usr/local
-- 
2.39.2



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

* [PULL v2 15/24] gitlab: Use plain docker in container-template.yml
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (13 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 16/24] tests: Ensure TAP version is printed before other messages Alex Bennée
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Fabiano Rosas, Daniel P . Berrangé,
	Alex Bennée, Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

From: Fabiano Rosas <farosas@suse.de>

Our dockerfiles no longer reference layers from other qemu images so
we can now use 'docker build' on them.

Also reinstate the caching that was disabled due to bad interactions
with certain runners. See commit 6ddc3dc7a8 ("tests/docker: don't use
BUILDKIT in GitLab either"). We now believe those issues to be fixed.

The COMMON_TAG needed to be fixed for the caching to work. The
docker.py script was not using the variable, but constructing the
correct URL directly.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230227151110.31455-2-farosas@suse.de>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-16-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/container-template.yml b/.gitlab-ci.d/container-template.yml
index c434b9c8f3..519b8a9482 100644
--- a/.gitlab-ci.d/container-template.yml
+++ b/.gitlab-ci.d/container-template.yml
@@ -6,17 +6,16 @@
     - docker:dind
   before_script:
     - export TAG="$CI_REGISTRY_IMAGE/qemu/$NAME:latest"
-    - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/$NAME:latest"
+    - export COMMON_TAG="$CI_REGISTRY/qemu-project/qemu/qemu/$NAME:latest"
     - apk add python3
     - docker info
     - docker login $CI_REGISTRY -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
   script:
     - echo "TAG:$TAG"
     - echo "COMMON_TAG:$COMMON_TAG"
-    - ./tests/docker/docker.py --engine docker build
-          -t "qemu/$NAME" -f "tests/docker/dockerfiles/$NAME.docker"
-          -r $CI_REGISTRY/qemu-project/qemu
-    - docker tag "qemu/$NAME" "$TAG"
+    - docker build --tag "$TAG" --cache-from "$TAG" --cache-from "$COMMON_TAG"
+      --build-arg BUILDKIT_INLINE_CACHE=1
+      -f "tests/docker/dockerfiles/$NAME.docker" "."
     - docker push "$TAG"
   after_script:
     - docker logout
-- 
2.39.2



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

* [PULL v2 16/24] tests: Ensure TAP version is printed before other messages
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (14 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 15/24] gitlab: Use plain docker in container-template.yml Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 17/24] configure: expose the direct container command Alex Bennée
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Richard W.M. Jones, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Alexander Bulekov, Darren Kenny,
	Alex Bennée, Thomas Huth, Paolo Bonzini, Fam Zheng,
	Bandan Das, Stefan Hajnoczi, Qiuhao Li, Laurent Vivier

From: "Richard W.M. Jones" <rjones@redhat.com>

These two tests were failing with this error:

  stderr:
  TAP parsing error: version number must be on the first line
  [...]
  Unknown TAP version. The first line MUST be `TAP version <int>`. Assuming version 12.

This can be fixed by ensuring we always call g_test_init first in the
body of main.

Thanks: Daniel Berrange, for diagnosing the problem
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20230227174019.1164205-1-rjones@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230228190653.1602033-17-alex.bennee@linaro.org>

diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c895a-test.c
index a9254b455d..2012bd54b7 100644
--- a/tests/qtest/fuzz-lsi53c895a-test.c
+++ b/tests/qtest/fuzz-lsi53c895a-test.c
@@ -112,12 +112,12 @@ static void test_lsi_do_dma_empty_queue(void)
 
 int main(int argc, char **argv)
 {
+    g_test_init(&argc, &argv, NULL);
+
     if (!qtest_has_device("lsi53c895a")) {
         return 0;
     }
 
-    g_test_init(&argc, &argv, NULL);
-
     qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue",
                    test_lsi_do_dma_empty_queue);
 
diff --git a/tests/qtest/rtl8139-test.c b/tests/qtest/rtl8139-test.c
index 1beb83805c..4bd240e9ee 100644
--- a/tests/qtest/rtl8139-test.c
+++ b/tests/qtest/rtl8139-test.c
@@ -207,9 +207,10 @@ int main(int argc, char **argv)
         verbosity_level = atoi(v_env);
     }
 
+    g_test_init(&argc, &argv, NULL);
+
     qtest_start("-device rtl8139");
 
-    g_test_init(&argc, &argv, NULL);
     qtest_add_func("/rtl8139/nop", nop);
     qtest_add_func("/rtl8139/timer", test_init);
 
-- 
2.39.2



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

* [PULL v2 17/24] configure: expose the direct container command
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (15 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 16/24] tests: Ensure TAP version is printed before other messages Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles Alex Bennée
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Daniel P . Berrangé, Paolo Bonzini, Thomas Huth

In the process of migrating away from using docker.py to build our
containers we need to expose the command to the build environment. The
script is still a useful way to probe which command works though.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-18-alex.bennee@linaro.org>

diff --git a/configure b/configure
index 2a8a9be8a1..f5cfcd566e 100755
--- a/configure
+++ b/configure
@@ -1790,6 +1790,7 @@ fi
 # functions to probe cross compilers
 
 container="no"
+runc=""
 if test $use_containers = "yes" && (has "docker" || has "podman"); then
     case $($python "$source_path"/tests/docker/docker.py probe) in
         *docker) container=docker ;;
@@ -1798,6 +1799,7 @@ if test $use_containers = "yes" && (has "docker" || has "podman"); then
     esac
     if test "$container" != "no"; then
         docker_py="$python $source_path/tests/docker/docker.py --engine $container"
+        runc=$($python "$source_path"/tests/docker/docker.py probe)
     fi
 fi
 
@@ -2397,6 +2399,7 @@ fi
 
 if test "$container" != no; then
     echo "ENGINE=$container" >> $config_host_mak
+    echo "RUNC=$runc" >> $config_host_mak
 fi
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
-- 
2.39.2



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

* [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (16 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 17/24] configure: expose the direct container command Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:15 ` [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images Alex Bennée
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

For the cross-compilation use-case it is important to add the host
user to the dockerfile so we can map them to the docker environment
when cross-building files.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230228190653.1602033-19-alex.bennee@linaro.org>

diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 7589f6c6ed..799932bcc9 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -124,3 +124,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index bab67ccd41..d87a94b97b 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -138,3 +138,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3.8"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker
index 856db95100..5d03b5c22d 100644
--- a/tests/docker/dockerfiles/debian-amd64-cross.docker
+++ b/tests/docker/dockerfiles/debian-amd64-cross.docker
@@ -169,3 +169,8 @@ ENV ABI "x86_64-linux-gnu"
 ENV MESON_OPTS "--cross-file=x86_64-linux-gnu"
 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
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker
index e3dba71ad5..febc46e700 100644
--- a/tests/docker/dockerfiles/debian-amd64.docker
+++ b/tests/docker/dockerfiles/debian-amd64.docker
@@ -155,3 +155,8 @@ RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap
 RUN cd /usr/src/netmap && git checkout v11.3
 RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install
 ENV QEMU_CONFIGURE_OPTS --enable-netmap
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index b00e9e9bcf..b9501a21bc 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -168,3 +168,8 @@ ENV ABI "aarch64-linux-gnu"
 ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
 ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index fb1129f256..f21742ede5 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -167,3 +167,8 @@ ENV ABI "arm-linux-gnueabi"
 ENV MESON_OPTS "--cross-file=arm-linux-gnueabi"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
 ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user,armeb-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index 7a2b864a38..decdeda6f2 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -168,3 +168,8 @@ ENV ABI "arm-linux-gnueabihf"
 ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
 ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index 5a3340e964..1df05fcf20 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -165,3 +165,8 @@ ENV ABI "mips64el-linux-gnuabi64"
 ENV MESON_OPTS "--cross-file=mips64el-linux-gnuabi64"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
 ENV DEF_TARGET_LIST mips64el-softmmu,mips64el-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index 422fdebe8f..019b8dcaff 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -165,3 +165,8 @@ ENV ABI "mipsel-linux-gnu"
 ENV MESON_OPTS "--cross-file=mipsel-linux-gnu"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
 ENV DEF_TARGET_LIST mipsel-softmmu,mipsel-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index 78d7ae6211..3ceab4c502 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -167,3 +167,8 @@ ENV ABI "powerpc64le-linux-gnu"
 ENV MESON_OPTS "--cross-file=powerpc64le-linux-gnu"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
 ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index d06ea3605a..6c216dde48 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -166,3 +166,8 @@ ENV ABI "s390x-linux-gnu"
 ENV MESON_OPTS "--cross-file=s390x-linux-gnu"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
 ENV DEF_TARGET_LIST s390x-softmmu,s390x-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index 5b66b0e256..63a0000936 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -101,3 +101,8 @@ ENV ABI "i686-w64-mingw32"
 ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw32.meson"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=i686-w64-mingw32-
 ENV DEF_TARGET_LIST i386-softmmu
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index b94fd63cca..531e539e85 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -101,3 +101,8 @@ ENV ABI "x86_64-w64-mingw32"
 ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32-
 ENV DEF_TARGET_LIST x86_64-softmmu
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 8e06d080b8..4dd1fce890 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -146,3 +146,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index 9bf9b50dad..f39e8a4d44 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -135,3 +135,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3.9"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index 95d951953f..a6f7071351 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -146,3 +146,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker
index 30b9e56793..6fea090f02 100644
--- a/tests/docker/dockerfiles/ubuntu2204.docker
+++ b/tests/docker/dockerfiles/ubuntu2204.docker
@@ -145,3 +145,8 @@ ENV LANG "en_US.UTF-8"
 ENV MAKE "/usr/bin/make"
 ENV NINJA "/usr/bin/ninja"
 ENV PYTHON "/usr/bin/python3"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index cc9e34ac87..c0d7ad5516 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -53,6 +53,15 @@ def generate(filename, cmd, trailer):
         content += trailer
     atomic_write(filename, content)
 
+# Optional user setting, this will always be the last thing added
+# so maximise the number of layers that are cached
+add_user_mapping = [
+    "# As a final step configure the user (if env is defined)",
+    "ARG USER",
+    "ARG UID",
+    "RUN if [ \"${USER}\" ]; then \\",
+    "  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi\n"
+]
 
 def generate_dockerfile(host, target, cross=None, trailer=None):
     filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker")
@@ -60,6 +69,12 @@ def generate_dockerfile(host, target, cross=None, trailer=None):
     if cross is not None:
         cmd.extend(["--cross", cross])
     cmd.extend([target, "qemu"])
+
+    if trailer is not None:
+        trailer += "\n".join(add_user_mapping)
+    else:
+        trailer = "\n".join(add_user_mapping)
+
     generate(filename, cmd, trailer)
 
 
-- 
2.39.2



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

* [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (17 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles Alex Bennée
@ 2023-03-01 15:15 ` Alex Bennée
  2023-03-01 15:16 ` [PULL v2 20/24] tests/docker: use direct RUNC call to build containers Alex Bennée
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

These are flat but not generated by lcitool so we need to manually
update them with the `useradd` stanza.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-20-alex.bennee@linaro.org>

diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
index 8dc5e1b5de..981e9bdc7b 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -61,3 +61,8 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
 
 ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
 ENV DEF_TARGET_LIST aarch64-linux-user,alpha-linux-user,arm-linux-user,hppa-linux-user,i386-linux-user,m68k-linux-user,mips-linux-user,mips64-linux-user,mips64el-linux-user,mipsel-linux-user,ppc-linux-user,ppc64-linux-user,ppc64le-linux-user,riscv64-linux-user,s390x-linux-user,sh4-linux-user,sparc64-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-alpha-cross.docker b/tests/docker/dockerfiles/debian-alpha-cross.docker
index 4eeb43c78a..7fa7bf1bde 100644
--- a/tests/docker/dockerfiles/debian-alpha-cross.docker
+++ b/tests/docker/dockerfiles/debian-alpha-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-alpha-linux-gnu \
         libc6.1-dev-alpha-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker
index 8a0d748343..5308ccb8fe 100644
--- a/tests/docker/dockerfiles/debian-hexagon-cross.docker
+++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker
@@ -33,3 +33,8 @@ ENV TOOLCHAIN_URL https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-f
 
 RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL"
 ENV PATH $PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-hppa-cross.docker b/tests/docker/dockerfiles/debian-hppa-cross.docker
index af1c8403d8..dd47ffdfa4 100644
--- a/tests/docker/dockerfiles/debian-hppa-cross.docker
+++ b/tests/docker/dockerfiles/debian-hppa-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-hppa-linux-gnu \
         libc6-dev-hppa-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests/docker/dockerfiles/debian-loongarch-cross.docker
index a8e8e98909..9d957547b5 100644
--- a/tests/docker/dockerfiles/debian-loongarch-cross.docker
+++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker
@@ -25,3 +25,8 @@ RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2022.05.
 
 ENV PATH $PATH:/opt/cross-tools/bin
 ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-m68k-cross.docker b/tests/docker/dockerfiles/debian-m68k-cross.docker
index dded71c5d2..25dd1c1e68 100644
--- a/tests/docker/dockerfiles/debian-m68k-cross.docker
+++ b/tests/docker/dockerfiles/debian-m68k-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-m68k-linux-gnu \
         libc6-dev-m68k-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker
index 7b55f0f3b2..2cbc568ed1 100644
--- a/tests/docker/dockerfiles/debian-mips-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
             gcc-mips-linux-gnu \
             libc6-dev-mips-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-mips64-cross.docker b/tests/docker/dockerfiles/debian-mips64-cross.docker
index afcff9726f..ba965cf564 100644
--- a/tests/docker/dockerfiles/debian-mips64-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-mips64-linux-gnuabi64 \
         libc6-dev-mips64-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-native.docker b/tests/docker/dockerfiles/debian-native.docker
index 8dd033097c..abac7d7cd7 100644
--- a/tests/docker/dockerfiles/debian-native.docker
+++ b/tests/docker/dockerfiles/debian-native.docker
@@ -47,3 +47,8 @@ RUN apt update && \
 
 ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS
 ENV DEF_TARGET_LIST "none"
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
index d6b2909cc4..23779413d3 100644
--- a/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-powerpc-test-cross.docker
@@ -16,4 +16,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
         libc6-dev-ppc64-cross \
         gcc-10-powerpc64le-linux-gnu \
         libc6-dev-ppc64el-cross
-
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker
index 3daf93968a..803afb9573 100644
--- a/tests/docker/dockerfiles/debian-riscv64-cross.docker
+++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker
@@ -50,3 +50,8 @@ RUN apt update && \
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu-
 ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-riscv64-test-cross.docker b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker
index e5f83a5aeb..6e631295bc 100644
--- a/tests/docker/dockerfiles/debian-riscv64-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-riscv64-test-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-riscv64-linux-gnu \
         libc6-dev-riscv64-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-sh4-cross.docker b/tests/docker/dockerfiles/debian-sh4-cross.docker
index d48ed9065f..6bd8171d33 100644
--- a/tests/docker/dockerfiles/debian-sh4-cross.docker
+++ b/tests/docker/dockerfiles/debian-sh4-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-sh4-linux-gnu \
         libc6-dev-sh4-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-sparc64-cross.docker b/tests/docker/dockerfiles/debian-sparc64-cross.docker
index 8d3d306bc1..1ef735f223 100644
--- a/tests/docker/dockerfiles/debian-sparc64-cross.docker
+++ b/tests/docker/dockerfiles/debian-sparc64-cross.docker
@@ -12,3 +12,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     eatmydata apt-get install --no-install-recommends -y \
         gcc-sparc64-linux-gnu \
         libc6-dev-sparc64-cross
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-toolchain.docker b/tests/docker/dockerfiles/debian-toolchain.docker
index dc9545857f..687a97fec4 100644
--- a/tests/docker/dockerfiles/debian-toolchain.docker
+++ b/tests/docker/dockerfiles/debian-toolchain.docker
@@ -34,3 +34,8 @@ RUN cd /root && ./build-toolchain.sh
 # then copying the built toolchain from stage 0.
 FROM docker.io/library/debian:11-slim
 COPY --from=0 /usr/local /usr/local
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
index 82e4576485..cfd2faf9a8 100644
--- a/tests/docker/dockerfiles/debian-tricore-cross.docker
+++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
@@ -41,3 +41,8 @@ RUN curl -#SL https://github.com/bkoppelmann/package_940/releases/download/trico
 # This image can only build a very minimal QEMU as well as the tests
 ENV DEF_TARGET_LIST tricore-softmmu
 ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools --disable-fdt
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/dockerfiles/debian-xtensa-cross.docker
index 2f11b3b7bc..082b50da19 100644
--- a/tests/docker/dockerfiles/debian-xtensa-cross.docker
+++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker
@@ -27,3 +27,8 @@ RUN for cpu in $CPU_LIST; do \
     done
 
 ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-de233_fpu-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dsp3400-elf/bin
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker
index 91c373fdd3..f2899af410 100644
--- a/tests/docker/dockerfiles/fedora-cris-cross.docker
+++ b/tests/docker/dockerfiles/fedora-cris-cross.docker
@@ -6,3 +6,8 @@ FROM registry.fedoraproject.org/fedora:33
 ENV PACKAGES gcc-cris-linux-gnu
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker
index f58b64dc3e..14c1fb2c93 100644
--- a/tests/docker/dockerfiles/fedora-i386-cross.docker
+++ b/tests/docker/dockerfiles/fedora-i386-cross.docker
@@ -32,3 +32,8 @@ ENV PKG_CONFIG_LIBDIR /usr/lib/pkgconfig
 
 RUN dnf update -y && dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
diff --git a/tests/docker/dockerfiles/python.docker b/tests/docker/dockerfiles/python.docker
index 175c10a34e..383ccbdc3a 100644
--- a/tests/docker/dockerfiles/python.docker
+++ b/tests/docker/dockerfiles/python.docker
@@ -15,3 +15,8 @@ ENV PACKAGES \
 
 RUN dnf install -y $PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
+# As a final step configure the user (if env is defined)
+ARG USER
+ARG UID
+RUN if [ "${USER}" ]; then \
+  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
-- 
2.39.2



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

* [PULL v2 20/24] tests/docker: use direct RUNC call to build containers
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (18 preceding siblings ...)
  2023-03-01 15:15 ` [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images Alex Bennée
@ 2023-03-01 15:16 ` Alex Bennée
  2023-03-01 15:16 ` [PULL v2 21/24] tests/docker: use direct RUNC call to run test jobs Alex Bennée
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

We don't really need stuff from docker.py to do the build as we have
everything we need with a direct call. We do rely on the dockerfiles
being able to tweak the UID/name mapping as the last step.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-21-alex.bennee@linaro.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index bfb0dcac21..680afff952 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -7,6 +7,8 @@ SPACE := $(NULL) #
 COMMA := ,
 
 HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m))
+USER = $(if $(NOUSER),,$(shell id -un))
+UID = $(if $(NOUSER),,$(shell id -u))
 
 DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles
 ifeq ($(HOST_ARCH),x86_64)
@@ -14,6 +16,7 @@ DOCKER_DEFAULT_REGISTRY := registry.gitlab.com/qemu-project/qemu
 endif
 DOCKER_REGISTRY := $(if $(REGISTRY),$(REGISTRY),$(DOCKER_DEFAULT_REGISTRY))
 
+RUNC ?= docker
 ENGINE ?= auto
 DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py --engine $(ENGINE)
 
@@ -35,15 +38,17 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
 
 # General rule for building docker images.
 docker-image-%: $(DOCKER_FILES_DIR)/%.docker
-	$(call quiet-command,\
-		$(DOCKER_SCRIPT) build -t qemu/$* -f $< \
-		$(if $V,,--quiet) \
-		$(if $(NOCACHE),--no-cache, \
-			$(if $(DOCKER_REGISTRY),--registry $(DOCKER_REGISTRY))) \
-		$(if $(NOUSER),,--add-current-user) \
-		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
-		$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
-		"BUILD","$*")
+	  $(call quiet-command,			\
+		$(RUNC) build				\
+		$(if $V,,--quiet)			\
+		$(if $(NOCACHE),--no-cache,		\
+			$(if $(DOCKER_REGISTRY),--cache-from $(DOCKER_REGISTRY)/qemu/$*)) \
+		--build-arg BUILDKIT_INLINE_CACHE=1 	\
+		$(if $(NOUSER),,			\
+			--build-arg USER=$(USER)	\
+			--build-arg UID=$(UID))	\
+		-t qemu/$* - < $<, 			\
+		"BUILD", $1)
 
 # Special rule for debootstraped binfmt linux-user images
 docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker
-- 
2.39.2



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

* [PULL v2 21/24] tests/docker: use direct RUNC call to run test jobs
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (19 preceding siblings ...)
  2023-03-01 15:16 ` [PULL v2 20/24] tests/docker: use direct RUNC call to build containers Alex Bennée
@ 2023-03-01 15:16 ` Alex Bennée
  2023-03-01 15:16 ` [PULL v2 22/24] gitlab: move the majority of artefact handling to a template Alex Bennée
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Daniel P . Berrangé,
	Philippe Mathieu-Daudé, Thomas Huth,
	Wainer dos Santos Moschetta, Beraldo Leal

If we build them without the script we can certainly run them without
it.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230228190653.1602033-22-alex.bennee@linaro.org>

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 680afff952..54ed77f671 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -224,8 +224,9 @@ docker-run: docker-qemu-src
 			$(IMAGE) --executable $(EXECUTABLE),		\
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
-		$(DOCKER_SCRIPT) run 					\
-			$(if $(NOUSER),,--run-as-current-user) 		\
+		$(RUNC) run 						\
+			--rm						\
+			$(if $(NOUSER),,-u $(UID)) 			\
 			--security-opt seccomp=unconfined		\
 			$(if $(DEBUG),-ti,)				\
 			$(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
-- 
2.39.2



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

* [PULL v2 22/24] gitlab: move the majority of artefact handling to a template
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (20 preceding siblings ...)
  2023-03-01 15:16 ` [PULL v2 21/24] tests/docker: use direct RUNC call to run test jobs Alex Bennée
@ 2023-03-01 15:16 ` Alex Bennée
  2023-03-01 15:16 ` [PULL v2 23/24] tests/docker: add zstdtools to the images Alex Bennée
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Thomas Huth, Wainer dos Santos Moschetta, Beraldo Leal

To avoid lots of copy and paste lets deal with artefacts in a
template. This way we can filter out most of the pre-binary object and
library files we no longer need as we have the final binaries.

build-system-alpine also saved .git-submodule-status so for simplicity
we bring that into the template as well.

As an example the build-system-ubuntu artefacts before this patch
where around 1.3 GB, after dropping the object files it comes to 970
MB.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-23-alex.bennee@linaro.org>

diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml
index cb96b55c3f..a6cfe9be97 100644
--- a/.gitlab-ci.d/buildtest-template.yml
+++ b/.gitlab-ci.d/buildtest-template.yml
@@ -25,6 +25,22 @@
         make -j"$JOBS" $MAKE_CHECK_ARGS ;
       fi
 
+# We jump some hoops in common_test_job_template to avoid
+# rebuilding all the object files we skip in the artifacts
+.native_build_artifact_template:
+  artifacts:
+    expire_in: 2 days
+    paths:
+      - build
+      - .git-submodule-status
+    exclude:
+      - build/**/*.p
+      - build/**/*.a.p
+      - build/**/*.fa.p
+      - build/**/*.c.o
+      - build/**/*.c.o.d
+      - build/**/*.fa
+
 .common_test_job_template:
   extends: .base_job_template
   stage: test
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 43f9e4a81d..44b8275299 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -2,7 +2,9 @@ include:
   - local: '/.gitlab-ci.d/buildtest-template.yml'
 
 build-system-alpine:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     - job: amd64-alpine-container
   variables:
@@ -11,11 +13,6 @@ build-system-alpine:
       microblazeel-softmmu mips64el-softmmu
     MAKE_CHECK_ARGS: check-build
     CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - .git-submodule-status
-      - build
 
 check-system-alpine:
   extends: .native_test_job_template
@@ -36,7 +33,9 @@ avocado-system-alpine:
     MAKE_CHECK_ARGS: check-avocado
 
 build-system-ubuntu:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-ubuntu2204-container
   variables:
@@ -45,10 +44,6 @@ build-system-ubuntu:
     TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
       microblazeel-softmmu mips64el-softmmu
     MAKE_CHECK_ARGS: check-build
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-system-ubuntu:
   extends: .native_test_job_template
@@ -69,7 +64,9 @@ avocado-system-ubuntu:
     MAKE_CHECK_ARGS: check-avocado
 
 build-system-debian:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-debian-container
   variables:
@@ -78,10 +75,6 @@ build-system-debian:
     TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
       riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
     MAKE_CHECK_ARGS: check-build
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-system-debian:
   extends: .native_test_job_template
@@ -114,7 +107,9 @@ crash-test-debian:
     - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386
 
 build-system-fedora:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-fedora-container
   variables:
@@ -123,10 +118,6 @@ build-system-fedora:
     TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
       xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
     MAKE_CHECK_ARGS: check-build
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-system-fedora:
   extends: .native_test_job_template
@@ -160,7 +151,9 @@ crash-test-fedora:
     - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
 
 build-system-centos:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-centos8-container
   variables:
@@ -170,10 +163,6 @@ build-system-centos:
     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
     MAKE_CHECK_ARGS: check-build
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-system-centos:
   extends: .native_test_job_template
@@ -194,17 +183,15 @@ avocado-system-centos:
     MAKE_CHECK_ARGS: check-avocado
 
 build-system-opensuse:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-opensuse-leap-container
   variables:
     IMAGE: opensuse-leap
     TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
     MAKE_CHECK_ARGS: check-build
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-system-opensuse:
   extends: .native_test_job_template
@@ -339,7 +326,9 @@ clang-user:
 # Split in three sets of build/check/avocado to limit the execution time of each
 # job
 build-cfi-aarch64:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
   - job: amd64-fedora-container
   variables:
@@ -355,10 +344,6 @@ build-cfi-aarch64:
     # skipped until the situation has been solved.
     QEMU_JOB_SKIPPED: 1
   timeout: 90m
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-cfi-aarch64:
   extends: .native_test_job_template
@@ -379,7 +364,9 @@ avocado-cfi-aarch64:
     MAKE_CHECK_ARGS: check-avocado
 
 build-cfi-ppc64-s390x:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
   - job: amd64-fedora-container
   variables:
@@ -395,10 +382,6 @@ build-cfi-ppc64-s390x:
     # skipped until the situation has been solved.
     QEMU_JOB_SKIPPED: 1
   timeout: 80m
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-cfi-ppc64-s390x:
   extends: .native_test_job_template
@@ -419,7 +402,9 @@ avocado-cfi-ppc64-s390x:
     MAKE_CHECK_ARGS: check-avocado
 
 build-cfi-x86_64:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
   - job: amd64-fedora-container
   variables:
@@ -431,10 +416,6 @@ build-cfi-x86_64:
     TARGETS: x86_64-softmmu
     MAKE_CHECK_ARGS: check-build
   timeout: 70m
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 check-cfi-x86_64:
   extends: .native_test_job_template
@@ -564,7 +545,9 @@ build-libvhost-user:
 # No targets are built here, just tools, docs, and unit tests. This
 # also feeds into the eventual documentation deployment steps later
 build-tools-and-docs-debian:
-  extends: .native_build_job_template
+  extends:
+    - .native_build_job_template
+    - .native_build_artifact_template
   needs:
     job: amd64-debian-container
     # when running on 'master' we use pre-existing container
@@ -574,10 +557,6 @@ build-tools-and-docs-debian:
     MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
     QEMU_JOB_PUBLISH: 1
-  artifacts:
-    expire_in: 2 days
-    paths:
-      - build
 
 # Prepare for GitLab pages deployment. Anything copied into the
 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
-- 
2.39.2



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

* [PULL v2 23/24] tests/docker: add zstdtools to the images
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (21 preceding siblings ...)
  2023-03-01 15:16 ` [PULL v2 22/24] gitlab: move the majority of artefact handling to a template Alex Bennée
@ 2023-03-01 15:16 ` Alex Bennée
  2023-03-01 15:16 ` [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI Alex Bennée
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Thomas Huth, Wainer dos Santos Moschetta, Beraldo Leal

We need this to be able to run the tuxrun_baseline tests in CI which
in turn helps us reduce overhead running other tests. We need to
update libvirt-ci and refresh the generated files by running 'make
lcitool-refresh' to get the new mapping.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-24-alex.bennee@linaro.org>

diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker
index 799932bcc9..81c70aeaf9 100644
--- a/tests/docker/dockerfiles/alpine.docker
+++ b/tests/docker/dockerfiles/alpine.docker
@@ -110,6 +110,7 @@ RUN apk update && \
         xfsprogs-dev \
         zlib-dev \
         zlib-static \
+        zstd \
         zstd-dev && \
     apk list | sort > /packages.txt && \
     mkdir -p /usr/libexec/ccache-wrappers && \
diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker
index d87a94b97b..7e3a6217ae 100644
--- a/tests/docker/dockerfiles/centos8.docker
+++ b/tests/docker/dockerfiles/centos8.docker
@@ -116,7 +116,8 @@ RUN dnf distro-sync -y && \
         which \
         xfsprogs-devel \
         zlib-devel \
-        zlib-static && \
+        zlib-static \
+        zstd && \
     dnf autoremove -y && \
     dnf clean all -y && \
     rpm -qa | sort > /packages.txt && \
diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker
index 5d03b5c22d..afb1cbd046 100644
--- a/tests/docker/dockerfiles/debian-amd64-cross.docker
+++ b/tests/docker/dockerfiles/debian-amd64-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker
index febc46e700..28e2fa81b1 100644
--- a/tests/docker/dockerfiles/debian-amd64.docker
+++ b/tests/docker/dockerfiles/debian-amd64.docker
@@ -127,7 +127,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       tesseract-ocr \
                       tesseract-ocr-eng \
                       xfslibs-dev \
-                      zlib1g-dev && \
+                      zlib1g-dev \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index b9501a21bc..b4f7a7f903 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index f21742ede5..4b4191f824 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index decdeda6f2..c9b6b2e563 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index 1df05fcf20..cfe4f9a0d7 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index 019b8dcaff..8e521fc9ee 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index 3ceab4c502..b1b8277f3f 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index 6c216dde48..af39568ce5 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -56,7 +56,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       sparse \
                       tar \
                       tesseract-ocr \
-                      tesseract-ocr-eng && \
+                      tesseract-ocr-eng \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index 63a0000936..1fc4c987f7 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -59,7 +59,8 @@ exec "$@"' > /usr/bin/nosync && \
                tesseract \
                tesseract-langpack-eng \
                util-linux \
-               which && \
+               which \
+               zstd && \
     nosync dnf autoremove -y && \
     nosync dnf clean all -y
 
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index 531e539e85..39a0617a9d 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -59,7 +59,8 @@ exec "$@"' > /usr/bin/nosync && \
                tesseract \
                tesseract-langpack-eng \
                util-linux \
-               which && \
+               which \
+               zstd && \
     nosync dnf autoremove -y && \
     nosync dnf clean all -y
 
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 4dd1fce890..e030c5fb1e 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -130,7 +130,8 @@ exec "$@"' > /usr/bin/nosync && \
                xen-devel \
                xfsprogs-devel \
                zlib-devel \
-               zlib-static && \
+               zlib-static \
+               zstd && \
     nosync dnf autoremove -y && \
     nosync dnf clean all -y && \
     rpm -qa | sort > /packages.txt && \
diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/dockerfiles/opensuse-leap.docker
index f39e8a4d44..8e9500e443 100644
--- a/tests/docker/dockerfiles/opensuse-leap.docker
+++ b/tests/docker/dockerfiles/opensuse-leap.docker
@@ -113,7 +113,8 @@ RUN zypper update -y && \
            xen-devel \
            xfsprogs-devel \
            zlib-devel \
-           zlib-devel-static && \
+           zlib-devel-static \
+           zstd && \
     zypper clean --all && \
     rpm -qa | sort > /packages.txt && \
     mkdir -p /usr/libexec/ccache-wrappers && \
diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker
index a6f7071351..aa2f5ca7b4 100644
--- a/tests/docker/dockerfiles/ubuntu2004.docker
+++ b/tests/docker/dockerfiles/ubuntu2004.docker
@@ -126,7 +126,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       tesseract-ocr \
                       tesseract-ocr-eng \
                       xfslibs-dev \
-                      zlib1g-dev && \
+                      zlib1g-dev \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/docker/dockerfiles/ubuntu2204.docker b/tests/docker/dockerfiles/ubuntu2204.docker
index 6fea090f02..3f7d30e5d0 100644
--- a/tests/docker/dockerfiles/ubuntu2204.docker
+++ b/tests/docker/dockerfiles/ubuntu2204.docker
@@ -127,7 +127,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
                       tesseract-ocr \
                       tesseract-ocr-eng \
                       xfslibs-dev \
-                      zlib1g-dev && \
+                      zlib1g-dev \
+                      zstd && \
     eatmydata apt-get autoremove -y && \
     eatmydata apt-get autoclean -y && \
     sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci
index 1c3e16cae3..232f41f160 160000
--- a/tests/lcitool/libvirt-ci
+++ b/tests/lcitool/libvirt-ci
@@ -1 +1 @@
-Subproject commit 1c3e16cae38407d0782dc94080d1104106456fa4
+Subproject commit 232f41f160d4567b8c82dd52aa96c2bc3a5b75c1
diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml
index 2854748f49..af3700379a 100644
--- a/tests/lcitool/projects/qemu.yml
+++ b/tests/lcitool/projects/qemu.yml
@@ -116,5 +116,6 @@ packages:
  - which
  - xen
  - xfsprogs
+ - zstdtools
  - zlib
  - zlib-static
-- 
2.39.2



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

* [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (22 preceding siblings ...)
  2023-03-01 15:16 ` [PULL v2 23/24] tests/docker: add zstdtools to the images Alex Bennée
@ 2023-03-01 15:16 ` Alex Bennée
  2023-03-01 17:39 ` [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Peter Maydell
  2023-03-02 16:02 ` Peter Maydell
  25 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 15:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Alex Bennée, Philippe Mathieu-Daudé,
	Cleber Rosa, Wainer dos Santos Moschetta, Beraldo Leal

This test is exceptionally heavyweight (nearly 330s) compared to the
two (both endians) TuxRun baseline tests which complete in under 160s.
The coverage is slightly reduced but a more directed test could make
up the difference.

tests/avocado/tuxrun_baselines.py:TuxRunBaselineTest.test_ppc64:

Overall coverage rate:
  lines......: 9.6% (44110 of 458817 lines)
  functions..: 16.5% (6767 of 41054 functions)
  branches...: 6.0% (13395 of 222634 branches)

tests/avocado/boot_linux.py:BootLinuxPPC64.test_pseries_tcg:

Overall coverage rate:
  lines......: 11.6% (53408 of 458817 lines)
  functions..: 18.7% (7691 of 41054 functions)
  branches...: 7.9% (17692 of 224218 branches)

So lets skip for GITLAB_CI and save a few CI minutes.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230228190653.1602033-25-alex.bennee@linaro.org>

diff --git a/tests/avocado/boot_linux.py b/tests/avocado/boot_linux.py
index fe0bb180d9..be30dcbd58 100644
--- a/tests/avocado/boot_linux.py
+++ b/tests/avocado/boot_linux.py
@@ -84,6 +84,8 @@ def test_virt_kvm(self):
         self.launch_and_wait(set_up_ssh_connection=False)
 
 
+# See the tux_baseline.py tests for almost the same coverage in a lot
+# less time.
 class BootLinuxPPC64(LinuxTest):
     """
     :avocado: tags=arch:ppc64
@@ -91,6 +93,7 @@ class BootLinuxPPC64(LinuxTest):
 
     timeout = 360
 
+    @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab')
     def test_pseries_tcg(self):
         """
         :avocado: tags=machine:pseries
-- 
2.39.2



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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (23 preceding siblings ...)
  2023-03-01 15:16 ` [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI Alex Bennée
@ 2023-03-01 17:39 ` Peter Maydell
  2023-03-01 18:17   ` Alex Bennée
  2023-03-02 16:02 ` Peter Maydell
  25 siblings, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2023-03-01 17:39 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Wed, 1 Mar 2023 at 15:16, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The following changes since commit 627634031092e1514f363fd8659a579398de0f0e:
>
>   Merge tag 'buildsys-qom-qdev-ui-20230227' of https://github.com/philmd/qemu into staging (2023-02-28 15:09:18 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
>
> for you to fetch changes up to c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:
>
>   tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01 12:51:01 +0000)
>
> ----------------------------------------------------------------
> testing updates:
>
>   - ensure socat available for tests
>   - skip socat tests for MacOS
>   - properly clean up fifos after use
>   - make fp-test less chatty
>   - store test artefacts on Cirrus
>   - control custom runners with QEMU_CI knobs
>   - disable benchmark runs under tsan build
>   - update ubuntu 2004 to 2204
>   - skip nios2 kernel replay test
>   - add tuxrun baselines to avocado
>   - binary build of tricore tools
>   - export test results on cross builds
>   - improve windows builds
>   - ensure we properly print TAP headers
>   - migrate away from docker.py for building containers
>   - be more efficient in our handling of build artefacts between stages
>   - enable ztsd in containers so we can run tux_baselines
>   - disable heavyweight PPC64 Boot Linux test in CI

This still won't merge:

e104462:jammy:qemu-for-merges$ apply-pullreq
https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
Switched to branch 'staging'
fetching from remote https://gitlab.com/stsquad/qemu.git
tags/pull-testing-next-010323-1
remote: Enumerating objects: 288, done.
remote: Counting objects: 100% (288/288), done.
remote: Compressing objects: 100% (135/135), done.
remote: Total 221 (delta 182), reused 114 (delta 84), pack-reused 0
Receiving objects: 100% (221/221), 43.20 KiB | 3.08 MiB/s, done.
Resolving deltas: 100% (182/182), completed with 57 local objects.
From https://gitlab.com/stsquad/qemu
 * tag                       pull-testing-next-010323-1 -> FETCH_HEAD
Fetching submodule tests/fp/berkeley-testfloat-3
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3]: errno=Connection timed out

fatal: unable to connect to github.com:
github.com[0: 140.82.114.4]: errno=Connection timed out

Errors during submodule fetch:
        tests/fp/berkeley-testfloat-3
        tests/fp/berkeley-testfloat-3

(The script is doing 'git fetch  https://gitlab.com/stsquad/qemu.git
tags/pull-testing-next-010323-1')

thanks
-- PMM


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 17:39 ` [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Peter Maydell
@ 2023-03-01 18:17   ` Alex Bennée
  2023-03-01 19:19     ` Peter Maydell
  0 siblings, 1 reply; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 18:17 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel


Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 1 Mar 2023 at 15:16, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> The following changes since commit 627634031092e1514f363fd8659a579398de0f0e:
>>
>>   Merge tag 'buildsys-qom-qdev-ui-20230227' of
>> https://github.com/philmd/qemu into staging (2023-02-28 15:09:18
>> +0000)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
>>
>> for you to fetch changes up to c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:
>>
>>   tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01 12:51:01 +0000)
>>
>> ----------------------------------------------------------------
>> testing updates:
>>
>>   - ensure socat available for tests
>>   - skip socat tests for MacOS
>>   - properly clean up fifos after use
>>   - make fp-test less chatty
>>   - store test artefacts on Cirrus
>>   - control custom runners with QEMU_CI knobs
>>   - disable benchmark runs under tsan build
>>   - update ubuntu 2004 to 2204
>>   - skip nios2 kernel replay test
>>   - add tuxrun baselines to avocado
>>   - binary build of tricore tools
>>   - export test results on cross builds
>>   - improve windows builds
>>   - ensure we properly print TAP headers
>>   - migrate away from docker.py for building containers
>>   - be more efficient in our handling of build artefacts between stages
>>   - enable ztsd in containers so we can run tux_baselines
>>   - disable heavyweight PPC64 Boot Linux test in CI
>
> This still won't merge:
>
> e104462:jammy:qemu-for-merges$ apply-pullreq
> https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
> Switched to branch 'master'
> Your branch is up-to-date with 'origin/master'.
> Already up-to-date.
> Switched to branch 'staging'
> fetching from remote https://gitlab.com/stsquad/qemu.git
> tags/pull-testing-next-010323-1
> remote: Enumerating objects: 288, done.
> remote: Counting objects: 100% (288/288), done.
> remote: Compressing objects: 100% (135/135), done.
> remote: Total 221 (delta 182), reused 114 (delta 84), pack-reused 0
> Receiving objects: 100% (221/221), 43.20 KiB | 3.08 MiB/s, done.
> Resolving deltas: 100% (182/182), completed with 57 local objects.
> From https://gitlab.com/stsquad/qemu
>  * tag                       pull-testing-next-010323-1 -> FETCH_HEAD
> Fetching submodule tests/fp/berkeley-testfloat-3
> fatal: unable to connect to github.com:
> github.com[0: 140.82.121.3]: errno=Connection timed out
>
> fatal: unable to connect to github.com:
> github.com[0: 140.82.114.4]: errno=Connection timed out
>
> Errors during submodule fetch:
>         tests/fp/berkeley-testfloat-3
>         tests/fp/berkeley-testfloat-3

You'll need to do a fresh checkout or manually fix up the .git/ metadata

>
> (The script is doing 'git fetch  https://gitlab.com/stsquad/qemu.git
> tags/pull-testing-next-010323-1')
>
> thanks
> -- PMM


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 18:17   ` Alex Bennée
@ 2023-03-01 19:19     ` Peter Maydell
  2023-03-01 19:47       ` Alex Bennée
  0 siblings, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2023-03-01 19:19 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Wed, 1 Mar 2023 at 18:17, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Wed, 1 Mar 2023 at 15:16, Alex Bennée <alex.bennee@linaro.org> wrote:
> >>
> >> The following changes since commit 627634031092e1514f363fd8659a579398de0f0e:
> >>
> >>   Merge tag 'buildsys-qom-qdev-ui-20230227' of
> >> https://github.com/philmd/qemu into staging (2023-02-28 15:09:18
> >> +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
> >>
> >> for you to fetch changes up to c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:
> >>
> >>   tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01 12:51:01 +0000)
> >>
> >> ----------------------------------------------------------------
> >> testing updates:
> >>
> >>   - ensure socat available for tests
> >>   - skip socat tests for MacOS
> >>   - properly clean up fifos after use
> >>   - make fp-test less chatty
> >>   - store test artefacts on Cirrus
> >>   - control custom runners with QEMU_CI knobs
> >>   - disable benchmark runs under tsan build
> >>   - update ubuntu 2004 to 2204
> >>   - skip nios2 kernel replay test
> >>   - add tuxrun baselines to avocado
> >>   - binary build of tricore tools
> >>   - export test results on cross builds
> >>   - improve windows builds
> >>   - ensure we properly print TAP headers
> >>   - migrate away from docker.py for building containers
> >>   - be more efficient in our handling of build artefacts between stages
> >>   - enable ztsd in containers so we can run tux_baselines
> >>   - disable heavyweight PPC64 Boot Linux test in CI
> >
> > This still won't merge:
> >
> > e104462:jammy:qemu-for-merges$ apply-pullreq
> > https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
> > Switched to branch 'master'
> > Your branch is up-to-date with 'origin/master'.
> > Already up-to-date.
> > Switched to branch 'staging'
> > fetching from remote https://gitlab.com/stsquad/qemu.git
> > tags/pull-testing-next-010323-1
> > remote: Enumerating objects: 288, done.
> > remote: Counting objects: 100% (288/288), done.
> > remote: Compressing objects: 100% (135/135), done.
> > remote: Total 221 (delta 182), reused 114 (delta 84), pack-reused 0
> > Receiving objects: 100% (221/221), 43.20 KiB | 3.08 MiB/s, done.
> > Resolving deltas: 100% (182/182), completed with 57 local objects.
> > From https://gitlab.com/stsquad/qemu
> >  * tag                       pull-testing-next-010323-1 -> FETCH_HEAD
> > Fetching submodule tests/fp/berkeley-testfloat-3
> > fatal: unable to connect to github.com:
> > github.com[0: 140.82.121.3]: errno=Connection timed out
> >
> > fatal: unable to connect to github.com:
> > github.com[0: 140.82.114.4]: errno=Connection timed out
> >
> > Errors during submodule fetch:
> >         tests/fp/berkeley-testfloat-3
> >         tests/fp/berkeley-testfloat-3
>
> You'll need to do a fresh checkout or manually fix up the .git/ metadata

What metadata? I don't understand what's going on here...
The .gitmodules I have points at gitlab URLs for the
softfloat and testfloat stuff.

-- PMM


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 19:19     ` Peter Maydell
@ 2023-03-01 19:47       ` Alex Bennée
  2023-03-02 10:56         ` Peter Maydell
  0 siblings, 1 reply; 41+ messages in thread
From: Alex Bennée @ 2023-03-01 19:47 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3769 bytes --]

From the other thread:

I think the underlying config needs updating:

  .git/modules/tests/fp/berkeley-testfloat-3/config

I'm surprised the git config for submodules doesn't carry the metadata.

On Wed, 1 Mar 2023 at 19:19, Peter Maydell <peter.maydell@linaro.org> wrote:

> On Wed, 1 Mar 2023 at 18:17, Alex Bennée <alex.bennee@linaro.org> wrote:
> >
> >
> > Peter Maydell <peter.maydell@linaro.org> writes:
> >
> > > On Wed, 1 Mar 2023 at 15:16, Alex Bennée <alex.bennee@linaro.org>
> wrote:
> > >>
> > >> The following changes since commit
> 627634031092e1514f363fd8659a579398de0f0e:
> > >>
> > >>   Merge tag 'buildsys-qom-qdev-ui-20230227' of
> > >> https://github.com/philmd/qemu into staging (2023-02-28 15:09:18
> > >> +0000)
> > >>
> > >> are available in the Git repository at:
> > >>
> > >>   https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
> > >>
> > >> for you to fetch changes up to
> c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:
> > >>
> > >>   tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01
> 12:51:01 +0000)
> > >>
> > >> ----------------------------------------------------------------
> > >> testing updates:
> > >>
> > >>   - ensure socat available for tests
> > >>   - skip socat tests for MacOS
> > >>   - properly clean up fifos after use
> > >>   - make fp-test less chatty
> > >>   - store test artefacts on Cirrus
> > >>   - control custom runners with QEMU_CI knobs
> > >>   - disable benchmark runs under tsan build
> > >>   - update ubuntu 2004 to 2204
> > >>   - skip nios2 kernel replay test
> > >>   - add tuxrun baselines to avocado
> > >>   - binary build of tricore tools
> > >>   - export test results on cross builds
> > >>   - improve windows builds
> > >>   - ensure we properly print TAP headers
> > >>   - migrate away from docker.py for building containers
> > >>   - be more efficient in our handling of build artefacts between
> stages
> > >>   - enable ztsd in containers so we can run tux_baselines
> > >>   - disable heavyweight PPC64 Boot Linux test in CI
> > >
> > > This still won't merge:
> > >
> > > e104462:jammy:qemu-for-merges$ apply-pullreq
> > > https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
> > > Switched to branch 'master'
> > > Your branch is up-to-date with 'origin/master'.
> > > Already up-to-date.
> > > Switched to branch 'staging'
> > > fetching from remote https://gitlab.com/stsquad/qemu.git
> > > tags/pull-testing-next-010323-1
> > > remote: Enumerating objects: 288, done.
> > > remote: Counting objects: 100% (288/288), done.
> > > remote: Compressing objects: 100% (135/135), done.
> > > remote: Total 221 (delta 182), reused 114 (delta 84), pack-reused 0
> > > Receiving objects: 100% (221/221), 43.20 KiB | 3.08 MiB/s, done.
> > > Resolving deltas: 100% (182/182), completed with 57 local objects.
> > > From https://gitlab.com/stsquad/qemu
> > >  * tag                       pull-testing-next-010323-1 -> FETCH_HEAD
> > > Fetching submodule tests/fp/berkeley-testfloat-3
> > > fatal: unable to connect to github.com:
> > > github.com[0: 140.82.121.3]: errno=Connection timed out
> > >
> > > fatal: unable to connect to github.com:
> > > github.com[0: 140.82.114.4]: errno=Connection timed out
> > >
> > > Errors during submodule fetch:
> > >         tests/fp/berkeley-testfloat-3
> > >         tests/fp/berkeley-testfloat-3
> >
> > You'll need to do a fresh checkout or manually fix up the .git/ metadata
>
> What metadata? I don't understand what's going on here...
> The .gitmodules I have points at gitlab URLs for the
> softfloat and testfloat stuff.
>
> -- PMM
>


-- 
Alex Bennée
Emulation and Virtualisation Tech Lead @ Linaro

[-- Attachment #2: Type: text/html, Size: 5829 bytes --]

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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 19:47       ` Alex Bennée
@ 2023-03-02 10:56         ` Peter Maydell
  2023-03-02 11:15           ` Philippe Mathieu-Daudé
                             ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: Peter Maydell @ 2023-03-02 10:56 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> From the other thread:
>
> I think the underlying config needs updating:
>
>   .git/modules/tests/fp/berkeley-testfloat-3/config
>
> I'm surprised the git config for submodules doesn't carry the metadata.

Yeah, in my local repo that I merge stuff with that file
does still have a github URL:
url = git://github.com/cota/berkeley-testfloat-3

So I guess my questions are:
 (1) why hasn't this been a problem up til now ?
 (2) does this mean that if I merge this then everybody will
     need to manually go in and update this file somehow
     to be able to pull the updated qemu master ?

thanks
-- PMM


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado,  windows)
  2023-03-02 10:56         ` Peter Maydell
@ 2023-03-02 11:15           ` Philippe Mathieu-Daudé
  2023-03-02 11:19             ` Thomas Huth
  2023-03-02 11:21             ` Peter Maydell
  2023-03-02 11:24           ` Alex Bennée
  2023-03-02 11:30           ` Alex Bennée
  2 siblings, 2 replies; 41+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-02 11:15 UTC (permalink / raw)
  To: Peter Maydell, Alex Bennée; +Cc: qemu-devel

On 2/3/23 11:56, Peter Maydell wrote:
> On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>>  From the other thread:
>>
>> I think the underlying config needs updating:
>>
>>    .git/modules/tests/fp/berkeley-testfloat-3/config
>>
>> I'm surprised the git config for submodules doesn't carry the metadata.
> 
> Yeah, in my local repo that I merge stuff with that file
> does still have a github URL:
> url = git://github.com/cota/berkeley-testfloat-3
> 
> So I guess my questions are:
>   (1) why hasn't this been a problem up til now ?
>   (2) does this mean that if I merge this then everybody will
>       need to manually go in and update this file somehow
>       to be able to pull the updated qemu master ?

I assume you are not passing --disable-git-update or
--with-git-submodules to ./configure.

I am not, and each time I run 'make' it annoyingly calls 'git
submodule update':

$ make check-qtest
   GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 
tests/fp/berkeley-softfloat-3 dtc

Maybe we should also call 'git submodule sync' first?


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado,  windows)
  2023-03-02 11:15           ` Philippe Mathieu-Daudé
@ 2023-03-02 11:19             ` Thomas Huth
  2023-03-02 11:21             ` Peter Maydell
  1 sibling, 0 replies; 41+ messages in thread
From: Thomas Huth @ 2023-03-02 11:19 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Peter Maydell, Alex Bennée; +Cc: qemu-devel

On 02/03/2023 12.15, Philippe Mathieu-Daudé wrote:
> On 2/3/23 11:56, Peter Maydell wrote:
>> On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>>>
>>>  From the other thread:
>>>
>>> I think the underlying config needs updating:
>>>
>>>    .git/modules/tests/fp/berkeley-testfloat-3/config
>>>
>>> I'm surprised the git config for submodules doesn't carry the metadata.
>>
>> Yeah, in my local repo that I merge stuff with that file
>> does still have a github URL:
>> url = git://github.com/cota/berkeley-testfloat-3
>>
>> So I guess my questions are:
>>   (1) why hasn't this been a problem up til now ?
>>   (2) does this mean that if I merge this then everybody will
>>       need to manually go in and update this file somehow
>>       to be able to pull the updated qemu master ?
> 
> I assume you are not passing --disable-git-update or
> --with-git-submodules to ./configure.
> 
> I am not, and each time I run 'make' it annoyingly calls 'git
> submodule update':
> 
> $ make check-qtest
>    GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 
> tests/fp/berkeley-softfloat-3 dtc
> 
> Maybe we should also call 'git submodule sync' first?

Another idea: Since we diverged with the softfloat repo from upstream anyway 
in our mirror, maybe we should simply ditch the submodule idea here and copy 
the code over into the main repository? ==> No more submodules, no more 
pain! ;-)

  Thomas



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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 11:15           ` Philippe Mathieu-Daudé
  2023-03-02 11:19             ` Thomas Huth
@ 2023-03-02 11:21             ` Peter Maydell
  2023-03-02 11:34               ` Alex Bennée
  1 sibling, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2023-03-02 11:21 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Alex Bennée, qemu-devel

On Thu, 2 Mar 2023 at 11:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 2/3/23 11:56, Peter Maydell wrote:
> > On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
> >>
> >>  From the other thread:
> >>
> >> I think the underlying config needs updating:
> >>
> >>    .git/modules/tests/fp/berkeley-testfloat-3/config
> >>
> >> I'm surprised the git config for submodules doesn't carry the metadata.
> >
> > Yeah, in my local repo that I merge stuff with that file
> > does still have a github URL:
> > url = git://github.com/cota/berkeley-testfloat-3
> >
> > So I guess my questions are:
> >   (1) why hasn't this been a problem up til now ?
> >   (2) does this mean that if I merge this then everybody will
> >       need to manually go in and update this file somehow
> >       to be able to pull the updated qemu master ?
>
> I assume you are not passing --disable-git-update or
> --with-git-submodules to ./configure.

No, I don't do that. But this problem happens before we
get anywhere near configure, when I try to do the
'git fetch' of the main repo!

thanks
-- PMM


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 10:56         ` Peter Maydell
  2023-03-02 11:15           ` Philippe Mathieu-Daudé
@ 2023-03-02 11:24           ` Alex Bennée
  2023-03-02 12:00             ` Daniel P. Berrangé
  2023-03-02 12:37             ` Philippe Mathieu-Daudé
  2023-03-02 11:30           ` Alex Bennée
  2 siblings, 2 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-02 11:24 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel


Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> From the other thread:
>>
>> I think the underlying config needs updating:
>>
>>   .git/modules/tests/fp/berkeley-testfloat-3/config
>>
>> I'm surprised the git config for submodules doesn't carry the metadata.
>
> Yeah, in my local repo that I merge stuff with that file
> does still have a github URL:
> url = git://github.com/cota/berkeley-testfloat-3
>
> So I guess my questions are:
>  (1) why hasn't this been a problem up til now ?

Well this is the first time we've had to tweak testfloat since Emilio
introduced it when we first added the fp tests.

>  (2) does this mean that if I merge this then everybody will
>      need to manually go in and update this file somehow
>      to be able to pull the updated qemu master ?

It will depend on how old their checkout is. I don't know why git does
just honour the metadata in .git-submodules - maybe there is a command
line stanza to reset the origin repo of submodules?

>
> thanks
> -- PMM


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 10:56         ` Peter Maydell
  2023-03-02 11:15           ` Philippe Mathieu-Daudé
  2023-03-02 11:24           ` Alex Bennée
@ 2023-03-02 11:30           ` Alex Bennée
  2023-03-02 11:34             ` Peter Maydell
  2 siblings, 1 reply; 41+ messages in thread
From: Alex Bennée @ 2023-03-02 11:30 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel


Peter Maydell <peter.maydell@linaro.org> writes:

> On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> From the other thread:
>>
>> I think the underlying config needs updating:
>>
>>   .git/modules/tests/fp/berkeley-testfloat-3/config
>>
>> I'm surprised the git config for submodules doesn't carry the metadata.
>
> Yeah, in my local repo that I merge stuff with that file
> does still have a github URL:
> url = git://github.com/cota/berkeley-testfloat-3
>
> So I guess my questions are:
>  (1) why hasn't this been a problem up til now ?
>  (2) does this mean that if I merge this then everybody will
>      need to manually go in and update this file somehow
>      to be able to pull the updated qemu master ?

  git submodule set-url tests/fp/berkeley-testfloat-3 https://gitlab.com/qemu-project/berkeley-testfloat-3.git

seems to be the magic to reset origin without manually hacking things.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 11:30           ` Alex Bennée
@ 2023-03-02 11:34             ` Peter Maydell
  2023-03-02 12:03               ` Alex Bennée
  0 siblings, 1 reply; 41+ messages in thread
From: Peter Maydell @ 2023-03-02 11:34 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Thu, 2 Mar 2023 at 11:30, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
> >>
> >> From the other thread:
> >>
> >> I think the underlying config needs updating:
> >>
> >>   .git/modules/tests/fp/berkeley-testfloat-3/config
> >>
> >> I'm surprised the git config for submodules doesn't carry the metadata.
> >
> > Yeah, in my local repo that I merge stuff with that file
> > does still have a github URL:
> > url = git://github.com/cota/berkeley-testfloat-3
> >
> > So I guess my questions are:
> >  (1) why hasn't this been a problem up til now ?
> >  (2) does this mean that if I merge this then everybody will
> >      need to manually go in and update this file somehow
> >      to be able to pull the updated qemu master ?
>
>   git submodule set-url tests/fp/berkeley-testfloat-3 https://gitlab.com/qemu-project/berkeley-testfloat-3.git
>
> seems to be the magic to reset origin without manually hacking things.

The documentation suggests
 'git submodule sync'
ought to work too ?

-- PMM


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 11:21             ` Peter Maydell
@ 2023-03-02 11:34               ` Alex Bennée
  0 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-02 11:34 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Philippe Mathieu-Daudé, qemu-devel


Peter Maydell <peter.maydell@linaro.org> writes:

> On Thu, 2 Mar 2023 at 11:15, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> On 2/3/23 11:56, Peter Maydell wrote:
>> > On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>> >>
>> >>  From the other thread:
>> >>
>> >> I think the underlying config needs updating:
>> >>
>> >>    .git/modules/tests/fp/berkeley-testfloat-3/config
>> >>
>> >> I'm surprised the git config for submodules doesn't carry the metadata.
>> >
>> > Yeah, in my local repo that I merge stuff with that file
>> > does still have a github URL:
>> > url = git://github.com/cota/berkeley-testfloat-3
>> >
>> > So I guess my questions are:
>> >   (1) why hasn't this been a problem up til now ?
>> >   (2) does this mean that if I merge this then everybody will
>> >       need to manually go in and update this file somehow
>> >       to be able to pull the updated qemu master ?
>>
>> I assume you are not passing --disable-git-update or
>> --with-git-submodules to ./configure.
>
> No, I don't do that. But this problem happens before we
> get anywhere near configure, when I try to do the
> 'git fetch' of the main repo!

c.f:

  ➜  git submodule foreach --recursive git config --get remote.origin.url

  Entering 'dtc'
  https://git.qemu.org/git/dtc.git
  Entering 'meson'
  https://github.com/mesonbuild/meson/
  Entering 'roms/QemuMacDrivers'
  https://git.qemu.org/git/QemuMacDrivers.git
  Entering 'roms/SLOF'
  https://git.qemu.org/git/SLOF.git
  Entering 'roms/ipxe'
  https://git.qemu.org/git/ipxe.git
  Entering 'roms/openbios'
  https://git.qemu.org/git/openbios.git
  Entering 'roms/opensbi'
  https://git.qemu.org/git/opensbi.git
  Entering 'roms/qboot'
  https://github.com/bonzini/qboot
  Entering 'roms/qemu-palcode'
  https://git.qemu.org/git/qemu-palcode.git
  Entering 'roms/seabios'
  https://git.qemu.org/git/seabios.git/
  Entering 'roms/seabios-hppa'
  https://git.qemu.org/git/seabios-hppa.git
  Entering 'roms/skiboot'
  https://git.qemu.org/git/skiboot.git
  Entering 'roms/u-boot'
  https://git.qemu.org/git/u-boot.git
  Entering 'roms/u-boot-sam460ex'
  https://git.qemu.org/git/u-boot-sam460ex.git
  Entering 'roms/vbootrom'
  https://gitlab.com/qemu-project/vbootrom.git
  Entering 'subprojects/libvfio-user'
  https://gitlab.com/qemu-project/libvfio-user.git
  Entering 'tests/fp/berkeley-softfloat-3'
  https://github.com/cota/berkeley-softfloat-3
  Entering 'tests/fp/berkeley-testfloat-3'
  https://gitlab.com/qemu-project/berkeley-testfloat-3.git
  Entering 'tests/lcitool/libvirt-ci'
  http://gitlab.com/libvirt/libvirt-ci
  Entering 'ui/keycodemapdb'
  https://git.qemu.org/git/keycodemapdb.git

vs what .gitmodules says:

➜  cat .gitmodules | grep url
        url = https://gitlab.com/qemu-project/seabios.git/
        url = https://gitlab.com/qemu-project/SLOF.git
        url = https://gitlab.com/qemu-project/ipxe.git
        url = https://gitlab.com/qemu-project/openbios.git
        url = https://gitlab.com/qemu-project/qemu-palcode.git
        url = https://gitlab.com/qemu-project/dtc.git
        url = https://gitlab.com/qemu-project/u-boot.git
        url = https://gitlab.com/qemu-project/skiboot.git
        url = https://gitlab.com/qemu-project/QemuMacDrivers.git
        url = https://gitlab.com/qemu-project/keycodemapdb.git
        url = https://gitlab.com/qemu-project/seabios-hppa.git
        url = https://gitlab.com/qemu-project/u-boot-sam460ex.git
        url = https://gitlab.com/qemu-project/berkeley-testfloat-3.git
        url = https://gitlab.com/qemu-project/berkeley-softfloat-3.git
        url = https://gitlab.com/qemu-project/edk2.git
        url =   https://gitlab.com/qemu-project/opensbi.git
        url = https://gitlab.com/qemu-project/qboot.git
        url = https://gitlab.com/qemu-project/meson.git
        url = https://gitlab.com/qemu-project/vbootrom.git
        url = https://gitlab.com/libvirt/libvirt-ci.git
        url = https://gitlab.com/qemu-project/libvfio-user.git

>
> thanks
> -- PMM


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 11:24           ` Alex Bennée
@ 2023-03-02 12:00             ` Daniel P. Berrangé
  2023-03-02 12:37             ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 41+ messages in thread
From: Daniel P. Berrangé @ 2023-03-02 12:00 UTC (permalink / raw)
  To: Alex Bennée; +Cc: Peter Maydell, qemu-devel

On Thu, Mar 02, 2023 at 11:24:36AM +0000, Alex Bennée wrote:
> 
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
> > On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
> >>
> >> From the other thread:
> >>
> >> I think the underlying config needs updating:
> >>
> >>   .git/modules/tests/fp/berkeley-testfloat-3/config
> >>
> >> I'm surprised the git config for submodules doesn't carry the metadata.
> >
> > Yeah, in my local repo that I merge stuff with that file
> > does still have a github URL:
> > url = git://github.com/cota/berkeley-testfloat-3
> >
> > So I guess my questions are:
> >  (1) why hasn't this been a problem up til now ?
> 
> Well this is the first time we've had to tweak testfloat since Emilio
> introduced it when we first added the fp tests.
> 
> >  (2) does this mean that if I merge this then everybody will
> >      need to manually go in and update this file somehow
> >      to be able to pull the updated qemu master ?
> 
> It will depend on how old their checkout is. I don't know why git does
> just honour the metadata in .git-submodules - maybe there is a command
> line stanza to reset the origin repo of submodules?

Aside from what's mention in other replies, the general "restore sanity"
option for submodules is  'git submodule deinit --all --force' which
should purge all local state / checkouts of them.


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



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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-02 11:34             ` Peter Maydell
@ 2023-03-02 12:03               ` Alex Bennée
  0 siblings, 0 replies; 41+ messages in thread
From: Alex Bennée @ 2023-03-02 12:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel


Peter Maydell <peter.maydell@linaro.org> writes:

> On Thu, 2 Mar 2023 at 11:30, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>>
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>> > On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>> >>
>> >> From the other thread:
>> >>
>> >> I think the underlying config needs updating:
>> >>
>> >>   .git/modules/tests/fp/berkeley-testfloat-3/config
>> >>
>> >> I'm surprised the git config for submodules doesn't carry the metadata.
>> >
>> > Yeah, in my local repo that I merge stuff with that file
>> > does still have a github URL:
>> > url = git://github.com/cota/berkeley-testfloat-3
>> >
>> > So I guess my questions are:
>> >  (1) why hasn't this been a problem up til now ?
>> >  (2) does this mean that if I merge this then everybody will
>> >      need to manually go in and update this file somehow
>> >      to be able to pull the updated qemu master ?
>>
>>   git submodule set-url tests/fp/berkeley-testfloat-3
>> https://gitlab.com/qemu-project/berkeley-testfloat-3.git
>>
>> seems to be the magic to reset origin without manually hacking things.
>
> The documentation suggests
>  'git submodule sync'
> ought to work too ?

Ahh yes it does. Have confirmed doing:

 git submodule sync
 git submodule foreach --recursive git config --get remote.origin.url

and now everything is correct. Does this mean we need to tweak the
build/configure somehow?

>
> -- PMM


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado,  windows)
  2023-03-02 11:24           ` Alex Bennée
  2023-03-02 12:00             ` Daniel P. Berrangé
@ 2023-03-02 12:37             ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 41+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-02 12:37 UTC (permalink / raw)
  To: Alex Bennée, Peter Maydell; +Cc: qemu-devel

On 2/3/23 12:24, Alex Bennée wrote:
> 
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
>> On Wed, 1 Mar 2023 at 19:47, Alex Bennée <alex.bennee@linaro.org> wrote:
>>>
>>>  From the other thread:
>>>
>>> I think the underlying config needs updating:
>>>
>>>    .git/modules/tests/fp/berkeley-testfloat-3/config
>>>
>>> I'm surprised the git config for submodules doesn't carry the metadata.
>>
>> Yeah, in my local repo that I merge stuff with that file
>> does still have a github URL:
>> url = git://github.com/cota/berkeley-testfloat-3
>>
>> So I guess my questions are:
>>   (1) why hasn't this been a problem up til now ?
> 
> Well this is the first time we've had to tweak testfloat since Emilio
> introduced it when we first added the fp tests.
> 
>>   (2) does this mean that if I merge this then everybody will
>>       need to manually go in and update this file somehow
>>       to be able to pull the updated qemu master ?
> 
> It will depend on how old their checkout is. I don't know why git does
> just honour the metadata in .git-submodules - maybe there is a command
> line stanza to reset the origin repo of submodules?

    git submodule [--quiet] sync [--recursive] [--] [<path>...]

    Synchronizes submodules' remote URL configuration setting to
    the value specified in .gitmodules. It will only affect those
    submodules which already have a URL entry in .git/config (that
    is the case when they are initialized or freshly added). This
    is useful when submodule URLs change upstream and you need to
    update your local repositories accordingly.

    If --recursive is specified, this command will recurse into the
    registered submodules, and sync any nested submodules within.


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

* Re: [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows)
  2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
                   ` (24 preceding siblings ...)
  2023-03-01 17:39 ` [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Peter Maydell
@ 2023-03-02 16:02 ` Peter Maydell
  25 siblings, 0 replies; 41+ messages in thread
From: Peter Maydell @ 2023-03-02 16:02 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel

On Wed, 1 Mar 2023 at 15:16, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The following changes since commit 627634031092e1514f363fd8659a579398de0f0e:
>
>   Merge tag 'buildsys-qom-qdev-ui-20230227' of https://github.com/philmd/qemu into staging (2023-02-28 15:09:18 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/stsquad/qemu.git tags/pull-testing-next-010323-1
>
> for you to fetch changes up to c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb:
>
>   tests/avocado: disable BootLinuxPPC64 test in CI (2023-03-01 12:51:01 +0000)
>
> ----------------------------------------------------------------
> testing updates:
>
>   - ensure socat available for tests
>   - skip socat tests for MacOS
>   - properly clean up fifos after use
>   - make fp-test less chatty
>   - store test artefacts on Cirrus
>   - control custom runners with QEMU_CI knobs
>   - disable benchmark runs under tsan build
>   - update ubuntu 2004 to 2204
>   - skip nios2 kernel replay test
>   - add tuxrun baselines to avocado
>   - binary build of tricore tools
>   - export test results on cross builds
>   - improve windows builds
>   - ensure we properly print TAP headers
>   - migrate away from docker.py for building containers
>   - be more efficient in our handling of build artefacts between stages
>   - enable ztsd in containers so we can run tux_baselines
>   - disable heavyweight PPC64 Boot Linux test in CI
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/8.0
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2023-03-02 16:03 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-01 15:15 [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Alex Bennée
2023-03-01 15:15 ` [PULL v2 01/24] tests: don't run socat tests on MacOS as well Alex Bennée
2023-03-01 15:15 ` [PULL v2 02/24] tests: add socat dependency for tests Alex Bennée
2023-03-01 15:15 ` [PULL v2 03/24] tests: be a bit more strict cleaning up fifos Alex Bennée
2023-03-01 15:15 ` [PULL v2 04/24] tests: make fp-test less chatty when running from test suite Alex Bennée
2023-03-01 15:15 ` [PULL v2 05/24] gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs Alex Bennée
2023-03-01 15:15 ` [PULL v2 06/24] gitlab: extend custom runners with base_job_template Alex Bennée
2023-03-01 15:15 ` [PULL v2 07/24] tests: don't run benchmarks for the tsan build Alex Bennée
2023-03-01 15:15 ` [PULL v2 08/24] testing: update ubuntu2004 to ubuntu2204 Alex Bennée
2023-03-01 15:15 ` [PULL v2 09/24] tests: skip the nios2 replay_kernel test Alex Bennée
2023-03-01 15:15 ` [PULL v2 10/24] tests: add tuxrun baseline test to avocado Alex Bennée
2023-03-01 15:15 ` [PULL v2 11/24] tests/docker: Use binaries for debian-tricore-cross Alex Bennée
2023-03-01 15:15 ` [PULL v2 12/24] tests: ensure we export job results for some cross builds Alex Bennée
2023-03-01 15:15 ` [PULL v2 13/24] cirrus.yml: Improve the windows_msys2_task Alex Bennée
2023-03-01 15:15 ` [PULL v2 14/24] tests/dockerfiles: unify debian-toolchain references Alex Bennée
2023-03-01 15:15 ` [PULL v2 15/24] gitlab: Use plain docker in container-template.yml Alex Bennée
2023-03-01 15:15 ` [PULL v2 16/24] tests: Ensure TAP version is printed before other messages Alex Bennée
2023-03-01 15:15 ` [PULL v2 17/24] configure: expose the direct container command Alex Bennée
2023-03-01 15:15 ` [PULL v2 18/24] tests/lcitool: append user setting stanza to dockerfiles Alex Bennée
2023-03-01 15:15 ` [PULL v2 19/24] tests/docker: add USER stanzas to non-lci images Alex Bennée
2023-03-01 15:16 ` [PULL v2 20/24] tests/docker: use direct RUNC call to build containers Alex Bennée
2023-03-01 15:16 ` [PULL v2 21/24] tests/docker: use direct RUNC call to run test jobs Alex Bennée
2023-03-01 15:16 ` [PULL v2 22/24] gitlab: move the majority of artefact handling to a template Alex Bennée
2023-03-01 15:16 ` [PULL v2 23/24] tests/docker: add zstdtools to the images Alex Bennée
2023-03-01 15:16 ` [PULL v2 24/24] tests/avocado: disable BootLinuxPPC64 test in CI Alex Bennée
2023-03-01 17:39 ` [PULL v2 00/24] testing updates (gitlab, cirrus, docker, avocado, windows) Peter Maydell
2023-03-01 18:17   ` Alex Bennée
2023-03-01 19:19     ` Peter Maydell
2023-03-01 19:47       ` Alex Bennée
2023-03-02 10:56         ` Peter Maydell
2023-03-02 11:15           ` Philippe Mathieu-Daudé
2023-03-02 11:19             ` Thomas Huth
2023-03-02 11:21             ` Peter Maydell
2023-03-02 11:34               ` Alex Bennée
2023-03-02 11:24           ` Alex Bennée
2023-03-02 12:00             ` Daniel P. Berrangé
2023-03-02 12:37             ` Philippe Mathieu-Daudé
2023-03-02 11:30           ` Alex Bennée
2023-03-02 11:34             ` Peter Maydell
2023-03-02 12:03               ` Alex Bennée
2023-03-02 16:02 ` Peter Maydell

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