From patchwork Thu Sep 19 17:10:14 2019 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: 174072 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1299389ill; Thu, 19 Sep 2019 10:23:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQuEdheHqXP7PJOtXX3UOGyEeYpSZImlab0NCmFvenQsW4Q09/Ro5b0vO+/YXFbHSkVjDJ X-Received: by 2002:a50:e718:: with SMTP id a24mr17374426edn.289.1568913794650; Thu, 19 Sep 2019 10:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568913794; cv=none; d=google.com; s=arc-20160816; b=RF9sdEqIgIfCEVW13+Aeh62TR1RpKjyeJult/jI5s3M/USp39MPMef4/zvHCK2SegC THI8u+XU/igVEJEEbdlrDvIMrxVHoRx1cbKX9HXr3RWsjHLvY6coKtD7fAbuWHyMGNqF cY0mteTHM+2wxUbOaFjk/9O8fLxY7MyxeB6cjBOdOTSqMaxR1ojF8xy4B05kEOyiyQ/X 3AdU1SQK81IR6iOK/GWyGu+IGY+8DAENyV1kPOcc82M24iEVmJlpOpkVKfCoJPVCjGXO 6rBilPAtR+7CwdasajWTIWs5dXSej+bUCNcbxQigp/WCg0tIUfMVV1zl9eONxA2XcBUG 7g2w== 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=/SabVeqMLjGlYBjbqwgWwIsgPvMvXk0prLQNMqx1ZLQ=; b=VWAs40lkYzNh3/qLbyMQlhUsRygIWBa2i+D3Ecb21ny15VEr4g+Mzeu9t4hoB2npez 8IXThdbAJeQl1s31Fs6Pj63j8k3bWNVDIRGt8F0SRqxH+VK5qu6JNQAXG4+2hvwU9Ddd 59C62Z4u4burtWP5Mp9d2JJPFhO5mEJ6joEQyNOW8VWmm1VKlTggJSvkImE3+IOB+Lbd I/9l0cAFCMYZBIxyqCO/LIXbSj9GoCszTkh2tb8uKmkROkSa9vY+/nVJSmht9+M7mT+H Dk8VUCnBu2XlR71xEFhW9G8gUwONIlQSo15AMRAdaECYWh1obIvi55dtsCQSC18y7ktQ +dOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l9IaJXbH; 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=pass (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 d22si5476288ede.131.2019.09.19.10.23.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Sep 2019 10:23:14 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=l9IaJXbH; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iB09B-0008Ro-GU for patch@linaro.org; Thu, 19 Sep 2019 13:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50079) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iB06n-0008Kv-Qm for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:20:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iB05o-0000QA-Nf for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:19:46 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:37941) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iB05o-0000PY-Fw for qemu-devel@nongnu.org; Thu, 19 Sep 2019 13:19:44 -0400 Received: by mail-wm1-x344.google.com with SMTP id 3so4883673wmi.3 for ; Thu, 19 Sep 2019 10:19:44 -0700 (PDT) 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=/SabVeqMLjGlYBjbqwgWwIsgPvMvXk0prLQNMqx1ZLQ=; b=l9IaJXbHzaDjv78RIwWaOcwMt7q+aF9wRZFg39Qqxc20uro1e7b9AcojUQNciBAAUC 2+3bmB5l70LPmbiKuId6ZAp/YoYgE+qZxtMGRQhe9eAk9kmSKB+Z8XD2STa1HhHga7aj vWKNGPBisKtpCtJZFeCMw/WtROEeYYKqe3IDvseq07wHK4V/0skgDfS+hIbbqBHQ8c2p Mx7I+4GUyOe1/zB4UuYMPqULuMIwo+57z3/fKRUF+PdHfbjKs7xqS+qPAZ2IBZNZwhqU 3M9hGBJSHI/vvg5Glr01qsBsPN3FG7hyRCCjCk1hnu4cn7IPewRcFxL4QWpw5VBW6SU6 zbKA== 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=/SabVeqMLjGlYBjbqwgWwIsgPvMvXk0prLQNMqx1ZLQ=; b=DRADp6c06HZBvvtWy2I7pH4NsRneF1zWD5Ab1bxBqNkZoMFvCbjBKIstCkLETPVUDU Wn9OsGFJufy0ZKvI/pz8LOvTAjAo30VosH0R2G9OTxNLC6ra+g3eLhOX79ASVo2MUIjN RyexlzfQOiVUAUVnz2yw+t++eFJr01EE7+MS0J1V9HOnb05Yznqx54HhaCjElcItO8Oq cmDxVZYJIHIj8rCCtpINK5FLqqrIS3kNgyHq41c02i44sh65QoT7WSlgtcSjZw/nF6/S ZmUmnpJK94wkMi72DRtEdGMp9cKUQb7IDgEM8cJ15H2iX2eVRO/e2/ztXUiwLlNqclFr 52Cw== X-Gm-Message-State: APjAAAUG5yuh3yFMJf3iX1bf20TMHqf5N3LRym6icgkIIYdOfQu34Mk2 wrC8l/BNaYJHiV7JBRZ4E7PPPQ== X-Received: by 2002:a05:600c:28d:: with SMTP id 13mr3884920wmk.84.1568913583400; Thu, 19 Sep 2019 10:19:43 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z142sm12389182wmc.24.2019.09.19.10.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Sep 2019 10:19:40 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 292F31FF8C; Thu, 19 Sep 2019 18:10:17 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 15/16] docs/devel: add "check-tcg" to testing.rst Date: Thu, 19 Sep 2019 18:10:14 +0100 Message-Id: <20190919171015.12681-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190919171015.12681-1-alex.bennee@linaro.org> References: <20190919171015.12681-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: peter.maydell@linaro.org, qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" It was pointed out we haven't documented the check-tcg part of the build system. Attempt to rectify that now. Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) -- 2.20.1 diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index bf75675fb04..1feee3ad101 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -266,6 +266,8 @@ another application on the host may have locked the file, possibly leading to a test failure. If using such devices are explicitly desired, consider adding ``locking=off`` option to disable image locking. +.. _docker-ref: + Docker based tests ================== @@ -799,3 +801,63 @@ 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``. + +Testing with "make check-tcg" +============================= + +The check-tcg tests are intended for simple smoke tests of both +linux-user and softmmu TCG functionality. However to build test +programs for guest targets you need to have cross compilers available. +If your distribution supports cross compilers you can do something as +simple as:: + + apt install gcc-aarch64-linux-gnu + +The configure script will automatically pick up their presence. +Sometimes compilers have slightly odd names so the availability of +them can be prompted by passing in the appropriate configure option +for the architecture in question, for example:: + + $(configure) --cross-cc-aarch64=aarch64-cc + +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. + +TCG test dependencies +--------------------- + +The TCG tests are deliberately very light on dependencies and are +either totally bare with minimal gcc lib support (for softmmu tests) +or just glibc (for linux-user tests). This is because getting a cross +compiler to work with additional libraries can be challenging. + +Other TCG Tests +--------------- + +There are a number of out-of-tree test suites that are used for more +extensive testing of processor features. + +KVM Unit Tests +~~~~~~~~~~~~~~ + +The KVM unit tests are designed to run as a Guest OS under KVM but +there is no reason why they can't exercise the TCG as well. It +provides a minimal OS kernel with hooks for enabling the MMU as well +as reporting test results via a special device:: + + https://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git + +Linux Test Project +~~~~~~~~~~~~~~~~~~ + +The LTP is focused on exercising the syscall interface of a Linux +kernel. It checks that syscalls behave as documented and strives to +exercise as many corner cases as possible. It is a useful test suite +to run to exercise QEMU's linux-user code:: + + https://linux-test-project.github.io/