@@ -272,21 +272,28 @@ Note that the following group names have a special meaning:
272272
273273- disabled: Tests in this group are disabled and ignored by check.
274274
275- .. _ docker -ref :
275+ .. _ container -ref :
276276
277- Docker based tests
278- ==================
277+ Container based tests
278+ =====================
279279
280280Introduction
281281------------
282282
283- The Docker testing framework in QEMU utilizes public Docker images to build and
284- test QEMU in predefined and widely accessible Linux environments. This makes
285- it possible to expand the test coverage across distros, toolchain flavors and
286- library versions.
283+ The container testing framework in QEMU utilizes public images to
284+ build and test QEMU in predefined and widely accessible Linux
285+ environments. This makes it possible to expand the test coverage
286+ across distros, toolchain flavors and library versions. The support
287+ was originally written for Docker although we also support Podman as
288+ an alternative container runtime. Although the many of the target
289+ names and scripts are prefixed with "docker" the system will
290+ automatically run on whichever is configured.
287291
288- Prerequisites
289- -------------
292+ The container images are also used to augment the generation of tests
293+ for testing TCG. See :ref: `checktcg-ref ` for more details.
294+
295+ Docker Prerequisites
296+ --------------------
290297
291298Install "docker" with the system package manager and start the Docker service
292299on your development machine, then make sure you have the privilege to run
@@ -316,26 +323,53 @@ Note that any one of above configurations makes it possible for the user to
316323exploit the whole host with Docker bind mounting or other privileged
317324operations. So only do it on development machines.
318325
326+ Podman Prerequisites
327+ --------------------
328+
329+ Install "podman" with the system package manager.
330+
331+ .. code ::
332+
333+ $ sudo dnf install podman
334+ $ podman ps
335+
336+ The last command should print an empty table, to verify the system is ready.
337+
319338Quickstart
320339----------
321340
322- From source tree, type ``make docker `` to see the help. Testing can be started
323- without configuring or building QEMU (``configure `` and ``make `` are done in
324- the container, with parameters defined by the make target):
341+ From source tree, type ``make docker-help `` to see the help. Testing
342+ can be started without configuring or building QEMU (``configure `` and
343+ ``make `` are done in the container, with parameters defined by the
344+ make target):
325345
326346.. code ::
327347
328- make docker-test-build@min-glib
348+ make docker-test-build@centos8
329349
330- This will create a container instance using the ``min-glib `` image (the image
350+ This will create a container instance using the ``centos8 `` image (the image
331351is downloaded and initialized automatically), in which the ``test-build `` job
332352is executed.
333353
354+ Registry
355+ --------
356+
357+ The QEMU project has a container registry hosted by GitLab at
358+ ``registry.gitlab.com/qemu-project/qemu `` which will automatically be
359+ used to pull in pre-built layers. This avoids unnecessary strain on
360+ the distro archives created by multiple developers running the same
361+ container build steps over and over again. This can be overridden
362+ locally by using the ``NOCACHE `` build option:
363+
364+ .. code ::
365+
366+ make docker-image-debian10 NOCACHE=1
367+
334368 Images
335369------
336370
337- Along with many other images, the ``min-glib `` image is defined in a Dockerfile
338- in ``tests/docker/dockerfiles/ ``, called ``min-glib .docker ``. ``make docker ``
371+ Along with many other images, the ``centos8 `` image is defined in a Dockerfile
372+ in ``tests/docker/dockerfiles/ ``, called ``centos8 .docker ``. ``make docker-help ``
339373command will list all the available images.
340374
341375To add a new image, simply create a new ``.docker `` file under the
@@ -355,7 +389,7 @@ QEMU. Docker tests are the executables under ``tests/docker`` named
355389library, ``tests/docker/common.rc ``, which provides helpers to find the QEMU
356390source and build it.
357391
358- The full list of tests is printed in the ``make docker `` help.
392+ The full list of tests is printed in the ``make docker-help `` help.
359393
360394Debugging a Docker test failure
361395-------------------------------
@@ -980,6 +1014,8 @@ And remove any package you want with::
9801014If you've used ``make check-acceptance ``, the Python virtual environment where
9811015Avocado is installed will be cleaned up as part of ``make check-clean ``.
9821016
1017+ .. _checktcg-ref :
1018+
9831019Testing with "make check-tcg"
9841020=============================
9851021
@@ -1001,10 +1037,17 @@ for the architecture in question, for example::
10011037There is also a ``--cross-cc-flags-ARCH `` flag in case additional
10021038compiler flags are needed to build for a given target.
10031039
1004- If you have the ability to run containers as the user you can also
1005- take advantage of the build systems "Docker" support. It will then use
1006- containers to build any test case for an enabled guest where there is
1007- no system compiler available. See :ref: `docker-ref ` for details.
1040+ If you have the ability to run containers as the user the build system
1041+ will automatically use them where no system compiler is available. For
1042+ architectures where we also support building QEMU we will generally
1043+ use the same container to build tests. However there are a number of
1044+ additional containers defined that have a minimal cross-build
1045+ environment that is only suitable for building test cases. Sometimes
1046+ we may use a bleeding edge distribution for compiler features needed
1047+ for test cases that aren't yet in the LTS distros we support for QEMU
1048+ itself.
1049+
1050+ See :ref: `container-ref ` for more details.
10081051
10091052Running subset of tests
10101053-----------------------
0 commit comments