From patchwork Mon Aug 22 02:26:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950131 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93E5CC28D13 for ; Mon, 22 Aug 2022 02:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbiHVCae (ORCPT ); Sun, 21 Aug 2022 22:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232413AbiHVCa0 (ORCPT ); Sun, 21 Aug 2022 22:30:26 -0400 Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7C7B20BD4; Sun, 21 Aug 2022 19:30:24 -0700 (PDT) Received: by mail-vs1-xe33.google.com with SMTP id m66so9759413vsm.12; Sun, 21 Aug 2022 19:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=GSefg8YQpT3u9+pfohwKASBnhhYqGoMiDllFOEHH9aU=; b=SBOe5pELxeIq/knY/Op1ceMEXVmx64inaD3aGG+1Y4AbrA9/L9KZLELlkMoEfd3yO/ SQ1VCAcsVZHlKfIcSYkwt3EEg5Ort4lu4x0D1sPEko/H21DtJQuqkGLfArO18OUYsHBY Vx3rqns4fpGiFPJevcWVqXBz7JPHysnoYPTJOIH4KMtCviq0krNvAR4IXv5UvmQN1vH0 xPv2UPeQohk1VfzOQuzXwKf5StHUTf1m7VPuPZKrlbq4BUqclpsngVk7QEIBUqooOEM5 YcF1tC0/Oz/6kapRR62QSwSBr0PCmSyAXV62Zst4miHuor4nCMZYjlKrQa1rxiE7fXMC RNng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=GSefg8YQpT3u9+pfohwKASBnhhYqGoMiDllFOEHH9aU=; b=nEK1Fu3G63cKSIblEMYSHCZUg3WmYp10IJYEis3r9lIlml8ZBjdC7NxC2tD5dTbWFW wcGfErvYSHSAop6lbTrnDvRuF3xgzjiowvUUXEnyj9hmB3OsRTwCVU52bZq4+I1UqOzD 4OaiFiZ5/jsOj1+PWwz/oi3qZer8dT/HXf4Qo65x3XrJwozKmyBMTVIv/VZViWnnjUQn nno0nSDCmn4HboCjt/lac10yZq46B+8EiR8Chcw4KGtU5YzIjyxRQPthn3uhan60ATav NkkOvEEbIkpalfhvAhMunPkVqRhfHx7f/bgz4xjAa29Qh4EHAgU1zcmbmeZ+s9iXigLG fLiA== X-Gm-Message-State: ACgBeo1hzWFeu2mhWculyl5zGY00QInDhniGn3QF4DH+nO8Q8G89LgaX 5Ca2PtMJLay6ZN13/WVXc5c= X-Google-Smtp-Source: AA6agR683sDaDUjlcVNCqb8ALf1tjoGLjcOXWOTwlJ7Zz3wm0jS5GHJoILsbh1CrBrtfP8VWXzYO6Q== X-Received: by 2002:a05:6102:390d:b0:387:78b9:bf9c with SMTP id e13-20020a056102390d00b0038778b9bf9cmr6679441vsu.43.1661135423525; Sun, 21 Aug 2022 19:30:23 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:23 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 1/8] Documentation: KUnit: remove duplicated docs for kunit_tool Date: Sun, 21 Aug 2022 23:26:39 -0300 Message-Id: <20220822022646.98581-2-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Delete "kunit-tool.rst" to remove repeated info from KUnit docs. "What is kunit_tool?" was integrated into index.rst, the remaining sections were moved into run_wrapper.rst and renamed as follows: "What is a .kunitconfig?" -> "Creating a ``.kunitconfig`` file" "Getting Started with kunit_tool" -> "Running tests with kunit_tool" "Configuring, Building, and Running Tests" -> "Configuring, building, and running tests" "Running Tests on QEMU" -> "Running tests on QEMU" "Parsing Test Results" -> "Parsing test results" "Filtering Tests" -> "Filtering tests" "Other Useful Options" -> "Running command-line arguments" Signed-off-by: Tales Aparecida Reviewed-by: Sadiya Kazi Reviewed-by: David Gow --- Notes: Update titles on run_wrapper.rst (Sadiya Kazi) --- Documentation/dev-tools/kunit/index.rst | 3 - Documentation/dev-tools/kunit/kunit-tool.rst | 232 ------------------ Documentation/dev-tools/kunit/run_wrapper.rst | 32 +-- Documentation/dev-tools/kunit/start.rst | 2 - 4 files changed, 16 insertions(+), 253 deletions(-) delete mode 100644 Documentation/dev-tools/kunit/kunit-tool.rst diff --git a/Documentation/dev-tools/kunit/index.rst b/Documentation/dev-tools/kunit/index.rst index bc91ad7b8961..d7187282ba28 100644 --- a/Documentation/dev-tools/kunit/index.rst +++ b/Documentation/dev-tools/kunit/index.rst @@ -13,7 +13,6 @@ KUnit - Linux Kernel Unit Testing run_wrapper run_manual usage - kunit-tool api/index style faq @@ -109,7 +108,5 @@ How do I use it? examples. * Documentation/dev-tools/kunit/api/index.rst - KUnit APIs used for testing. -* Documentation/dev-tools/kunit/kunit-tool.rst - kunit_tool helper - script. * Documentation/dev-tools/kunit/faq.rst - KUnit common questions and answers. diff --git a/Documentation/dev-tools/kunit/kunit-tool.rst b/Documentation/dev-tools/kunit/kunit-tool.rst deleted file mode 100644 index ae52e0f489f9..000000000000 --- a/Documentation/dev-tools/kunit/kunit-tool.rst +++ /dev/null @@ -1,232 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 - -================= -kunit_tool How-To -================= - -What is kunit_tool? -=================== - -kunit_tool is a script (``tools/testing/kunit/kunit.py``) that aids in building -the Linux kernel as UML (`User Mode Linux -`_), running KUnit tests, parsing -the test results and displaying them in a user friendly manner. - -kunit_tool addresses the problem of being able to run tests without needing a -virtual machine or actual hardware with User Mode Linux. User Mode Linux is a -Linux architecture, like ARM or x86; however, unlike other architectures it -compiles the kernel as a standalone Linux executable that can be run like any -other program directly inside of a host operating system. To be clear, it does -not require any virtualization support: it is just a regular program. - -What is a .kunitconfig? -======================= - -It's just a defconfig that kunit_tool looks for in the build directory -(``.kunit`` by default). kunit_tool uses it to generate a .config as you might -expect. In addition, it verifies that the generated .config contains the CONFIG -options in the .kunitconfig; the reason it does this is so that it is easy to -be sure that a CONFIG that enables a test actually ends up in the .config. - -It's also possible to pass a separate .kunitconfig fragment to kunit_tool, -which is useful if you have several different groups of tests you wish -to run independently, or if you want to use pre-defined test configs for -certain subsystems. - -Getting Started with kunit_tool -=============================== - -If a kunitconfig is present at the root directory, all you have to do is: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run - -However, you most likely want to use it with the following options: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all` - -- ``--timeout`` sets a maximum amount of time to allow tests to run. -- ``--jobs`` sets the number of threads to use to build the kernel. - -.. note:: - This command will work even without a .kunitconfig file: if no - .kunitconfig is present, a default one will be used instead. - -If you wish to use a different .kunitconfig file (such as one provided for -testing a particular subsystem), you can pass it as an option. - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig - -For a list of all the flags supported by kunit_tool, you can run: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run --help - -Configuring, Building, and Running Tests -======================================== - -It's also possible to run just parts of the KUnit build process independently, -which is useful if you want to make manual changes to part of the process. - -A .config can be generated from a .kunitconfig by using the ``config`` argument -when running kunit_tool: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py config - -Similarly, if you just want to build a KUnit kernel from the current .config, -you can use the ``build`` argument: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py build - -And, if you already have a built UML kernel with built-in KUnit tests, you can -run the kernel and display the test results with the ``exec`` argument: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py exec - -The ``run`` command which is discussed above is equivalent to running all three -of these in sequence. - -All of these commands accept a number of optional command-line arguments. The -``--help`` flag will give a complete list of these, or keep reading this page -for a guide to some of the more useful ones. - -Parsing Test Results -==================== - -KUnit tests output their results in TAP (Test Anything Protocol) format. -kunit_tool will, when running tests, parse this output and print a summary -which is much more pleasant to read. If you wish to look at the raw test -results in TAP format, you can pass the ``--raw_output`` argument. - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run --raw_output - -The raw output from test runs may contain other, non-KUnit kernel log -lines. You can see just KUnit output with ``--raw_output=kunit``: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run --raw_output=kunit - -If you have KUnit results in their raw TAP format, you can parse them and print -the human-readable summary with the ``parse`` command for kunit_tool. This -accepts a filename for an argument, or will read from standard input. - -.. code-block:: bash - - # Reading from a file - ./tools/testing/kunit/kunit.py parse /var/log/dmesg - # Reading from stdin - dmesg | ./tools/testing/kunit/kunit.py parse - -This is very useful if you wish to run tests in a configuration not supported -by kunit_tool (such as on real hardware, or an unsupported architecture). - -Filtering Tests -=============== - -It's possible to run only a subset of the tests built into a kernel by passing -a filter to the ``exec`` or ``run`` commands. For example, if you only wanted -to run KUnit resource tests, you could use: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run 'kunit-resource*' - -This uses the standard glob format for wildcards. - -Running Tests on QEMU -===================== - -kunit_tool supports running tests on QEMU as well as via UML (as mentioned -elsewhere). The default way of running tests on QEMU requires two flags: - -``--arch`` - Selects a collection of configs (Kconfig as well as QEMU configs - options, etc) that allow KUnit tests to be run on the specified - architecture in a minimal way; this is usually not much slower than - using UML. The architecture argument is the same as the name of the - option passed to the ``ARCH`` variable used by Kbuild. Not all - architectures are currently supported by this flag, but can be handled - by the ``--qemu_config`` discussed later. If ``um`` is passed (or this - this flag is ignored) the tests will run via UML. Non-UML architectures, - e.g. i386, x86_64, arm, um, etc. Non-UML run on QEMU. - -``--cross_compile`` - Specifies the use of a toolchain by Kbuild. The argument passed here is - the same passed to the ``CROSS_COMPILE`` variable used by Kbuild. As a - reminder this will be the prefix for the toolchain binaries such as gcc - for example ``sparc64-linux-gnu-`` if you have the sparc toolchain - installed on your system, or - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux-`` - if you have downloaded the microblaze toolchain from the 0-day website - to a directory in your home directory called ``toolchains``. - -In many cases it is likely that you may want to run an architecture which is -not supported by the ``--arch`` flag, or you may want to just run KUnit tests -on QEMU using a non-default configuration. For this use case, you can write -your own QemuConfig. These QemuConfigs are written in Python. They must have an -import line ``from ..qemu_config import QemuArchParams`` at the top of the file -and the file must contain a variable called ``QEMU_ARCH`` that has an instance -of ``QemuArchParams`` assigned to it. An example can be seen in -``tools/testing/kunit/qemu_configs/x86_64.py``. - -Once you have a QemuConfig you can pass it into kunit_tool using the -``--qemu_config`` flag; when used this flag replaces the ``--arch`` flag. If we -were to do this with the ``x86_64.py`` example from above, the invocation would -look something like this: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run \ - --timeout=60 \ - --jobs=12 \ - --qemu_config=./tools/testing/kunit/qemu_configs/x86_64.py - -Other Useful Options -==================== - -kunit_tool has a number of other command-line arguments which can be useful -when adapting it to fit your environment or needs. - -Some of the more useful ones are: - -``--help`` - Lists all of the available options. Note that different commands - (``config``, ``build``, ``run``, etc) will have different supported - options. Place ``--help`` before the command to list common options, - and after the command for options specific to that command. - -``--build_dir`` - Specifies the build directory that kunit_tool will use. This is where - the .kunitconfig file is located, as well as where the .config and - compiled kernel will be placed. Defaults to ``.kunit``. - -``--make_options`` - Specifies additional options to pass to ``make`` when compiling a - kernel (with the ``build`` or ``run`` commands). For example, to enable - compiler warnings, you can pass ``--make_options W=1``. - -``--alltests`` - Builds a UML kernel with all config options enabled using ``make - allyesconfig``. This allows you to run as many tests as is possible, - but is very slow and prone to breakage as new options are added or - modified. In most cases, enabling all tests which have satisfied - dependencies by adding ``CONFIG_KUNIT_ALL_TESTS=1`` to your - .kunitconfig is preferable. - -There are several other options (and new ones are often added), so do check -``--help`` if you're looking for something not mentioned here. diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst index a1070def284f..518cf87ea732 100644 --- a/Documentation/dev-tools/kunit/run_wrapper.rst +++ b/Documentation/dev-tools/kunit/run_wrapper.rst @@ -1,8 +1,8 @@ .. SPDX-License-Identifier: GPL-2.0 -========================= -Run Tests with kunit_tool -========================= +============================= +Running tests with kunit_tool +============================= We can either run KUnit tests using kunit_tool or can run tests manually, and then use kunit_tool to parse the results. To run tests @@ -58,8 +58,8 @@ To view kunit_tool flags (optional command-line arguments), run: ./tools/testing/kunit/kunit.py run --help -Create a ``.kunitconfig`` File -=============================== +Creating a ``.kunitconfig`` file +================================ If we want to run a specific set of tests (rather than those listed in the KUnit ``defconfig``), we can provide Kconfig options in the @@ -98,8 +98,8 @@ have not included the options dependencies. The build dir needs to be set for ``make menuconfig`` to work, therefore by default use ``make O=.kunit menuconfig``. -Configure, Build, and Run Tests -=============================== +Configuring, building, and running tests +======================================== If we want to make manual changes to the KUnit build process, we can run part of the KUnit build process independently. @@ -125,11 +125,11 @@ argument: ./tools/testing/kunit/kunit.py exec -The ``run`` command discussed in section: **Run Tests with kunit_tool**, +The ``run`` command discussed in section: **Running tests with kunit_tool**, is equivalent to running the above three commands in sequence. -Parse Test Results -================== +Parsing test results +==================== KUnit tests output displays results in TAP (Test Anything Protocol) format. When running tests, kunit_tool parses this output and prints @@ -152,8 +152,8 @@ standard input. # Reading from stdin dmesg | ./tools/testing/kunit/kunit.py parse -Run Selected Test Suites -======================== +Filtering tests +=============== By passing a bash style glob filter to the ``exec`` or ``run`` commands, we can run a subset of the tests built into a kernel . For @@ -167,8 +167,8 @@ This uses the standard glob format with wildcard characters. .. _kunit-on-qemu: -Run Tests on qemu -================= +Running tests on QEMU +===================== kunit_tool supports running tests on qemu as well as via UML. To run tests on qemu, by default it requires two flags: @@ -231,8 +231,8 @@ as --jobs=12 \ --qemu_config=./tools/testing/kunit/qemu_configs/x86_64.py -Command-Line Arguments -====================== +Running command-line arguments +============================== kunit_tool has a number of other command-line arguments which can be useful for our test environment. Below are the most commonly used diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index 867a4bba6bf6..e730df1f468e 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -254,7 +254,5 @@ Next Steps examples. * Documentation/dev-tools/kunit/api/index.rst - KUnit APIs used for testing. -* Documentation/dev-tools/kunit/kunit-tool.rst - kunit_tool helper - script. * Documentation/dev-tools/kunit/faq.rst - KUnit common questions and answers. From patchwork Mon Aug 22 02:26:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950130 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD631C32793 for ; Mon, 22 Aug 2022 02:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232216AbiHVCaf (ORCPT ); Sun, 21 Aug 2022 22:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232446AbiHVCa3 (ORCPT ); Sun, 21 Aug 2022 22:30:29 -0400 Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2202520BD4; Sun, 21 Aug 2022 19:30:28 -0700 (PDT) Received: by mail-vk1-xa35.google.com with SMTP id o198so1117245vko.4; Sun, 21 Aug 2022 19:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=ASKzNR3OVr0x/auTLjHZPWrTcHhp/uvCLAxf9+B1KJY=; b=UDsAnzPXw283JlQUcitS9QnSZsILv9uj16dtK+BvvdxBHgylz1PESQwpnP6RR4Y78T J6IZcg2CWZHbndDWcBjldrz3nWEp3Yjadf43698DtIWiNY7WFGY1VsU1aNKPIIrZ2c1G TJOib7hiqBg3KD+wlXtdWvUc3PcLb3uxRox+YPnCA57H7EWq02lpsgnf9+RRG8NfdYY4 vF34ERaKLkuHttgc5KnJ6Ju1+lvKxviuB384WAQgTeYAwo7BWfjBCfXawVRm2qsYGyOJ fG/jhUgQyd34eP+cjVYqaGGXXxVstCCYHwwOR3vv18eV05qibKMfOEAzvCpu1aCGmShL 6vzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ASKzNR3OVr0x/auTLjHZPWrTcHhp/uvCLAxf9+B1KJY=; b=nZRR4A8mNO/5/9We2b41UPfBXGrZJUNJWC1ZCd4AZ43OssqmSgQ+JvFLn+7s19A9tX ru0KDHgjcUlc3a/NNm8o3+3MDd9D3mTW91MC8ZNDTeat62O/OSZPMzjexvGUzErNOvM4 JWOAc/2SIwIAa2YzomqlvYgyMCYe6A4Xtw8OwAo3iqLcrSKrHJKg9egqh480Q/VgIxE/ +RZN/wsCouDOyIivLabNnP4/gUOjKSVSB8Kvu8abin4Yj//ndpU7lbuNqO8ncBIX7B1P KqShcd5aRGnaTUHjHEbOKkUsSNUiS9ZWOBMm6/5ifR1UpnRR+k3J/8Ei9vHF7/XQ0fZE ajPw== X-Gm-Message-State: ACgBeo1cPP9gjkc1LJTBFgPD3D9WLoqKWy3+tapmFTnP2PjMZF8Meyin MyGu0ONVYk0WkrM97gC/jCE= X-Google-Smtp-Source: AA6agR60IQ0+5Kgby8Gfqv4jS5SE/LjLzFRcDfSQeDi+FRI40t2fkA9fFctG9FyaxKVti2SZIfEwGg== X-Received: by 2002:a1f:adc7:0:b0:377:c12:78ef with SMTP id w190-20020a1fadc7000000b003770c1278efmr6669359vke.19.1661135427212; Sun, 21 Aug 2022 19:30:27 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:26 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 2/8] Documentation: KUnit: avoid repeating "kunit.py run" in start.rst Date: Sun, 21 Aug 2022 23:26:40 -0300 Message-Id: <20220822022646.98581-3-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Combine two sections mentioning "kunit.py run" to streamline the getting-started guide. Update "kunit.py run" expected output in the guide and run_wrapper. Signed-off-by: Tales Aparecida Reviewed-by: Maíra Canal Reviewed-by: Sadiya Kazi Reviewed-by: David Gow --- Notes: Update the expected output and the note that follows it (Maíra Canal and Sadiya Kazi). The output was updated on the commit: 45ba7a893ad8 ("kunit: kunit_tool: Separate out config/build/exec/parse") Add word "step" to note and fix the case of "kernel". --- Documentation/dev-tools/kunit/run_wrapper.rst | 2 +- Documentation/dev-tools/kunit/start.rst | 38 ++++++++----------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/Documentation/dev-tools/kunit/run_wrapper.rst b/Documentation/dev-tools/kunit/run_wrapper.rst index 518cf87ea732..6b33caf6c8ab 100644 --- a/Documentation/dev-tools/kunit/run_wrapper.rst +++ b/Documentation/dev-tools/kunit/run_wrapper.rst @@ -22,7 +22,7 @@ We should see the following: .. code-block:: - Generating .config... + Configuring KUnit Kernel ... Building KUnit kernel... Starting KUnit kernel... diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index e730df1f468e..2e31350a85e1 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -19,7 +19,21 @@ can run kunit_tool: ./tools/testing/kunit/kunit.py run -For more information on this wrapper, see: +If everything worked correctly, you should see the following: + +.. code-block:: + + Configuring KUnit Kernel ... + Building KUnit Kernel ... + Starting KUnit Kernel ... + +The tests will pass or fail. + +.. note :: + Because it is building a lot of sources for the first time, + the ``Building KUnit Kernel`` step may take a while. + +For detailed information on this wrapper, see: Documentation/dev-tools/kunit/run_wrapper.rst. Creating a ``.kunitconfig`` @@ -74,28 +88,6 @@ you if you have not included dependencies for the options used. tools like ``make menuconfig O=.kunit``. As long as its a superset of ``.kunitconfig``, kunit.py won't overwrite your changes. -Running Tests (KUnit Wrapper) ------------------------------ -1. To make sure that everything is set up correctly, invoke the Python - wrapper from your kernel repository: - -.. code-block:: bash - - ./tools/testing/kunit/kunit.py run - -If everything worked correctly, you should see the following: - -.. code-block:: - - Generating .config ... - Building KUnit Kernel ... - Starting KUnit Kernel ... - -The tests will pass or fail. - -.. note :: - Because it is building a lot of sources for the first time, the - ``Building KUnit kernel`` may take a while. Running Tests without the KUnit Wrapper ======================================= From patchwork Mon Aug 22 02:26:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950132 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E899BC32796 for ; Mon, 22 Aug 2022 02:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbiHVCaf (ORCPT ); Sun, 21 Aug 2022 22:30:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232463AbiHVCac (ORCPT ); Sun, 21 Aug 2022 22:30:32 -0400 Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D186021830; Sun, 21 Aug 2022 19:30:31 -0700 (PDT) Received: by mail-vs1-xe29.google.com with SMTP id c3so9787409vsc.6; Sun, 21 Aug 2022 19:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=x027gD9Q590MYEegm4t4IJAQG82OSt6Oxw8CWkrsRdY=; b=fdMojUkEIMj6VvFshDtCCFB/Q+etuu3zE2OKrxEgHerfajDL6wZ1xY2gjG7doX4ELi WyWuFqKfE6Kyg4785ZrkGVcPmzuL918+fo0r/A1UXX3f6tVuSwsnxEATIXm12WaMUNBE J9QD0QMutCnYz9zmjwb0ahp3A849EyR2sydEFnbauVbKwQIyBrFAOuupxiNPAV5SsmJj 1+iu4C2GopNy81d2DOLpGgy5RIfoPME0Xmyl2Y2SPp8W9uI2mp8sVPqCC8ZZBrlY34rz u8K7FKbIcJozS2zaMryf0YaiHloBTGnQinNsjyIKfYyTz8bkyb/3oemy6Rucc5EgyLdm IXVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=x027gD9Q590MYEegm4t4IJAQG82OSt6Oxw8CWkrsRdY=; b=qIPo6/xiDa6EQ1rTxc12pM1yzJJkEjc4txafx0r5MR5J90HwiK7W4WoQk5Hg62oPhd WcTiVTMQTYwEhTTm83CmAO8Y+vWPy3QMOq685lILqlJLKhaWp4nXtAky/RqXwT5RbDdd 3ydz38zgOkuPjPTZSvAy73l66i3qi9ypvYIhpgqJleGKmDxqEBoQJjPogvf5zTRBilz1 OKOTxpxl+VMKpVFjB6N/hjQLYHBiKPBao4idfWunSriSIVEhelsV+0Dsdym+WvZygCOW eBByfCiDaCbVBBfQ9xmlcFaEUelHrm+vKNHDZ7lFxAkxPjQMPZZpEUQR5m9X1S39JCrD NXeQ== X-Gm-Message-State: ACgBeo3zEuZaRYudR6lGRHCkvL73oj+GbZ8ITVjgqEdnnE91+sj63XQg O2BhTGYUn2KNHzfOa6ICclk= X-Google-Smtp-Source: AA6agR4O6gKYfi05v0t+dgGWyKTuTWLoTgs6S6tdxiHyTufbJpPFYG6Sw/hmpbM3FfDDap+bgXdz8w== X-Received: by 2002:a05:6102:3a0c:b0:390:3a5b:dbcc with SMTP id b12-20020a0561023a0c00b003903a5bdbccmr3603654vsu.23.1661135430926; Sun, 21 Aug 2022 19:30:30 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:30 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 3/8] Documentation: KUnit: add note about mrproper in start.rst Date: Sun, 21 Aug 2022 23:26:41 -0300 Message-Id: <20220822022646.98581-4-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The "Getting Started" guide should be beginner-friendly, therefore add a note about the requirement of a clean source tree when running kunit_tool for the first time, and its related error. Signed-off-by: Tales Aparecida Reviewed-by: David Gow --- Notes: Edit note following suggestions (Sadiya Kazi) --- Documentation/dev-tools/kunit/start.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index 2e31350a85e1..9beec7d6ac4b 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -19,6 +19,22 @@ can run kunit_tool: ./tools/testing/kunit/kunit.py run +.. note :: + You may see the following error: + "The source tree is not clean, please run 'make ARCH=um mrproper'" + + This happens because internally kunit.py specifies ``.kunit`` + (default option) as the build directory in the command ``make O=output/dir`` + through the argument ``--build_dir``. Hence, before starting an + out-of-tree build, the source tree must be clean. + + There is also the same caveat mentioned in the "Build directory for + the kernel" section of the :doc:`admin-guide `, + that is, its use, it must be used for all invocations of ``make``. + The good news is that it can indeed be solved by running + ``make ARCH=um mrproper``, just be aware that this will delete the + current configuration and all generated files. + If everything worked correctly, you should see the following: .. code-block:: From patchwork Mon Aug 22 02:26:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950133 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4715FC32774 for ; Mon, 22 Aug 2022 02:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbiHVCaj (ORCPT ); Sun, 21 Aug 2022 22:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232390AbiHVCag (ORCPT ); Sun, 21 Aug 2022 22:30:36 -0400 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1627920BD4; Sun, 21 Aug 2022 19:30:35 -0700 (PDT) Received: by mail-ua1-x92b.google.com with SMTP id a10so3819687uas.7; Sun, 21 Aug 2022 19:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=VrrdJ3K9eRjv1UeAhxVJuXXbMmxDwwAQl5QOTteS6Y0=; b=hu3r2uvVSKZaur3rxubLdn1JkKgRnHJnuwxauyGJJF+Z74cgSnMDtXGOzAwNTV7wZb 8aAX3WElOohubEjBEfCMYAzcwpA7LAseWCxmFNbQUZUxaq8jfA9FYSmiE/ROWArFRtvJ Kl0q139ZDMXQtBZRRausHZzDoPZnIpu5XJgWxcjy+3As3hQcxoozYsgX0nkbOLh3QG3/ 2JbX4f8PC7fFF14okB5Rfu7odkv5RZpG1hI5tqzJSQC0/dY9P0cXSsmRPOC5CjZg0fvM 0uNoi5Is7/hBKvpzLR4EBF2Gu3fJsQNS3HB4PMGPFKIAZNlQR1voZMF/EMjrksbEppZR tmyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=VrrdJ3K9eRjv1UeAhxVJuXXbMmxDwwAQl5QOTteS6Y0=; b=RPuPvy/+iOgxmfgafcTIK/v0wftNhxggkHPLhkY63KTSdkge3iGrQ9dDBqqdhJRShe CAKkrUQ3AmiJHBylt/m1XpfJtl7qSDBu0IAAxcU5UfBFx/pUG5YHVHUXDKeqko/2+DbY j6TZROp1Weao1L1IoUGmTJxmQnd+yxdee8bpvJHEhtQzJhSnuSMToRagOj0EVo4Z2kjE ThwCtnDvbY+cX8ys0UcHu5ZsluOSc25zCzi90DYrka+0Q5MIgUZRL6Yo6mRI6Ng98Ioh wWwwG5QTXkIcCCyrnRayrgsSueUGmENy+oVE0TdiohcnuFaUBArAPhkUzovoQgeiwuAd J/wg== X-Gm-Message-State: ACgBeo3DlfXfUquORZhCr4DN9zQnpEnXs+JJhZR0CUqEeWfJLKsIQbKn Oqx32QyIDn99Hng1NDPG1p4= X-Google-Smtp-Source: AA6agR5lj1NBmzIaXGQ6Wd8AyZCrWunsjz5k0TaEHmVoBuReOlRUmJEq+T5TrWoLalCNhce/ol0hlQ== X-Received: by 2002:a9f:358c:0:b0:387:9de3:6c8a with SMTP id t12-20020a9f358c000000b003879de36c8amr6454109uad.94.1661135434641; Sun, 21 Aug 2022 19:30:34 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:34 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 4/8] Documentation: KUnit: Reword start guide for selecting tests Date: Sun, 21 Aug 2022 23:26:42 -0300 Message-Id: <20220822022646.98581-5-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Reword "Creating a ``.kunitconfig``" into "Selecting which tests to run" covering the current alternatives for editing configs and glob-filtering Signed-off-by: Tales Aparecida Reviewed-by: Maíra Canal Reviewed-by:Sadiya Kazi Reviewed-by: David Gow --- Notes: Avoid hyphen in "test case" and "test suite" Fix nit: "any test case that match" -> "...matches" --- Documentation/dev-tools/kunit/start.rst | 90 +++++++++++++++++-------- 1 file changed, 63 insertions(+), 27 deletions(-) diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index 9beec7d6ac4b..adf782507999 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -52,27 +52,20 @@ The tests will pass or fail. For detailed information on this wrapper, see: Documentation/dev-tools/kunit/run_wrapper.rst. -Creating a ``.kunitconfig`` ---------------------------- - -By default, kunit_tool runs a selection of tests. However, you can specify which -unit tests to run by creating a ``.kunitconfig`` file with kernel config options -that enable only a specific set of tests and their dependencies. -The ``.kunitconfig`` file contains a list of kconfig options which are required -to run the desired targets. The ``.kunitconfig`` also contains any other test -specific config options, such as test dependencies. For example: the -``FAT_FS`` tests - ``FAT_KUNIT_TEST``, depends on -``FAT_FS``. ``FAT_FS`` can be enabled by selecting either ``MSDOS_FS`` -or ``VFAT_FS``. To run ``FAT_KUNIT_TEST``, the ``.kunitconfig`` has: +Selecting which tests to run +---------------------------- -.. code-block:: none +By default, kunit_tool runs all tests reachable with minimal configuration, +that is, using default values for most of the kconfig options. However, +you can select which tests to run by: - CONFIG_KUNIT=y - CONFIG_MSDOS_FS=y - CONFIG_FAT_KUNIT_TEST=y +- `Customizing Kconfig`_ used to compile the kernel, or +- `Filtering tests by name`_ to select specifically which compiled tests to run. -1. A good starting point for the ``.kunitconfig`` is the KUnit default config. - You can generate it by running: +Customizing Kconfig +~~~~~~~~~~~~~~~~~~~ +A good starting point for the ``.kunitconfig`` is the KUnit default config. +If you didn't run ``kunit.py run`` yet, you can generate it by running: .. code-block:: bash @@ -84,27 +77,70 @@ or ``VFAT_FS``. To run ``FAT_KUNIT_TEST``, the ``.kunitconfig`` has: ``.kunitconfig`` lives in the ``--build_dir`` used by kunit.py, which is ``.kunit`` by default. -.. note :: +Before running the tests, kunit_tool ensures that all config options +set in ``.kunitconfig`` are set in the kernel ``.config``. It will warn +you if you have not included dependencies for the options used. + +There are many ways to customize the configurations: + +a. Edit ``.kunit/.kunitconfig``. The file should contain the list of kconfig + options required to run the desired tests, including their dependencies. You may want to remove CONFIG_KUNIT_ALL_TESTS from the ``.kunitconfig`` as it will enable a number of additional tests that you may not want. + If you need to run on an architecture other than UML see :ref:`kunit-on-qemu`. -2. You can then add any other Kconfig options, for example: +b. Enable additional kconfig options on top of ``.kunit/.kunitconfig``. + For example, to include the kernel's linked-list test you can run:: -.. code-block:: none + ./tools/testing/kunit/kunit.py run \ + --kconfig_add CONFIG_LIST_KUNIT_TEST=y - CONFIG_LIST_KUNIT_TEST=y +c. Provide the path of one or more .kunitconfig files from the tree. + For example, to run only ``FAT_FS`` and ``EXT4`` tests you can run:: -Before running the tests, kunit_tool ensures that all config options -set in ``.kunitconfig`` are set in the kernel ``.config``. It will warn -you if you have not included dependencies for the options used. + ./tools/testing/kunit/kunit.py run \ + --kunitconfig ./fs/fat/.kunitconfig \ + --kunitconfig ./fs/ext4/.kunitconfig -.. note :: - If you change the ``.kunitconfig``, kunit.py will trigger a rebuild of the +d. If you change the ``.kunitconfig``, kunit.py will trigger a rebuild of the ``.config`` file. But you can edit the ``.config`` file directly or with tools like ``make menuconfig O=.kunit``. As long as its a superset of ``.kunitconfig``, kunit.py won't overwrite your changes. +.. note :: + + To save a .kunitconfig after finding a satisfactory configuration:: + + make savedefconfig O=.kunit + cp .kunit/defconfig .kunit/.kunitconfig + +Filtering tests by name +~~~~~~~~~~~~~~~~~~~~~~~ +If you want to be more specific than Kconfig can provide, it is also possible +to select which tests to execute at boot-time by passing a glob filter +(read instructions regarding the pattern in the manpage :manpage:`glob(7)`). +If there is a ``"."`` (period) in the filter, it will be interpreted as a +separator between the name of the test suite and the test case, +otherwise, it will be interpreted as the name of the test suite. +For example, let's assume we are using the default config: + +a. inform the name of a test suite, like ``"kunit_executor_test"``, + to run every test case it contains:: + + ./tools/testing/kunit/kunit.py run "kunit_executor_test" + +b. inform the name of a test case prefixed by its test suite, + like ``"example.example_simple_test"``, to run specifically that test case:: + + ./tools/testing/kunit/kunit.py run "example.example_simple_test" + +c. use wildcard characters (``*?[``) to run any test case that matches the pattern, + like ``"*.*64*"`` to run test cases containing ``"64"`` in the name inside + any test suite:: + + ./tools/testing/kunit/kunit.py run "*.*64*" + Running Tests without the KUnit Wrapper ======================================= If you do not want to use the KUnit Wrapper (for example: you want code From patchwork Mon Aug 22 02:26:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950134 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDAB9C00140 for ; Mon, 22 Aug 2022 02:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232535AbiHVCaz (ORCPT ); Sun, 21 Aug 2022 22:30:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232400AbiHVCak (ORCPT ); Sun, 21 Aug 2022 22:30:40 -0400 Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63EA220BD4; Sun, 21 Aug 2022 19:30:39 -0700 (PDT) Received: by mail-vk1-xa2f.google.com with SMTP id b81so4903386vkf.1; Sun, 21 Aug 2022 19:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=z1ZsU5x1IoYopHd5y3D5llLxgCc0eEbrcLWwHGDNGNI=; b=TRsp8CRTrrydzxQGGmIKRs7POSJ8s7mV7gUqN9lZ2qgBNPqimjMOZHXft087WPLDe+ q0Rx3issWmxkzjSDswOblXXErorlP40dak8DlsOeKZ6hJGxIE8+CJlrEe2NaSicFukJp cqEzZZcRp35fX4QNKrx0m5mbtfGZCiZz+SGumBqzyuKvxTBt+yk6QIn/nPNXUHDvFHS5 ExLPIlV/xcXEmOFNvenLU8qdbY9vTSVRza53oVNseECxR1mfdOtnunTdMxYSQ0vB4C2a Vvh3cxCXcmUWM6d8AZBQpUTtvfs7rqW7zFMQ7Dp7M4uTLErO1piZMeNkx2dXuk+bPHXq ozjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=z1ZsU5x1IoYopHd5y3D5llLxgCc0eEbrcLWwHGDNGNI=; b=0K750q+ytt9CwQfwGg//DoYMK6jNipX/izRJ7sNzzjSM2GGTKilPL6I4vuCzhGvWbb f31OlwzOdrkbMlTCZqWFLX5bfBiIhY6WWOTfubSyW3T+WqI12SBRpGMN3fep5jnZxRiw 6z9tQFplOn8fyR4vnDrlPiR+/8Sit7dF32Yc77UOeFVVCtRIyPABUjTIQtbMrrN1wLdo 5w4SckSjuZ0gOlKrsV3Ppj3DAlrkZ52rbS1mHxic74Tzl2iEKjupfrGMKjpNii0g/0rw IGDasFvb3Jt4/A6WcejF1xFs+OuwnPl2huosxo+1hSnlxbmujJMSbPTJfAuKKn/t68PV k6Zg== X-Gm-Message-State: ACgBeo0RYeG53EC4lNXix7tsl1I5WlyiuqFyId08AVGHiIfLgI/H55Y/ 3JWUy0A1xVwACNfRSFEojH0= X-Google-Smtp-Source: AA6agR4s/yrI1OKO/Z2JygmH+fmfnN/6uaXsOb2Z07rMUkHo+4/MAhfnXo4oJPX1vb6Ncvuwnv+tgQ== X-Received: by 2002:a1f:2196:0:b0:383:cc4f:4233 with SMTP id h144-20020a1f2196000000b00383cc4f4233mr6447416vkh.16.1661135438500; Sun, 21 Aug 2022 19:30:38 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:38 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi , Tim.Bird@sony.com Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 5/8] Documentation: KUnit: add intro to the getting-started page Date: Sun, 21 Aug 2022 23:26:43 -0300 Message-Id: <20220822022646.98581-6-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Describe the objective of the Getting Started page, which should be a brief and beginner-friendly walkthrough for running and writing tests, showing the reader where to find detailed instructions in other pages. Signed-off-by: Tales Aparecida Reviewed-by: Maíra Canal Reviewed-by:Sadiya Kazi Reviewed-by: David Gow --- Notes: Remove recommendation about having compiled the kernel before using kunit_tool. I changed my mind about it after Tim Bird's highlight. --- Documentation/dev-tools/kunit/start.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst index adf782507999..75fd05286396 100644 --- a/Documentation/dev-tools/kunit/start.rst +++ b/Documentation/dev-tools/kunit/start.rst @@ -4,6 +4,10 @@ Getting Started =============== +This page contains an overview of the kunit_tool and KUnit framework, +teaching how to run existing tests and then how to write a simple test case, +and covers common problems users face when using KUnit for the first time. + Installing Dependencies ======================= KUnit has the same dependencies as the Linux kernel. As long as you can From patchwork Mon Aug 22 02:26:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950136 X-Patchwork-Delegate: brendanhiggins@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B35A2C32796 for ; Mon, 22 Aug 2022 02:30:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232544AbiHVCa6 (ORCPT ); Sun, 21 Aug 2022 22:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbiHVCan (ORCPT ); Sun, 21 Aug 2022 22:30:43 -0400 Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ABC1220E2; Sun, 21 Aug 2022 19:30:43 -0700 (PDT) Received: by mail-vs1-xe36.google.com with SMTP id l7so9535043vsc.0; Sun, 21 Aug 2022 19:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Rcr+UWvpwFsX5wSj0zFjllGRLda0UFgn1uun5gueN54=; b=iRa7nBPVQ5ieSVV1SEsOAgeorDjhvJIj97P/ytmGKL1DZEFV7tVA0vA05SFAqI2Pp4 9UzZZnmN2FWpDN9VuiRY2cw9JSq6weyc1OZTVbGtffiY7HohaPqTuS05rOcGZIsqUX0Z RTmJ03PXzB7P3bT4W0+jZq7u9rJKpEuVGw8cKIZW4H1AsQQGTmS/R0U/bwLIJwGfR95Q NSbByhx88Ml8Dr206INUbAwVWyGmwkJsNNHZ9wVLM+RySnuycIDPgEO4U4H/JS7T3Fb6 DHsyIAzJEJGw7Ge8ZvU/h9eNL3k4Hy7RsixMSgihINwl80ibekP/tQJxK9MyoEVqHsPW vFWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Rcr+UWvpwFsX5wSj0zFjllGRLda0UFgn1uun5gueN54=; b=ZmyOsg0KzVYqFCEYtPNDg9nDOox0brmCN2vmzqDafB57sP2bRZa6mr9Zu3dl13PazH r1++xQDJqLSDJDkRHRu5AhhmZnM5DrTwHSl/IUMZYDkXmTJNFh+0sf48L4LBCEoi5Hgs eu7D4L+67GxzUTcBgKDrkdk/fXhaeucJj5qdqh8MsL8WQANiSW9zwPafHSOhb4j+QOvR 6IGIP1yZCBcanOh4orAvyViJzZ4xyUidZH3W3nMvfpvP67yVaKa3ovcArPqa2nBTveWz eWn60iACEMeczYAR9a1R3FvbUf8jJwVj8F4lBkUAIeT26xTFHbuI8b7Syp0EZjL6oYoS pejg== X-Gm-Message-State: ACgBeo1NHNnktn04yOLKdbQZoUx75JIx4DB0fDswcBORe/dASInxCg+y fpO9fMF/z52P7aqPV6plUvUzPEPMyMTHMA== X-Google-Smtp-Source: AA6agR5Ib6+kInWcaTt9oNzRZdyf2mKEebjRh/3ftNJwvPLBqAp1l2rxn84sCGZZcFRHo+/rqzu0lg== X-Received: by 2002:a67:d483:0:b0:38f:4981:c4f3 with SMTP id g3-20020a67d483000000b0038f4981c4f3mr5962663vsj.59.1661135442235; Sun, 21 Aug 2022 19:30:42 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:41 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 6/8] Documentation: KUnit: update links in the index page Date: Sun, 21 Aug 2022 23:26:44 -0300 Message-Id: <20220822022646.98581-7-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Replace out-of-date external links with references to the kernel documentation, replacing TAP webpage for the more appropriate KTAP documentation and the UML webpage by its documentation. Signed-off-by: Tales Aparecida Reviewed-by: David Gow --- Documentation/dev-tools/kunit/index.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/dev-tools/kunit/index.rst b/Documentation/dev-tools/kunit/index.rst index d7187282ba28..f5d13f1d37be 100644 --- a/Documentation/dev-tools/kunit/index.rst +++ b/Documentation/dev-tools/kunit/index.rst @@ -28,10 +28,10 @@ KUnit (Kernel unit testing framework) provides a common framework for unit tests within the Linux kernel. Using KUnit, you can define groups of test cases called test suites. The tests either run on kernel boot if built-in, or load as a module. KUnit automatically flags and reports -failed test cases in the kernel log. The test results appear in `TAP -(Test Anything Protocol) format `_. It is inspired by -JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock (C++ unit testing -framework). +failed test cases in the kernel log. The test results appear in +:doc:`KTAP (Kernel - Test Anything Protocol) format`. +It is inspired by JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock +(C++ unit testing framework). KUnit tests are part of the kernel, written in the C (programming) language, and test parts of the Kernel implementation (example: a C @@ -45,8 +45,9 @@ internal system functionality. KUnit runs in kernel space and is not restricted to things exposed to user-space. In addition, KUnit has kunit_tool, a script (``tools/testing/kunit/kunit.py``) -that configures the Linux kernel, runs KUnit tests under QEMU or UML (`User Mode -Linux `_), parses the test results and +that configures the Linux kernel, runs KUnit tests under QEMU or UML +(:doc:`User Mode Linux `), +parses the test results and displays them in a user friendly manner. Features From patchwork Mon Aug 22 02:26:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 574EAC32793 for ; Mon, 22 Aug 2022 02:30:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232513AbiHVCa4 (ORCPT ); Sun, 21 Aug 2022 22:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232475AbiHVCas (ORCPT ); Sun, 21 Aug 2022 22:30:48 -0400 Received: from mail-vs1-xe2c.google.com (mail-vs1-xe2c.google.com [IPv6:2607:f8b0:4864:20::e2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 098AB2229F; Sun, 21 Aug 2022 19:30:47 -0700 (PDT) Received: by mail-vs1-xe2c.google.com with SMTP id n125so9782090vsc.5; Sun, 21 Aug 2022 19:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=xnIjsEcN4n25OOuE3ujYWSey7R6vl1yCgHuRtEPIeQM=; b=Mhunkwg2ed1b8By3M05qBvgu7NXP6i8qOcw20Tw5kc7w8JTkLuT+LUqlDaWb3pfWKb rWNr8/BI/iDVsUSsCyaEHJGSWI3XJIGdy9fz22g2O0KFcoS1PCh+7qF+TUco4beVB2MZ 1MtbguxqIhLQFW1rSrjXAHp/Oj7FKDFSlk8SCKLakZddj8LUl2yrH7E+xVNmn2QMnUSu obt1vWXo0VGr5qeqlI2dCouKgVoXFSmrH6WGBisu3b8Uwp0m2VXHZKkl0PAtLhoFtLJz kAvMn3DrLaEZQi4wsUbQ4fstQvWI/H/7ee9P0/MH0SA6fuM2gWn4SwLB00JNuDz3WNf8 mUgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=xnIjsEcN4n25OOuE3ujYWSey7R6vl1yCgHuRtEPIeQM=; b=dB/OfU47LWMBki9c5ZP9vSUSIO1W79nDXE02bMUD9Th+1pJyBh35ErhaBiCWJ1g6ZR wTKTme/UHzM+cQPxrR8PZMOSgJV8P0ugQC9fJ/FmCiqcOqmVulONWQF7NsBXqd5UO/0t OhZU522An4eOb45aEseXmDmCohxsqAg2Wk0k1Qq23ofKystPcw5+oQ8anOuBPi+Bcjhc E/LuYcOCyIo6qwjBmP0h6IKPYeg23+ENglAT401BymFSsjMfz/0ePMl5WRj2l1wzfEDd 63pIWFeEbvsSGRZF9qGxz7fyaC8Qda97AjY7UMzNgMdac2hmqN++4oyNNqRuQDOHvhcB BMDw== X-Gm-Message-State: ACgBeo27Td9+4zr6fXBJF6pJXPiQfOlL8YS/nx/A6cvCf7ZmL/FvLAxi Jw3490AiSbYCjjzih6aHxlEDaI26xF7ddA== X-Google-Smtp-Source: AA6agR7/E5FFsDPkRvBdZOjaUfR0CnJriyMx2H6dCK9ZvGHuo3sfoH0pyAwMQXGNqzccQ+aKvprFsw== X-Received: by 2002:a05:6102:313b:b0:38f:7ffa:166c with SMTP id f27-20020a056102313b00b0038f7ffa166cmr6126660vsh.46.1661135446156; Sun, 21 Aug 2022 19:30:46 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:45 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com, Kees Cook Subject: [PATCH v2 7/8] lib: overflow: update reference to kunit-tool Date: Sun, 21 Aug 2022 23:26:45 -0300 Message-Id: <20220822022646.98581-8-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Replace URL with an updated path to the full Documentation page Signed-off-by: Tales Aparecida Reviewed-by: Kees Cook Reviewed-by: David Gow --- lib/overflow_kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.c index 7e3e43679b73..78075106c0df 100644 --- a/lib/overflow_kunit.c +++ b/lib/overflow_kunit.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR MIT /* * Test cases for arithmetic overflow checks. See: - * https://www.kernel.org/doc/html/latest/dev-tools/kunit/kunit-tool.html#configuring-building-and-running-tests + * "Running tests with kunit_tool" at Documentation/dev-tools/kunit/start.rst * ./tools/testing/kunit/kunit.py run overflow [--raw_output] */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt From patchwork Mon Aug 22 02:26:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tales X-Patchwork-Id: 12950137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C6BDC32774 for ; Mon, 22 Aug 2022 02:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232520AbiHVCbF (ORCPT ); Sun, 21 Aug 2022 22:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbiHVCaz (ORCPT ); Sun, 21 Aug 2022 22:30:55 -0400 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8F822500; Sun, 21 Aug 2022 19:30:50 -0700 (PDT) Received: by mail-ua1-x92b.google.com with SMTP id t21so3821296uaq.3; Sun, 21 Aug 2022 19:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=8OT18EiZzc67zed1enekOSrV6Cl7PLk6DpE6nm225uQ=; b=RPrTXZwuaXKTbsgGqVYekGHgLkS7SNnKHj/ikYP8oT3kuqDfFzbBQ6BkpZ7cOUYpDV dv0k8I1thp70tofntsyy8IQrm8RzoWVqjyQIWftDw/g/qrWOOrg8xu8eD7C/sEUkgItC UyImC+/7R4Yz3AkZ2DN/+tGiBa7mnSuHlgtNN8m25xQDDdsNc+X2L9D9TiL64n4KH5Ab 46GzCuONuLgWdxHo4D2+EByqHe1stpecS5qW3/h2GCrQGIpO9NlmKGR4Nwc0oTnkMXs/ AHZS/5t9fMPyqK9KjkuYUi9xPLdFEpevQTEIhbS1zAHZc79ZZN5l0uMOY6gqXzXc3jOQ N3gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=8OT18EiZzc67zed1enekOSrV6Cl7PLk6DpE6nm225uQ=; b=0AuIFuyXSQNLesKsZbYcBOG07U8X7M5JIt25dsLSMDO7Ghc0evwUvxxCTHGN0yHHjc 8Fs/0OWYT3bxaNm53teb7KXT0S6Enn0iZP1mfbvZBNdH82jP9YLRRdQn9uBYaXRzDe2q JMpe5fUq+kwZoBjX4RPsZJvKcOVy+/JXnTi47H1Ft1Qrjr5lSbwPFPK8tQdWHqLJhhyY rqP0itVLFrgr2lbJ52TaLwJJMSLHPxg04/V/llFhsFgkvE6Pn5qXjIQoWxEhCx0g8+8d rvO+MTuEOZpZ+Qk/v0hX7AHkXIJbqPM70wVGgBrRxXsOkwztazb9fflLulCOrIsp0Xls q+gA== X-Gm-Message-State: ACgBeo1vPgPm1GK9mErlrjCkHW1B/8M759u4zP0XXYmWM9OkBxSBv8vA Llfw0B8GoCQJ88nknkdgXC8= X-Google-Smtp-Source: AA6agR7LJvHa1vNGh2v2eNDqr+6op1KLplZdrqtgC87Uw2T6qVqUB/tJIRVbFrRZ8HaPNtC+Y1QB2A== X-Received: by 2002:ab0:4ad3:0:b0:392:fb0b:b617 with SMTP id t19-20020ab04ad3000000b00392fb0bb617mr6220367uae.57.1661135449859; Sun, 21 Aug 2022 19:30:49 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:4c2:8202::1001]) by smtp.gmail.com with ESMTPSA id y125-20020a1f3283000000b00378fe8518dcsm8330853vky.51.2022.08.21.19.30.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Aug 2022 19:30:49 -0700 (PDT) From: Tales Aparecida To: Sadiya Kazi Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, davidgow@google.com, corbet@lwn.net, brendan.higgins@linux.dev, Trevor Woerner , siqueirajordao@riseup.net, mwen@igalia.com, andrealmeid@riseup.net, mairacanal@riseup.net, Isabella Basso , magalilemes00@gmail.com, tales.aparecida@gmail.com Subject: [PATCH v2 8/8] lib: stackinit: update reference to kunit-tool Date: Sun, 21 Aug 2022 23:26:46 -0300 Message-Id: <20220822022646.98581-9-tales.aparecida@gmail.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220822022646.98581-1-tales.aparecida@gmail.com> References: <20220822022646.98581-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Replace URL with an updated path to the full Documentation page Signed-off-by: Tales Aparecida Reviewed-by: David Gow --- lib/stackinit_kunit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackinit_kunit.c b/lib/stackinit_kunit.c index 35c69aa425b2..4591d6cf5e01 100644 --- a/lib/stackinit_kunit.c +++ b/lib/stackinit_kunit.c @@ -3,7 +3,7 @@ * Test cases for compiler-based stack variable zeroing via * -ftrivial-auto-var-init={zero,pattern} or CONFIG_GCC_PLUGIN_STRUCTLEAK*. * For example, see: - * https://www.kernel.org/doc/html/latest/dev-tools/kunit/kunit-tool.html#configuring-building-and-running-tests + * "Running tests with kunit_tool" at Documentation/dev-tools/kunit/start.rst * ./tools/testing/kunit/kunit.py run stackinit [--raw_output] \ * --make_option LLVM=1 \ * --kconfig_add CONFIG_INIT_STACK_ALL_ZERO=y