* [PULL 1/7] meson.build: expose TCG cross compiler information in summary
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 2/7] docker: Bump Fedora images to release 33 Alex Bennée
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Richard Henderson, Paolo Bonzini, Alex Bennée, qemu-devel,
Philippe Mathieu-Daudé
Blink and you miss the cross TCG compiler stuff so lets display it
with the rest of the compiler information.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210222101455.12640-2-alex.bennee@linaro.org>
diff --git a/meson.build b/meson.build
index 05a67c20d9..f3db83e974 100644
--- a/meson.build
+++ b/meson.build
@@ -2509,6 +2509,24 @@ endif
summary_info += {'strip binaries': get_option('strip')}
summary_info += {'sparse': sparse.found() ? sparse.full_path() : false}
summary_info += {'mingw32 support': targetos == 'windows'}
+
+# snarf the cross-compilation information for tests
+foreach target: target_dirs
+ tcg_mak = meson.current_build_dir() / 'tests/tcg' / 'config-' + target + '.mak'
+ if fs.exists(tcg_mak)
+ config_cross_tcg = keyval.load(tcg_mak)
+ target = config_cross_tcg['TARGET_NAME']
+ compiler = ''
+ if 'DOCKER_CROSS_CC_GUEST' in config_cross_tcg
+ summary_info += {target + ' tests': config_cross_tcg['DOCKER_CROSS_CC_GUEST'] +
+ ' via ' + config_cross_tcg['DOCKER_IMAGE']}
+ elif 'CROSS_CC_GUEST' in config_cross_tcg
+ summary_info += {target + ' tests'
+ : config_cross_tcg['CROSS_CC_GUEST'] }
+ endif
+ endif
+endforeach
+
summary(summary_info, bool_yn: true, section: 'Compilation')
# Targets and accelerators
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 551c02f469..36b8a73a54 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -263,11 +263,3 @@ for target in $target_list; do
echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
fi
done
-
-# report container support state
-echo "cross containers $container"
-
-if test -n "$enabled_cross_compilers"; then
- echo
- echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
-fi
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/7] docker: Bump Fedora images to release 33
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
2021-02-24 11:49 ` [PULL 1/7] meson.build: expose TCG cross compiler information in summary Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 3/7] tests/acceptance: allow a "graceful" failing for virtio-gpu test Alex Bennée
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Fam Zheng, Daniel Berrangé, Philippe Mathieu-Daudé,
Richard Henderson, qemu-devel, Alex Bennée
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Fedora 33 was released on October 27, 2020.
Update all the Fedora 32 images to this new release.
Suggested-by: Daniel Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210118181255.314672-1-philmd@redhat.com>
Message-Id: <20210222101455.12640-3-alex.bennee@linaro.org>
diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker
index 09e7e449f9..1dfff6e0b9 100644
--- a/tests/docker/dockerfiles/fedora-cris-cross.docker
+++ b/tests/docker/dockerfiles/fedora-cris-cross.docker
@@ -2,7 +2,7 @@
# Cross compiler for cris system tests
#
-FROM fedora:30
+FROM fedora:33
ENV PACKAGES gcc-cris-linux-gnu
RUN dnf install -y $PACKAGES
RUN rpm -q $PACKAGES | sort > /packages.txt
diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker
index a6e411291b..966072c08e 100644
--- a/tests/docker/dockerfiles/fedora-i386-cross.docker
+++ b/tests/docker/dockerfiles/fedora-i386-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:31
+FROM fedora:33
ENV PACKAGES \
bzip2 \
diffutils \
diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker
index 087df598a0..81b5659e9c 100644
--- a/tests/docker/dockerfiles/fedora-win32-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win32-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:32
+FROM fedora:33
# Please keep this list sorted alphabetically
ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker
index d5d2f5f00d..bcb428e724 100644
--- a/tests/docker/dockerfiles/fedora-win64-cross.docker
+++ b/tests/docker/dockerfiles/fedora-win64-cross.docker
@@ -1,4 +1,4 @@
-FROM fedora:32
+FROM fedora:33
# Please keep this list sorted alphabetically
ENV PACKAGES \
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index 0d7602abbe..915fdc1845 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -1,4 +1,4 @@
-FROM fedora:32
+FROM fedora:33
# Please keep this list sorted alphabetically
ENV PACKAGES \
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 3/7] tests/acceptance: allow a "graceful" failing for virtio-gpu test
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
2021-02-24 11:49 ` [PULL 1/7] meson.build: expose TCG cross compiler information in summary Alex Bennée
2021-02-24 11:49 ` [PULL 2/7] docker: Bump Fedora images to release 33 Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 4/7] docs/devel: expand on use of containers to build tests Alex Bennée
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Philippe Mathieu-Daudé, Richard Henderson, qemu-devel,
Wainer dos Santos Moschetta, Willian Rampazzo, Cleber Rosa,
Marc-André Lureau, Alex Bennée
This is a band-aid with a TODO for cases when QEMU doesn't start due
to missing VirGL. Longer term we could do with some proper feature
probing.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210222101455.12640-4-alex.bennee@linaro.org>
diff --git a/tests/acceptance/virtio-gpu.py b/tests/acceptance/virtio-gpu.py
index ab1a4c1a71..ab18cddbb7 100644
--- a/tests/acceptance/virtio-gpu.py
+++ b/tests/acceptance/virtio-gpu.py
@@ -85,7 +85,12 @@ def test_virtio_vga_virgl(self):
"-append",
kernel_command_line,
)
- self.vm.launch()
+ try:
+ self.vm.launch()
+ except:
+ # TODO: probably fails because we are missing the VirGL features
+ self.cancel("VirGL not enabled?")
+
self.wait_for_console_pattern("as init process")
exec_command_and_wait_for_pattern(
self, "/usr/sbin/modprobe virtio_gpu", ""
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 4/7] docs/devel: expand on use of containers to build tests
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
` (2 preceding siblings ...)
2021-02-24 11:49 ` [PULL 3/7] tests/acceptance: allow a "graceful" failing for virtio-gpu test Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 5/7] docs/devel: update the container based tests Alex Bennée
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Richard Henderson, Thomas Huth, Alex Bennée, qemu-devel
Expand on the usage of containers for building tests and why we have
some that are not used to build QEMU itself.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Message-Id: <20210222101455.12640-5-alex.bennee@linaro.org>
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 00ce16de48..488d4e3537 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -272,10 +272,10 @@ Note that the following group names have a special meaning:
- disabled: Tests in this group are disabled and ignored by check.
-.. _docker-ref:
+.. _container-ref:
-Docker based tests
-==================
+Container based tests
+=====================
Introduction
------------
@@ -1001,10 +1001,17 @@ for the architecture in question, for example::
There is also a ``--cross-cc-flags-ARCH`` flag in case additional
compiler flags are needed to build for a given target.
-If you have the ability to run containers as the user you can also
-take advantage of the build systems "Docker" support. It will then use
-containers to build any test case for an enabled guest where there is
-no system compiler available. See :ref:`docker-ref` for details.
+If you have the ability to run containers as the user the build system
+will automatically use them where no system compiler is available. For
+architectures where we also support building QEMU we will generally
+use the same container to build tests. However there are a number of
+additional containers defined that have a minimal cross-build
+environment that is only suitable for building test cases. Sometimes
+we may use a bleeding edge distribution for compiler features needed
+for test cases that aren't yet in the LTS distros we support for QEMU
+itself.
+
+See :ref:`container-ref` for more details.
Running subset of tests
-----------------------
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 5/7] docs/devel: update the container based tests
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
` (3 preceding siblings ...)
2021-02-24 11:49 ` [PULL 4/7] docs/devel: expand on use of containers to build tests Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 6/7] docs/devel: add forward reference to check-tcg Alex Bennée
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Richard Henderson, Thomas Huth, Alex Bennée, qemu-devel
This section has grown a little stale so clean-up the language and
examples for current usage:
- refer to containers at the top
- mention podman can also be used
- add podman prerequisites section
- move to using "docker-help" for online help
- mention the registry and it's purpose
- don't refer to out-of-date min-glib image
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210222101455.12640-6-alex.bennee@linaro.org>
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 488d4e3537..e57260478a 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -280,13 +280,17 @@ Container based tests
Introduction
------------
-The Docker testing framework in QEMU utilizes public Docker images to build and
-test QEMU in predefined and widely accessible Linux environments. This makes
-it possible to expand the test coverage across distros, toolchain flavors and
-library versions.
-
-Prerequisites
--------------
+The container testing framework in QEMU utilizes public images to
+build and test QEMU in predefined and widely accessible Linux
+environments. This makes it possible to expand the test coverage
+across distros, toolchain flavors and library versions. The support
+was originally written for Docker although we also support Podman as
+an alternative container runtime. Although the many of the target
+names and scripts are prefixed with "docker" the system will
+automatically run on whichever is configured.
+
+Docker Prerequisites
+--------------------
Install "docker" with the system package manager and start the Docker service
on your development machine, then make sure you have the privilege to run
@@ -316,26 +320,53 @@ Note that any one of above configurations makes it possible for the user to
exploit the whole host with Docker bind mounting or other privileged
operations. So only do it on development machines.
+Podman Prerequisites
+--------------------
+
+Install "podman" with the system package manager.
+
+.. code::
+
+ $ sudo dnf install podman
+ $ podman ps
+
+The last command should print an empty table, to verify the system is ready.
+
Quickstart
----------
-From source tree, type ``make docker`` to see the help. Testing can be started
-without configuring or building QEMU (``configure`` and ``make`` are done in
-the container, with parameters defined by the make target):
+From source tree, type ``make docker-help`` to see the help. Testing
+can be started without configuring or building QEMU (``configure`` and
+``make`` are done in the container, with parameters defined by the
+make target):
.. code::
- make docker-test-build@min-glib
+ make docker-test-build@centos8
-This will create a container instance using the ``min-glib`` image (the image
+This will create a container instance using the ``centos8`` image (the image
is downloaded and initialized automatically), in which the ``test-build`` job
is executed.
+Registry
+--------
+
+The QEMU project has a container registry hosted by GitLab at
+``registry.gitlab.com/qemu-project/qemu`` which will automatically be
+used to pull in pre-built layers. This avoids unnecessary strain on
+the distro archives created by multiple developers running the same
+container build steps over and over again. This can be overridden
+locally by using the ``NOCACHE`` build option:
+
+.. code::
+
+ make docker-image-debian10 NOCACHE=1
+
Images
------
-Along with many other images, the ``min-glib`` image is defined in a Dockerfile
-in ``tests/docker/dockerfiles/``, called ``min-glib.docker``. ``make docker``
+Along with many other images, the ``centos8`` image is defined in a Dockerfile
+in ``tests/docker/dockerfiles/``, called ``centos8.docker``. ``make docker-help``
command will list all the available images.
To add a new image, simply create a new ``.docker`` file under the
@@ -355,7 +386,7 @@ QEMU. Docker tests are the executables under ``tests/docker`` named
library, ``tests/docker/common.rc``, which provides helpers to find the QEMU
source and build it.
-The full list of tests is printed in the ``make docker`` help.
+The full list of tests is printed in the ``make docker-help`` help.
Debugging a Docker test failure
-------------------------------
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 6/7] docs/devel: add forward reference to check-tcg
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
` (4 preceding siblings ...)
2021-02-24 11:49 ` [PULL 5/7] docs/devel: update the container based tests Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-02-24 11:49 ` [PULL 7/7] docs: move CODING_STYLE into the developer documentation Alex Bennée
2021-03-02 15:17 ` [PULL 0/7] testing updates (build, docs, dumps) Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell
Cc: Richard Henderson, Thomas Huth, Alex Bennée, qemu-devel,
Philippe Mathieu-Daudé
For completeness reference the check-tcg tests in the container
preamble text.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Message-Id: <20210222101455.12640-7-alex.bennee@linaro.org>
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index e57260478a..1434a50cc4 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -289,6 +289,9 @@ an alternative container runtime. Although the many of the target
names and scripts are prefixed with "docker" the system will
automatically run on whichever is configured.
+The container images are also used to augment the generation of tests
+for testing TCG. See :ref:`checktcg-ref` for more details.
+
Docker Prerequisites
--------------------
@@ -1011,6 +1014,8 @@ And remove any package you want with::
If you've used ``make check-acceptance``, the Python virtual environment where
Avocado is installed will be cleaned up as part of ``make check-clean``.
+.. _checktcg-ref:
+
Testing with "make check-tcg"
=============================
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 7/7] docs: move CODING_STYLE into the developer documentation
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
` (5 preceding siblings ...)
2021-02-24 11:49 ` [PULL 6/7] docs/devel: add forward reference to check-tcg Alex Bennée
@ 2021-02-24 11:49 ` Alex Bennée
2021-03-02 15:17 ` [PULL 0/7] testing updates (build, docs, dumps) Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2021-02-24 11:49 UTC (permalink / raw)
To: peter.maydell; +Cc: Alex Bennée, qemu-devel, Claudio Fontana
There is no particular reason to keep this on it's own in the root of
the tree. Move it into the rest of the fine developer manual and fixup
any links to it. The only tweak I've made is to fix the code-block
annotations to mention the language C.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20210223095931.16908-1-alex.bennee@linaro.org>
diff --git a/docs/devel/index.rst b/docs/devel/index.rst
index 22854e334d..ae664da00c 100644
--- a/docs/devel/index.rst
+++ b/docs/devel/index.rst
@@ -14,6 +14,7 @@ Contents:
:maxdepth: 2
build-system
+ style
kconfig
testing
fuzzing
diff --git a/CODING_STYLE.rst b/docs/devel/style.rst
similarity index 99%
rename from CODING_STYLE.rst
rename to docs/devel/style.rst
index 7bf4e39d48..8b0bdb3570 100644
--- a/CODING_STYLE.rst
+++ b/docs/devel/style.rst
@@ -641,7 +641,7 @@ trace-events style
In trace-events files, use a '0x' prefix to specify hex numbers, as in:
-.. code-block::
+.. code-block:: c
some_trace(unsigned x, uint64_t y) "x 0x%x y 0x" PRIx64
@@ -649,14 +649,14 @@ An exception is made for groups of numbers that are hexadecimal by
convention and separated by the symbols '.', '/', ':', or ' ' (such as
PCI bus id):
-.. code-block::
+.. code-block:: c
another_trace(int cssid, int ssid, int dev_num) "bus id: %x.%x.%04x"
However, you can use '0x' for such groups if you want. Anyway, be sure that
it is obvious that numbers are in hex, ex.:
-.. code-block::
+.. code-block:: c
data_dump(uint8_t c1, uint8_t c2, uint8_t c3) "bytes (in hex): %02x %02x %02x"
diff --git a/README.rst b/README.rst
index ce39d89077..91aa1e314c 100644
--- a/README.rst
+++ b/README.rst
@@ -66,7 +66,9 @@ When submitting patches, one common approach is to use 'git
format-patch' and/or 'git send-email' to format & send the mail to the
qemu-devel@nongnu.org mailing list. All patches submitted must contain
a 'Signed-off-by' line from the author. Patches should follow the
-guidelines set out in the CODING_STYLE.rst file.
+guidelines set out in the `style section
+<https://www.qemu.org/docs/master/devel/style.html>` of
+the Developers Guide.
Additional information on submitting patches can be found online via
the QEMU website
diff --git a/scripts/fix-multiline-comments.sh b/scripts/fix-multiline-comments.sh
index 93f9b10669..c15a041272 100755
--- a/scripts/fix-multiline-comments.sh
+++ b/scripts/fix-multiline-comments.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Fix multiline comments to match CODING_STYLE
+# Fix multiline comments to match docs/devel/style.rst
#
# Copyright (C) 2018 Red Hat, Inc.
#
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL 0/7] testing updates (build, docs, dumps)
2021-02-24 11:49 [PULL 0/7] testing updates (build, docs, dumps) Alex Bennée
` (6 preceding siblings ...)
2021-02-24 11:49 ` [PULL 7/7] docs: move CODING_STYLE into the developer documentation Alex Bennée
@ 2021-03-02 15:17 ` Peter Maydell
7 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2021-03-02 15:17 UTC (permalink / raw)
To: Alex Bennée; +Cc: QEMU Developers
On Wed, 24 Feb 2021 at 11:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> The following changes since commit 7ef8134565dccf9186d5eabd7dbb4ecae6dead87:
>
> Merge remote-tracking branch 'remotes/edgar/tags/edgar/cris-next-2021-02-22.for-upstream' into staging (2021-02-22 14:20:32 +0000)
>
> are available in the Git repository at:
>
> https://github.com/stsquad/qemu.git tags/pull-testing-updates-240221-1
>
> for you to fetch changes up to 93a11007681a8051c07834c52d785a2948ff9632:
>
> docs: move CODING_STYLE into the developer documentation (2021-02-24 11:05:21 +0000)
>
> ----------------------------------------------------------------
> Testing tweaks (build, docs, bumps)
>
> - expose cross compiler info in meson pretty print
> - bump Fedora to 33
> - "graceful" handling of missing virgl config
> - updates to the container documentation
> - move CODING_STYLE.rst into developer manual
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread