From patchwork Wed Feb 24 11:49:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 386793 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp307482jap; Wed, 24 Feb 2021 03:52:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJys5xT9wkllIkUL7eUEKO+gbdaSc/FqT495NCWOpAx4dwiwcAO0KnHUuiQ0PAxyqCUaLbOg X-Received: by 2002:a05:6e02:12a8:: with SMTP id f8mr9287919ilr.174.1614167546834; Wed, 24 Feb 2021 03:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614167546; cv=none; d=google.com; s=arc-20160816; b=sA+IfNsiSExne2DAUXlny4SNq/T0kzu/8hkGoo9zs8hXD4bPpYxynOt2NfmbD0YvAN oOHzGn3mud1BSs5EVloPydqzv15Ua7ZmoITUHEp6cYAYThrnHbyVGO/AafxEWw/pUIgh TK5Q3RsueW5+3d5fGA70s0cLLXYCWYe0u0uwXi4LL80mc1LpE4ZDh1rCzVUECizL1Dp3 ampNRNpDVej/btuUur2rAlEKpuJ9YcUAUQkbONfwDs5pvQqg0QhVF7Lt/FCE1rxt98BZ n38YR6+u/tkaCVt7ljtfK37YZuuB2+TGNk80ye/adgplbNzsm/T/ifv4BSoovrCPzBbu pV3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=fVmTUTItvD8Y9XDlb1Vri2ktpu4ZNI+gRqGqx4eqPS4=; b=gZ8yvACIb/bxD2ZKwXYd0mgYm1U51nse6Ccli6M50DtpfJ9LjkPyUirWEVUbhO7myh EAUMxkm2Z+q8SJ1S2uy/7oICFx1WJzfStIQS/7WjwceOIUPsXjOWSXxQxZ0RrJGssvMM LZCbsq2LdSzy16jxKZyUd+KB2lxiJ13TpqGZEGw02dtpQUtmBRdXCzv4a7uBD51hg7mk Vu95pyV8xLa69kzfFRaPQs1AXIfX2d4SR46y8A9goJlzzUnMewEQ+MzWkZ+t/EBnrYP+ mqeT/o4vXtqs3u6wsmeEX5i9laSkJqIdfPu4LbK8UMf8nbGfJFKVb5eWx8ngA7MxZluY cM6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="sIp/mNBp"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b5si1585958ilj.34.2021.02.24.03.52.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Feb 2021 03:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="sIp/mNBp"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lEsiQ-000083-8Y for patch@linaro.org; Wed, 24 Feb 2021 06:52:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lEsfl-00062X-MO for qemu-devel@nongnu.org; Wed, 24 Feb 2021 06:49:41 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lEsfj-0002X9-R6 for qemu-devel@nongnu.org; Wed, 24 Feb 2021 06:49:41 -0500 Received: by mail-wr1-x42c.google.com with SMTP id c7so1593385wru.8 for ; Wed, 24 Feb 2021 03:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fVmTUTItvD8Y9XDlb1Vri2ktpu4ZNI+gRqGqx4eqPS4=; b=sIp/mNBpQOkMZZ8VjCOpgePMhMOP5AABOefQ688/03tj7VDawEVxMrl4eD4RkfS8FD 9xc5A5FqAtl12qpOt8dDHw2vpbEpW7JiuJ486/JsiIuzqUMMHRi3/BU5BXda0lCcpfxN Gf6LHu5n1LCdG5IuV6UYGT8lkaZ2C8rf075y1hq4w4sTb91xJYXZ/DwYHcdWUVZEoBTE nFJdE04TVO1E/Wnc6H9gDubhzt4SyvD3DOQwhvfJ17EQqyKpSkn0q1oeZ1AMIjk1uOOn y8h647TjzdfRqfL5CpOuRfGaCWxTH9Xn3rc3SUjQlrD7ky+Y2J/QVK4OkLEAMbMATnJq v3IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fVmTUTItvD8Y9XDlb1Vri2ktpu4ZNI+gRqGqx4eqPS4=; b=KaJEImK7fLqHLRceU9X7rJsWm9C1u3ff+sPhlQUv077+6RKy8gXGJcxPyAsavpwcUj ZFfvgM7J9qaL8q+72pOWAvOyV69ZskQ2Eb1jmzZ2kVDbUebgWbWM/8sm//s9DWibUBIt Wl7lsXbNJZ/MXVqt+QpShgDU7uOCtORkgf7jCORG3qqNWuCLwnqOz9HgSc9pfhfIZ3oK 73iISehvSZOYAIjaTMvj1qyiZayJGdTlX6CSFGfCtuStazEUIKcS+o0VGciWWWg/C6Bc S/hoYFfabFPnAIVfHhHwLgeM3QUFae/rAaiNyxalBUgDkikrEZZu0IwWNCg2pIo5/IuH jZRQ== X-Gm-Message-State: AOAM530AODLVOjSy4rpXq0YQoS6uNKq5DjsnjIZ3NrFm8UU/TIjnQy3a eu4bo1xmi3MBsEjOfQ3/Dw2AhQ== X-Received: by 2002:a5d:4cd0:: with SMTP id c16mr31196259wrt.84.1614167378507; Wed, 24 Feb 2021 03:49:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c6sm3008164wrt.26.2021.02.24.03.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 03:49:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D4D3E1FF91; Wed, 24 Feb 2021 11:49:26 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 5/7] docs/devel: update the container based tests Date: Wed, 24 Feb 2021 11:49:24 +0000 Message-Id: <20210224114926.6303-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210224114926.6303-1-alex.bennee@linaro.org> References: <20210224114926.6303-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "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 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20210222101455.12640-6-alex.bennee@linaro.org> -- 2.20.1 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 -------------------------------