testing/next: docker, avocado, unit, gitlab
Subsystems (2)
v3 cover testing/next: docker, avocado, unit, gitlab
Since the last posting I've reincorporated my last PR (as it needed re-basing to merge). The new patches all attempt to reduce the CI load by a little more. I've also picked up patches from Fabinao and Richard WMJ.
The following patches need review:
tests/avocado: disable BootLinuxPPC64 test in CI tests/docker: add zstdtools to the images (!AWAITING UPSTREAM)
gitlab: move the majority of artefact handling to a template tests/lcitool: append user setting stanza to dockerfiles
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 (!AWAITING UPSTREAM) 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 +- .../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 | 4 + 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 + .../dockerfiles/debian-alpha-cross.docker | 5 + .../dockerfiles/debian-amd64-cross.docker | 9 +- tests/docker/dockerfiles/debian-amd64.docker | 9 +- .../dockerfiles/debian-arm64-cross.docker | 9 +- .../dockerfiles/debian-armel-cross.docker | 9 +- .../dockerfiles/debian-armhf-cross.docker | 9 +- .../dockerfiles/debian-hexagon-cross.docker | 5 + .../dockerfiles/debian-hppa-cross.docker | 5 + .../dockerfiles/debian-loongarch-cross.docker | 5 + .../dockerfiles/debian-m68k-cross.docker | 5 + .../dockerfiles/debian-mips-cross.docker | 5 + .../dockerfiles/debian-mips64-cross.docker | 5 + .../dockerfiles/debian-mips64el-cross.docker | 9 +- .../dockerfiles/debian-mipsel-cross.docker | 9 +- tests/docker/dockerfiles/debian-native.docker | 5 + .../debian-powerpc-test-cross.docker | 6 +- .../dockerfiles/debian-ppc64el-cross.docker | 9 +- .../dockerfiles/debian-riscv64-cross.docker | 5 + .../debian-riscv64-test-cross.docker | 5 + .../dockerfiles/debian-s390x-cross.docker | 9 +- .../dockerfiles/debian-sh4-cross.docker | 5 + .../dockerfiles/debian-sparc64-cross.docker | 5 + .../dockerfiles/debian-toolchain.docker | 9 +- .../dockerfiles/debian-tricore-cross.docker | 15 +- .../dockerfiles/debian-xtensa-cross.docker | 5 + .../dockerfiles/fedora-cris-cross.docker | 5 + .../dockerfiles/fedora-i386-cross.docker | 5 + .../dockerfiles/fedora-win32-cross.docker | 9 +- .../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/projects/qemu.yml | 2 + tests/lcitool/refresh | 26 +- tests/tcg/tricore/Makefile.softmmu-target | 6 +- 70 files changed, 994 insertions(+), 159 deletions(-) create mode 100644 tests/avocado/tuxrun_baselines.py create mode 100644 tests/docker/dockerfiles/ubuntu2204.docker
Signature · 1 line
2.39.2
PATCH v3 1/24 tests: don't run socat tests on MacOS as well
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.
Message-Id: <[email protected]>
--- tests/unit/test-io-channel-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/unit/test-io-channel-command.c +2 -2
@@ -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",
Signature · 1 line
2.39.2
PATCH v3 2/24 tests: add socat dependency for tests
In reply to Alex BennéeWe 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.
Message-Id: <[email protected]>
--- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-12.vars | 2 +- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/debian-amd64-cross.docker | 1 + tests/docker/dockerfiles/debian-amd64.docker | 1 + tests/docker/dockerfiles/debian-arm64-cross.docker | 1 + tests/docker/dockerfiles/debian-armel-cross.docker | 1 + tests/docker/dockerfiles/debian-armhf-cross.docker | 1 + tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 + tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 + tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 + tests/docker/dockerfiles/debian-s390x-cross.docker | 1 + tests/docker/dockerfiles/fedora-win32-cross.docker | 1 + tests/docker/dockerfiles/fedora-win64-cross.docker | 1 + tests/docker/dockerfiles/fedora.docker | 1 + tests/docker/dockerfiles/opensuse-leap.docker | 1 + tests/docker/dockerfiles/ubuntu2004.docker | 1 + tests/lcitool/projects/qemu.yml | 1 + 20 files changed, 20 insertions(+), 3 deletions(-)
.gitlab-ci.d/cirrus/freebsd-12.vars +1 -1
@@ -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'
.gitlab-ci.d/cirrus/freebsd-13.vars +1 -1
@@ -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'
.gitlab-ci.d/cirrus/macos-12.vars +1 -1
@@ -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'
tests/docker/dockerfiles/alpine.docker +1 -0
@@ -94,6 +94,7 @@ RUN apk update && \ sed \ snappy-dev \ sndio-dev \ + socat \ sparse \ spice-dev \ spice-protocol \
tests/docker/dockerfiles/centos8.docker +1 -0
@@ -105,6 +105,7 @@ RUN dnf distro-sync -y && \ rpm \ sed \ snappy-devel \ + socat \ spice-protocol \ spice-server-devel \ systemd-devel \
tests/docker/dockerfiles/debian-amd64-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-amd64.docker +1 -0
@@ -120,6 +120,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ systemtap-sdt-dev \ tar \
tests/docker/dockerfiles/debian-arm64-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-armel-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-armhf-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-mips64el-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-mipsel-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/debian-s390x-cross.docker +1 -0
@@ -52,6 +52,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ tar \ tesseract-ocr \
tests/docker/dockerfiles/fedora-win32-cross.docker +1 -0
@@ -52,6 +52,7 @@ exec "$@"' > /usr/bin/nosync && \ python3-sphinx_rtd_theme \ rpm \ sed \ + socat \ sparse \ spice-protocol \ tar \
tests/docker/dockerfiles/fedora-win64-cross.docker +1 -0
@@ -52,6 +52,7 @@ exec "$@"' > /usr/bin/nosync && \ python3-sphinx_rtd_theme \ rpm \ sed \ + socat \ sparse \ spice-protocol \ tar \
tests/docker/dockerfiles/fedora.docker +1 -0
@@ -113,6 +113,7 @@ exec "$@"' > /usr/bin/nosync && \ rpm \ sed \ snappy-devel \ + socat \ sparse \ spice-protocol \ spice-server-devel \
tests/docker/dockerfiles/opensuse-leap.docker +1 -0
@@ -104,6 +104,7 @@ RUN zypper update -y && \ sed \ snappy-devel \ sndio-devel \ + socat \ sparse \ spice-protocol-devel \ systemd-devel \
tests/docker/dockerfiles/ubuntu2004.docker +1 -0
@@ -119,6 +119,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3-yaml \ rpm2cpio \ sed \ + socat \ sparse \ systemtap-sdt-dev \ tar \
tests/lcitool/projects/qemu.yml +1 -0
@@ -101,6 +101,7 @@ packages: - sed - snappy - sndio + - socat - sparse - spice-protocol - spice-server
Signature · 1 line
2.39.2
PATCH v3 3/24 tests: be a bit more strict cleaning up fifos
In reply to Alex BennéeWhen 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.
Message-Id: <[email protected]>
--- tests/unit/test-io-channel-command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tests/unit/test-io-channel-command.c +5 -1
@@ -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 )
Signature · 1 line
2.39.2
PATCH v3 4/24 tests: make fp-test less chatty when running from test suite
In reply to Alex BennéeAs 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
Message-Id: <[email protected]>
--- tests/fp/fp-test.c | 19 ++++++++++++++----- tests/fp/berkeley-testfloat-3 | 2 +- tests/fp/meson.build | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-)
tests/fp/fp-test.c +14 -5
@@ -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 );
tests/fp/berkeley-testfloat-3 +1 -1
@@ -1 +1 @@ -Subproject commit 5a59dcec19327396a011a17fd924aed4fec416b3 +Subproject commit 40619cbb3bf32872df8c53cc457039229428a263
tests/fp/meson.build +1 -1
@@ -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:
Signature · 1 line
2.39.2
Re: [PATCH v3 04/24] tests: make fp-test less chatty when running from test suite
Quoted 8 lines · Alex Bennée
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
Quoted 8 lines
Signed-off-by Alex Bennée<[email protected]>Reviewed-by Thomas Huth<[email protected]>Message-Id:<[email protected]>
--- tests/fp/fp-test.c | 19 ++++++++++++++----- tests/fp/berkeley-testfloat-3 | 2 +- tests/fp/meson.build | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-)
r~
PATCH v3 5/24 gitlab-ci: Use artifacts instead of dumping logs in the Cirrus-CI jobs
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
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.
Message-Id: <[email protected]>
Message-Id: <[email protected]>
--- .gitlab-ci.d/cirrus/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
.gitlab-ci.d/cirrus/build.yml +5 -2
@@ -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
Signature · 1 line
2.39.2
PATCH v3 6/24 gitlab: extend custom runners with base_job_template
In reply to Alex BennéeThe 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.
Message-Id: <[email protected]>
--- .gitlab-ci.d/custom-runners.yml | 3 ++- .gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml | 10 +++++----- .gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml | 2 +- .gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml | 10 +++++----- 4 files changed, 13 insertions(+), 12 deletions(-)
.gitlab-ci.d/custom-runners.yml +2 -1
@@ -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
.gitlab-ci.d/custom-runners/ubuntu-20.04-s390x.yml +5 -5
@@ -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:
.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml +1 -1
@@ -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:
.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml +5 -5
@@ -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:
Signature · 1 line
2.39.2
PATCH v3 7/24 tests: don't run benchmarks for the tsan build
In reply to Alex BennéeAll 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.
Message-Id: <[email protected]>
--- .gitlab-ci.d/buildtest.yml | 1 - 1 file changed, 1 deletion(-)
.gitlab-ci.d/buildtest.yml +0 -1
@@ -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:
Signature · 1 line
2.39.2
Re: [PATCH v3 07/24] tests: don't run benchmarks for the tsan build
Quoted 11 lines · Alex Bennée
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/1496So for now disable the make check and make this a build only test.
Quoted 6 lines
Signed-off-by Alex Bennée<[email protected]>Reviewed-by Thomas Huth<[email protected]>Message-Id:<[email protected]>
--- .gitlab-ci.d/buildtest.yml | 1 - 1 file changed, 1 deletion(-)
r~
PATCH v3 8/24 testing: update ubuntu2004 to ubuntu2204
In reply to Alex BennéeThe 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.
Message-Id: <[email protected]>
--- docs/devel/testing.rst | 4 +- .gitlab-ci.d/buildtest.yml | 18 +-- .gitlab-ci.d/containers.yml | 4 +- tests/docker/dockerfiles/ubuntu2004.docker | 3 - tests/docker/dockerfiles/ubuntu2204.docker | 147 +++++++++++++++++++++ tests/docker/test-tsan | 2 +- tests/lcitool/refresh | 11 +- 7 files changed, 163 insertions(+), 26 deletions(-) create mode 100644 tests/docker/dockerfiles/ubuntu2204.docker
docs/devel/testing.rst +2 -2
@@ -574,13 +574,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/.
.gitlab-ci.d/buildtest.yml +9 -9
@@ -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
.gitlab-ci.d/containers.yml +2 -2
@@ -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
tests/docker/dockerfiles/ubuntu2004.docker +0 -3
@@ -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
tests/docker/dockerfiles/ubuntu2204.docker new file +147 -0
147 lines not on this page · raw message
tests/docker/test-tsan +1 -1
@@ -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.
tests/lcitool/refresh +2 -9
@@ -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
Signature · 1 line
2.39.2
PATCH v3 9/24 tests: skip the nios2 replay_kernel test
In reply to Alex BennéeIt is buggy and keeps failing.
Message-Id: <[email protected]>
--- tests/avocado/replay_kernel.py | 1 + 1 file changed, 1 insertion(+)
tests/avocado/replay_kernel.py +1 -0
@@ -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
Signature · 1 line
2.39.2
PATCH v3 10/24 tests: add tuxrun baseline test to avocado
In reply to Alex BennéeThe 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:
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)
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + tests/avocado/tuxrun_baselines.py | 423 ++++++++++++++++++++++++++++++ 2 files changed, 424 insertions(+) create mode 100644 tests/avocado/tuxrun_baselines.py
MAINTAINERS +1 -0
@@ -3760,6 +3760,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
tests/avocado/tuxrun_baselines.py new file +423 -0
423 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH v3 11/24 tests/docker: Use binaries for debian-tricore-cross
In reply to Alex BennéeFrom: Bastian Koppelmann <[email protected]>
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.
Message-Id: <[email protected]>
Message-Id: <[email protected]>
--- tests/tcg/tricore/macros.h | 2 +- tests/docker/dockerfiles/debian-tricore-cross.docker | 10 +++------- tests/tcg/tricore/Makefile.softmmu-target | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-)
tests/tcg/tricore/macros.h +1 -1
@@ -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; \ )
tests/docker/dockerfiles/debian-tricore-cross.docker +3 -7
@@ -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
tests/tcg/tricore/Makefile.softmmu-target +3 -3
@@ -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 $@ $<
Signature · 1 line
2.39.2
PATCH v3 12/24 tests: ensure we export job results for some cross builds
In reply to Alex BennéeWe 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.
Message-Id: <[email protected]>
--- .gitlab-ci.d/crossbuild-template.yml | 11 +++++++++++ .gitlab-ci.d/crossbuilds.yml | 12 +++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-)
.gitlab-ci.d/crossbuild-template.yml +11 -0
@@ -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
.gitlab-ci.d/crossbuilds.yml +9 -3
@@ -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
Signature · 1 line
2.39.2
PATCH v3 13/24 cirrus.yml: Improve the windows_msys2_task
In reply to Alex BennéeFrom: Thomas Huth <[email protected]>
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).
Message-Id: <[email protected]>
Message-Id: <[email protected]>
--- .cirrus.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
.cirrus.yml +5 -3
@@ -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"
Signature · 1 line
2.39.2
PATCH v3 14/24 tests/dockerfiles: unify debian-toolchain references
In reply to Alex BennéeWe use the debian release number elsewhere so fix it for consistency along with the broken comment.
--- tests/docker/dockerfiles/debian-toolchain.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-toolchain.docker +2 -2
@@ -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
Signature · 1 line
2.39.2
PATCH v3 15/24 gitlab: Use plain docker in container-template.yml
In reply to Alex BennéeFrom: Fabiano Rosas <[email protected]>
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.
Message-Id: <[email protected]>
--- .gitlab-ci.d/container-template.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
.gitlab-ci.d/container-template.yml +4 -5
@@ -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
Signature · 1 line
2.39.2
PATCH v3 16/24 tests: Ensure TAP version is printed before other messages
In reply to Alex BennéeFrom: "Richard W.M. Jones" <[email protected]>
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
Message-Id: <[email protected]>
--- tests/qtest/fuzz-lsi53c895a-test.c | 4 ++-- tests/qtest/rtl8139-test.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-)
tests/qtest/fuzz-lsi53c895a-test.c +2 -2
@@ -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);
tests/qtest/rtl8139-test.c +2 -1
@@ -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);
Signature · 1 line
2.39.2
PATCH v3 17/24 configure: expose the direct container command
In reply to Alex BennéeIn 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.
--- configure | 3 +++ 1 file changed, 3 insertions(+)
configure +3 -0
@@ -1748,6 +1748,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 ;;
@@ -1756,6 +1757,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
@@ -2355,6 +2357,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
Signature · 1 line
2.39.2
PATCH v3 18/24 tests/lcitool: append user setting stanza to dockerfiles
In reply to Alex BennéeFor 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.
---
v2
- don't apply USER/UID to cirrus images
--- tests/docker/dockerfiles/alpine.docker | 5 +++++ tests/docker/dockerfiles/centos8.docker | 5 +++++ .../docker/dockerfiles/debian-amd64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-amd64.docker | 5 +++++ .../docker/dockerfiles/debian-arm64-cross.docker | 5 +++++ .../docker/dockerfiles/debian-armel-cross.docker | 5 +++++ .../docker/dockerfiles/debian-armhf-cross.docker | 5 +++++ .../dockerfiles/debian-mips64el-cross.docker | 5 +++++ .../docker/dockerfiles/debian-mipsel-cross.docker | 5 +++++ .../dockerfiles/debian-ppc64el-cross.docker | 5 +++++ .../docker/dockerfiles/debian-s390x-cross.docker | 5 +++++ .../docker/dockerfiles/fedora-win32-cross.docker | 5 +++++ .../docker/dockerfiles/fedora-win64-cross.docker | 5 +++++ tests/docker/dockerfiles/fedora.docker | 5 +++++ tests/docker/dockerfiles/opensuse-leap.docker | 5 +++++ tests/docker/dockerfiles/ubuntu2004.docker | 5 +++++ tests/docker/dockerfiles/ubuntu2204.docker | 5 +++++ tests/lcitool/refresh | 15 +++++++++++++++ 18 files changed, 100 insertions(+)
tests/docker/dockerfiles/alpine.docker +5 -0
@@ -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
tests/docker/dockerfiles/centos8.docker +5 -0
@@ -134,3 +134,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
tests/docker/dockerfiles/debian-amd64-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-amd64.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-arm64-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-armel-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-armhf-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-mips64el-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-mipsel-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-ppc64el-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-s390x-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/fedora-win32-cross.docker +5 -0
@@ -100,3 +100,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
tests/docker/dockerfiles/fedora-win64-cross.docker +5 -0
@@ -100,3 +100,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
tests/docker/dockerfiles/fedora.docker +5 -0
@@ -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
tests/docker/dockerfiles/opensuse-leap.docker +5 -0
@@ -137,3 +137,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
tests/docker/dockerfiles/ubuntu2004.docker +5 -0
@@ -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
tests/docker/dockerfiles/ubuntu2204.docker +5 -0
@@ -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
tests/lcitool/refresh +15 -0
@@ -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)
Signature · 1 line
2.39.2
Re: [PATCH v3 18/24] tests/lcitool: append user setting stanza to dockerfiles
Quoted 5 lines · Alex Bennée
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 <[email protected]>
With regards,
Daniel
Signature · 3 lines
|: 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 :|
PATCH v3 19/24 tests/docker: add USER stanzas to non-lci images
In reply to Alex BennéeThese are flat but not generated by lcitool so we need to manually update them with the useradd stanza.
--- tests/docker/dockerfiles/debian-all-test-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-alpha-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-hexagon-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-hppa-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-loongarch-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-m68k-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mips-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-mips64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-native.docker | 5 +++++ tests/docker/dockerfiles/debian-powerpc-test-cross.docker | 6 +++++- tests/docker/dockerfiles/debian-riscv64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-riscv64-test-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-sh4-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-sparc64-cross.docker | 5 +++++ tests/docker/dockerfiles/debian-toolchain.docker | 5 +++++ tests/docker/dockerfiles/debian-tricore-cross.docker | 5 +++++ tests/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/python.docker | 5 +++++ 20 files changed, 100 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian-all-test-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-alpha-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-hexagon-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-hppa-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-loongarch-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-m68k-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-mips-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-mips64-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-native.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-powerpc-test-cross.docker +5 -1
@@ -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
tests/docker/dockerfiles/debian-riscv64-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-riscv64-test-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-sh4-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-sparc64-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-toolchain.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-tricore-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/debian-xtensa-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/fedora-cris-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/fedora-i386-cross.docker +5 -0
@@ -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
tests/docker/dockerfiles/python.docker +5 -0
@@ -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
Signature · 1 line
2.39.2
PATCH v3 20/24 tests/docker: use direct RUNC call to build containers
In reply to Alex BennéeWe 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.
--- tests/docker/Makefile.include | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
tests/docker/Makefile.include +14 -9
@@ -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
Signature · 1 line
2.39.2
PATCH v3 21/24 tests/docker: use direct RUNC call to run test jobs
In reply to Alex BennéeIf we build them without the script we can certainly run them without it.
--- tests/docker/Makefile.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/docker/Makefile.include +3 -2
@@ -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) \
Signature · 1 line
2.39.2
PATCH v3 22/24 gitlab: move the majority of artefact handling to a template
In reply to Alex BennéeTo 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.
--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)
.gitlab-ci.d/buildtest-template.yml +16 -0
@@ -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
.gitlab-ci.d/buildtest.yml +30 -51
201 lines not on this page · raw message
Signature · 1 line
2.39.2
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 11 lines · Alex Bennée
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.
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present. Still an improvement, so
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Alex Bennée
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.Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)
Quoted 3 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present. Still an improvement, so
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Is something being missed by:
# Avoid recompiling by hiding ninja with NINJA=":"
- make NINJA=":" $MAKE_CHECK_ARGS
?
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 23 lines · Alex Bennée
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Alex Bennée
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.Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)Quoted 3 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present. Still an improvement, so
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 6 lines
Is something being missed by:
# Avoid recompiling by hiding ninja with NINJA=":"
- make NINJA=":" $MAKE_CHECK_ARGS?
Sorry, I wasn't looking at the correct pipeline.
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
In reply to Philippe Mathieu-DaudéQuoted 12 lines · Philippe Mathieu-Daudé
Quoted 11 lines · Alex Bennée
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.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>---
.gitlab-ci.d/buildtest-template.yml| 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------2 files changed, 46 insertions(+), 51 deletions(-)This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present.
Did you try? ... if so, that would kill even more CI minutes, i.e. it would IMHO be a show-stopper for this patch.
Thomas
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 19 lines · Thomas Huth
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Alex Bennée
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 <[email protected]>---
.gitlab-ci.d/buildtest-template.yml| 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------2 files changed, 46 insertions(+), 51 deletions(-)
Quoted 4 lines
Quoted 2 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present.
Did you try? ... if so, that would kill even more CI minutes, i.e. it would IMHO be a show-stopper for this patch.
I remember we had to pass all build/ otherwise calling 'make check-qtest check-tcg' would rebuild the same binaries, it it was pointless to split the jobs in 2 stages. I might have missed when that was fixed.
I haven't tried, however I see in Alex job:
$ scripts/git-submodule.sh update $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) sed: can't read build/config-host.mak: No such file or directory $ cd build /bin/bash: line 144: cd: build: No such file or directory ERROR: Job failed: exit code 1
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 32 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Thomas Huth
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Alex Bennée
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 <[email protected]>---
.gitlab-ci.d/buildtest-template.yml| 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------2 files changed, 46 insertions(+), 51 deletions(-)Quoted 4 lines
Quoted 2 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present.
Did you try? ... if so, that would kill even more CI minutes, i.e. it would IMHO be a show-stopper for this patch.
I remember we had to pass all build/ otherwise calling 'make check-qtest check-tcg' would rebuild the same binaries, it it was pointless to split the jobs in 2 stages. I might have missed when that was fixed.
I haven't tried, however I see in Alex job:
Quoted 8 lines
$ scripts/git-submodule.sh update $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) sed: can't read build/config-host.mak: No such file or directory $ cd build /bin/bash: line 144: cd: build: No such file or directory ERROR: Job failed: exit code 1
That was an older run of the job where I thought the skip path would merge from the template. In the end I've just include git-submodules in all the build aretfacts instead of just for alpine.
It ran fine:
https://gitlab.com/stsquad/qemu/-/jobs/3849512854
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 44 lines · Alex Bennée
Quoted 32 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Thomas Huth
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Alex Bennée
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 <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)Quoted 4 lines
Quoted 2 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present.
Did you try? ... if so, that would kill even more CI minutes, i.e. it would IMHO be a show-stopper for this patch.
I remember we had to pass all build/ otherwise calling 'make check-qtest check-tcg' would rebuild the same binaries, it it was pointless to split the jobs in 2 stages. I might have missed when that was fixed.
I haven't tried, however I see in Alex job:
Quoted 8 lines
$ scripts/git-submodule.sh update $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) sed: can't read build/config-host.mak: No such file or directory $ cd build /bin/bash: line 144: cd: build: No such file or directory ERROR: Job failed: exit code 1
Quoted 7 lines
That was an older run of the job where I thought the skip path would merge from the template. In the end I've just include git-submodules in all the build aretfacts instead of just for alpine.
It ran fine:
https://gitlab.com/stsquad/qemu/-/jobs/3849512854
Indeed:
https://gitlab.com/stsquad/qemu/-/jobs/3849512800/artifacts/browse/build/
So a good improvement, but I'd prefer having a stricter "only include what we need" policy rather than "exclude what we don't". The former will catch missing additions, while the later won't notice until someone spend time excluding pointless files manually again.
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 49 lines · Philippe Mathieu-Daudé
Quoted 41 lines · Alex Bennée
Quoted 39 lines · Philippe Mathieu-Daudé
Quoted 19 lines · Thomas Huth
Quoted 18 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Alex Bennée
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 <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-)Quoted 4 lines
Quoted 2 lines
This is still kludging the fact that 'make check-qtest' rebuild the world even if QEMU binaries are present.
Did you try? ... if so, that would kill even more CI minutes, i.e. it would IMHO be a show-stopper for this patch.
I remember we had to pass all build/ otherwise calling 'make check-qtest check-tcg' would rebuild the same binaries, it it was pointless to split the jobs in 2 stages. I might have missed when that was fixed.
I haven't tried, however I see in Alex job:
$ scripts/git-submodule.sh update $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) sed: can't read build/config-host.mak: No such file or directory $ cd build /bin/bash: line 144: cd: build: No such file or directory ERROR: Job failed: exit code 1Quoted 6 lines
Quoted 1 line
That was an older run of the job where I thought the skip path would merge from the template. In the end I've just include git-submodules in all the build aretfacts instead of just for alpine.
It ran fine:https://gitlab.com/stsquad/qemu/-/jobs/3849512854
Quoted 7 lines
Indeed:
https://gitlab.com/stsquad/qemu/-/jobs/3849512800/artifacts/browse/build/So a good improvement, but I'd prefer having a stricter "only include what we need" policy rather than "exclude what we don't". The former will catch missing additions, while the later won't notice until someone spend time excluding pointless files manually again.
I'd argue the opposite because its hard to come up with patterns for all the binaries we build but easy for all the object files.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
In reply to Alex BennéeQuoted 49 lines · Alex Bennée
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 <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-).gitlab-ci.d/buildtest-template.yml +16
-0@@ -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.gitlab-ci.d/buildtest.yml +0
-0
.gitlab-ci.d/buildtest.yml include: · line 7
Quoted 7 lines
.gitlab-ci.d/buildtest.yml +3
-1@@ -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
I'm confused... Apparently this doesn't work:
https://gitlab.com/stsquad/qemu/-/jobs/3847747681/artifacts/browse
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
Quoted 48 lines · Philippe Mathieu-Daudé
Quoted 47 lines · Alex Bennée
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 <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-).gitlab-ci.d/buildtest-template.yml +15
-0@@ -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.gitlab-ci.d/buildtest.yml +0
-0@@ -2,7 +2,9 @@ include: - local: '/.gitlab-ci.d/buildtest-template.yml'
Quoted 8 lines
.gitlab-ci.d/buildtest.yml include: · line 7
Quoted 5 lines
.gitlab-ci.d/buildtest.yml +3
-1build-system-alpine: - extends: .native_build_job_template + extends: + - .native_build_job_template + - .native_build_artifact_templateI'm confused... Apparently this doesn't work:
https://gitlab.com/stsquad/qemu/-/jobs/3847747681/artifacts/browse
Nope you are one run behind ;-)
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 22/24] gitlab: move the majority of artefact handling to a template
In reply to Alex BennéeQuoted 30 lines · Alex Bennée
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 <[email protected]>--- .gitlab-ci.d/buildtest-template.yml | 16 ++++++ .gitlab-ci.d/buildtest.yml | 81 +++++++++++------------------ 2 files changed, 46 insertions(+), 51 deletions(-).gitlab-ci.d/buildtest-template.yml +5
-0@@ -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
.gitlab-ci.d/buildtest-template.yml line 42
Quoted 10 lines
.gitlab-ci.d/buildtest-template.yml +10
-0+ paths: + - build + - .git-submodule-status + exclude: + - build/**/*.p + - build/**/*.a.p + - build/**/*.fa.p + - build/**/*.c.o + - build/**/*.c.o.d + - build/**/*.fa
Why not exclude "build/**/*.a", was there some issue?
PATCH v3 23/24 tests/docker: add zstdtools to the images (!AWAITING UPSTREAM)
In reply to Alex BennéeWe need this to be able to run the tuxrun_baseline tests in CI which in turn helps us reduce overhead running other tests.
[See https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/361]
--- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 3 ++- tests/docker/dockerfiles/debian-amd64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-amd64.docker | 3 ++- tests/docker/dockerfiles/debian-arm64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armhf-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mips64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mipsel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-s390x-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win32-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win64-cross.docker | 3 ++- tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 3 ++- tests/docker/dockerfiles/ubuntu2004.docker | 3 ++- tests/docker/dockerfiles/ubuntu2204.docker | 3 ++- tests/lcitool/projects/qemu.yml | 1 + 18 files changed, 34 insertions(+), 16 deletions(-)
tests/docker/dockerfiles/alpine.docker +1 -0
@@ -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 && \
tests/docker/dockerfiles/centos8.docker +2 -1
@@ -118,7 +118,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 && \
tests/docker/dockerfiles/debian-amd64-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-amd64.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-arm64-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-armel-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-armhf-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-mips64el-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-mipsel-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/debian-s390x-cross.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/fedora-win32-cross.docker +2 -1
@@ -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
tests/docker/dockerfiles/fedora-win64-cross.docker +2 -1
@@ -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
tests/docker/dockerfiles/fedora.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/opensuse-leap.docker +2 -1
@@ -120,7 +120,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 && \
tests/docker/dockerfiles/ubuntu2004.docker +2 -1
@@ -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 && \
tests/docker/dockerfiles/ubuntu2204.docker +2 -1
@@ -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 && \
tests/lcitool/projects/qemu.yml +1 -0
@@ -116,5 +116,6 @@ packages: - which - xen - xfsprogs + - zstdtools - zlib - zlib-static
Signature · 1 line
2.39.2
Re: [PATCH v3 23/24] tests/docker: add zstdtools to the images (!AWAITING UPSTREAM)
Quoted 18 lines · Alex Bennée
We need this to be able to run the
tuxrun_baselinetests in CI which in turn helps us reduce overhead running other tests.[See https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/361]
Signed-off-by Alex Bennée <[email protected]>--- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 3 ++- tests/docker/dockerfiles/debian-amd64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-amd64.docker | 3 ++- tests/docker/dockerfiles/debian-arm64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armhf-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mips64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mipsel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-s390x-cross.docker | 3 ++-
Quoted 8 lines
tests/docker/dockerfiles/fedora-win32-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win64-cross.docker | 3 ++- tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 3 ++- tests/docker/dockerfiles/ubuntu2004.docker | 3 ++- tests/docker/dockerfiles/ubuntu2204.docker | 3 ++- tests/lcitool/projects/qemu.yml | 1 + 18 files changed, 34 insertions(+), 16 deletions(-)
You simply ran 'lcitool-refresh', right? (not obvious from the commit desc).
If #361 got merged, this patch should also change the tests/lcitool/libvirt-ci submodule to include it, isn't it?
Re: [PATCH v3 23/24] tests/docker: add zstdtools to the images (!AWAITING UPSTREAM)
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 16 lines · Alex Bennée
We need this to be able to run the
tuxrun_baselinetests in CI which in turn helps us reduce overhead running other tests.[See https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/361]Signed-off-by Alex Bennée <[email protected]>--- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 3 ++- tests/docker/dockerfiles/debian-amd64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-amd64.docker | 3 ++- tests/docker/dockerfiles/debian-arm64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armhf-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mips64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mipsel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-s390x-cross.docker | 3 ++-Quoted 8 lines
tests/docker/dockerfiles/fedora-win32-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win64-cross.docker | 3 ++- tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 3 ++- tests/docker/dockerfiles/ubuntu2004.docker | 3 ++- tests/docker/dockerfiles/ubuntu2204.docker | 3 ++- tests/lcitool/projects/qemu.yml | 1 + 18 files changed, 34 insertions(+), 16 deletions(-)
Quoted 5 lines
You simply ran 'lcitool-refresh', right? (not obvious from the commit desc).
If #361 got merged, this patch should also change the tests/lcitool/libvirt-ci submodule to include it, isn't it?
Yes - I've already done that in my PR branch.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Philippe Mathieu-Daudé
Reviewed-byRe: [PATCH v3 23/24] tests/docker: add zstdtools to the images (!AWAITING UPSTREAM)
Quoted 29 lines · Alex Bennée
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Alex Bennée
We need this to be able to run the
tuxrun_baselinetests in CI which in turn helps us reduce overhead running other tests.[See https://gitlab.com/libvirt/libvirt-ci/-/merge_requests/361]Signed-off-by Alex Bennée <[email protected]>--- tests/docker/dockerfiles/alpine.docker | 1 + tests/docker/dockerfiles/centos8.docker | 3 ++- tests/docker/dockerfiles/debian-amd64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-amd64.docker | 3 ++- tests/docker/dockerfiles/debian-arm64-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-armhf-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mips64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-mipsel-cross.docker | 3 ++- tests/docker/dockerfiles/debian-ppc64el-cross.docker | 3 ++- tests/docker/dockerfiles/debian-s390x-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win32-cross.docker | 3 ++- tests/docker/dockerfiles/fedora-win64-cross.docker | 3 ++- tests/docker/dockerfiles/fedora.docker | 3 ++- tests/docker/dockerfiles/opensuse-leap.docker | 3 ++- tests/docker/dockerfiles/ubuntu2004.docker | 3 ++- tests/docker/dockerfiles/ubuntu2204.docker | 3 ++- tests/lcitool/projects/qemu.yml | 1 + 18 files changed, 34 insertions(+), 16 deletions(-)
Quoted 7 lines
Quoted 5 lines
You simply ran 'lcitool-refresh', right? (not obvious from the commit desc).
If #361 got merged, this patch should also change the tests/lcitool/libvirt-ci submodule to include it, isn't it?
Yes - I've already done that in my PR branch.
Then:
If you don't mind, please amend:
"refresh the generated files by running 'make lcitool-refresh'" to the description.
PATCH v3 24/24 tests/avocado: disable BootLinuxPPC64 test in CI
In reply to Alex BennéeThis 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 also unless AVOCADO_TIMEOUT_EXPECTED is specified by the user.
--- tests/avocado/boot_linux.py | 4 ++++ 1 file changed, 4 insertions(+)
tests/avocado/boot_linux.py +4 -0
@@ -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,8 @@ class BootLinuxPPC64(LinuxTest): timeout = 360 + @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') + @skipIf(os.getenv('GITLAB_CI'), 'Running on GitLab') def test_pseries_tcg(self): """ :avocado: tags=machine:pseries
Signature · 1 line
2.39.2
Re: [PATCH v3 24/24] tests/avocado: disable BootLinuxPPC64 test in CI
Quoted 19 lines · Alex Bennée
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)
Quoted 7 lines
So lets skip for
GITLAB_CIand also unlessAVOCADO_TIMEOUT_EXPECTEDis specified by the user.Signed-off-by Alex Bennée <[email protected]>--- tests/avocado/boot_linux.py | 4 ++++ 1 file changed, 4 insertions(+)
Re: [PATCH v3 24/24] tests/avocado: disable BootLinuxPPC64 test in CI
In reply to Alex BennéeQuoted 14 lines · Alex Bennée
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:
Quoted 7 lines
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_CIand also unlessAVOCADO_TIMEOUT_EXPECTEDis specified by the user.
The explanation sounds somewhat implausible to me. AVOCADO_TIMEOUT_EXPECTED should be for jobs where we are not sure whether the job really finishes in time, e.g. when compiling QEMU with debug flags enabled, and not for jobs that simply run a little bit longer (in the latter case, it would be enough to simply bump the timeout setting a little bit if necessary). So did you check whether you really run into timeout issues here when compiling QEMU with debug flags?
Anyway, if you add AVOCADO_TIMEOUT_EXPECTED, then I think you don't need GITLAB_CI anymore, since we certainly don't set AVOCADO_TIMEOUT_EXPECTED in the gitlab CI.
Thomas
Re: [PATCH v3 24/24] tests/avocado: disable BootLinuxPPC64 test in CI
Quoted 19 lines · Thomas Huth
Quoted 14 lines · Alex Bennée
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)Quoted 3 lines
So lets skip for
GITLAB_CIand also unlessAVOCADO_TIMEOUT_EXPECTEDis
specified by the user.
Quoted 8 lines
The explanation sounds somewhat implausible to me.
AVOCADO_TIMEOUT_EXPECTEDshould be for jobs where we are not sure whether the job really finishes in time, e.g. when compiling QEMU with debug flags enabled, and not for jobs that simply run a little bit longer (in the latter case, it would be enough to simply bump the timeout setting a little bit if necessary). So did you check whether you really run into timeout issues here when compiling QEMU with debug flags?
Ahh I realise now that I was running into the timeout because it was a gcov build. I'll drop the AVOACADO_TIMEOUT_EXPECTED bit for now.
Quoted 6 lines
Anyway, if you add
AVOCADO_TIMEOUT_EXPECTED, then I think you don't needGITLAB_CIanymore, since we certainly don't setAVOCADO_TIMEOUT_EXPECTEDin the gitlab CI.Thomas
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Re: [PATCH v3 24/24] tests/avocado: disable BootLinuxPPC64 test in CI
Quoted 31 lines · Alex Bennée
Quoted 19 lines · Thomas Huth
Quoted 14 lines · Alex Bennée
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)Quoted 3 lines
So lets skip for
GITLAB_CIand also unlessAVOCADO_TIMEOUT_EXPECTEDis
specified by the user.Quoted 8 lines
The explanation sounds somewhat implausible to me.
AVOCADO_TIMEOUT_EXPECTEDshould be for jobs where we are not sure whether the job really finishes in time, e.g. when compiling QEMU with debug flags enabled, and not for jobs that simply run a little bit longer (in the latter case, it would be enough to simply bump the timeout setting a little bit if necessary). So did you check whether you really run into timeout issues here when compiling QEMU with debug flags?
Quoted 7 lines
Ahh I realise now that I was running into the timeout because it was a gcov build. I'll drop the
AVOACADO_TIMEOUT_EXPECTEDbit for now.Quoted 4 lines
Anyway, if you add
AVOCADO_TIMEOUT_EXPECTED, then I think you don't needGITLAB_CIanymore, since we certainly don't setAVOCADO_TIMEOUT_EXPECTEDin the gitlab CI.
Correct we won't run AVOCADO_TIMEOUT_EXPECTED on GitLab CI. Note however GITLAB_CI and AVOCADO_TIMEOUT_EXPECTED are not orthogonal. See docs/devel/testing.rst:
AVOCADO_TIMEOUT_EXPECTED
...
Even though the timeout can be set by the test developer, there are some tests that may not have a well-defined limit of time to finish under certain conditions. For example, tests that take longer to execute when QEMU is compiled with debug flags. Therefore, the ``AVOCADO_TIMEOUT_EXPECTED`` variable has been used to determine whether those tests should run or not.
GITLAB_CI
A number of tests are flagged to not run on the GitLab CI. Usually because they proved to the flaky or there are constraints on the CI environment which would make them fail.
Personally I run the Avocado tests on a daily basis without AVOCADO_TIMEOUT_EXPECTED, but certainly set it before posting a pull request.