€•»úŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ//translations/zh_CN/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/zh_TW/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/it_IT/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ja_JP/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ko_KR/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/pt_BR/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/sp_SP/dev-tools/kunit/run_wrapper”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)�”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…”�”}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒI/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/run_wrapper.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒRunning tests with kunit_tool”h]”hŒRunning tests with kunit_tool”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒ÷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 manually, see: Documentation/dev-tools/kunit/run_manual.rst. As long as we can build the kernel, we can run KUnit.”h]”hŒ÷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 manually, see: Documentation/dev-tools/kunit/run_manual.rst. As long as we can build the kernel, we can run KUnit.”…”�”}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hŒmkunit_tool is a Python script which configures and builds a kernel, runs tests, and formats the test results.”h]”hŒmkunit_tool is a Python script which configures and builds a kernel, runs tests, and formats the test results.”…”�”}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhÊh²hubhÞ)�”}”(hŒ Run command:”h]”hŒ Run command:”…”�”}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒ literal_block”“”)�”}”(hŒ"./tools/testing/kunit/kunit.py run”h]”hŒ"./tools/testing/kunit/kunit.py run”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œnone”Œhighlight_args”}”uh1j h³hÇh´KhhÊh²hubhÞ)�”}”(hŒWe should see the following:”h]”hŒWe should see the following:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubj )�”}”(hŒNConfiguring KUnit Kernel ... Building KUnit kernel... Starting KUnit kernel...”h]”hŒNConfiguring KUnit Kernel ... Building KUnit kernel... Starting KUnit kernel...”…”�”}”hj,sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´KhhÊh²hubhÞ)�”}”(hŒ)We may want to use the following options:”h]”hŒ)We may want to use the following options:”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubj )�”}”(hŒD./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`”h]”hŒD./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`”…”�”}”hjIsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´KhhÊh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ=``--timeout`` sets a maximum amount of time for tests to run.”h]”hÞ)�”}”(hjah]”(hŒliteral”“”)�”}”(hŒ ``--timeout``”h]”hŒ --timeout”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjcubhŒ0 sets a maximum amount of time for tests to run.”…”�”}”(hjch²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K#hj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjZh²hh³hÇh´Nubj^)�”}”(hŒ;``--jobs`` sets the number of threads to build the kernel. ”h]”hÞ)�”}”(hŒ:``--jobs`` sets the number of threads to build the kernel.”h]”(jg)�”}”(hŒ ``--jobs``”h]”hŒ--jobs”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjŠubhŒ0 sets the number of threads to build the kernel.”…”�”}”(hjŠh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K$hj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjZh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jXh³hÇh´K#hhÊh²hubhÞ)�”}”(hXòkunit_tool will generate a ``.kunitconfig`` with a default configuration, if no other ``.kunitconfig`` file exists (in the build directory). In addition, it verifies that the generated ``.config`` file contains the ``CONFIG`` options in the ``.kunitconfig``. It is also possible to pass a separate ``.kunitconfig`` fragment to kunit_tool. This is useful if we have several different groups of tests we want to run independently, or if we want to use pre-defined test configs for certain subsystems.”h]”(hŒkunit_tool will generate a ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hj¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒ+ with a default configuration, if no other ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒS file exists (in the build directory). In addition, it verifies that the generated ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ ``.config``”h]”hŒ.config”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒ file contains the ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ ``CONFIG``”h]”hŒCONFIG”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒ options in the ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒ). It is also possible to pass a separate ”…”�”}”(hj´h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj´ubhŒ¸ fragment to kunit_tool. This is useful if we have several different groups of tests we want to run independently, or if we want to use pre-defined test configs for certain subsystems.”…”�”}”(hj´h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hhÊh²hubhÞ)�”}”(hŒuTo use a different ``.kunitconfig`` file (such as one provided to test a particular subsystem), pass it as an option:”h]”(hŒTo use a different ”…”�”}”(hj.h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj.ubhŒR file (such as one provided to test a particular subsystem), pass it as an option:”…”�”}”(hj.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K0hhÊh²hubj )�”}”(hŒE./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig”h]”hŒE./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig”…”�”}”hjNsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´K3hhÊh²hubhÞ)�”}”(hŒ@To view kunit_tool flags (optional command-line arguments), run:”h]”hŒ@To view kunit_tool flags (optional command-line arguments), run:”…”�”}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K7hhÊh²hubj )�”}”(hŒ)./tools/testing/kunit/kunit.py run --help”h]”hŒ)./tools/testing/kunit/kunit.py run --help”…”�”}”hjksbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´K9hhÊh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Creating a ``.kunitconfig`` file”h]”(hŒ Creating a ”…”�”}”(hj}h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj}ubhŒ file”…”�”}”(hj}h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjzh²hh³hÇh´K>ubhÞ)�”}”(hXÔ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 ``.kunitconfig`` file. For default .kunitconfig, see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/kunit/configs/default.config. A ``.kunitconfig`` is a ``minconfig`` (a .config generated by running ``make savedefconfig``), used for running a specific set of tests. This file contains the regular Kernel configs with specific test targets. The ``.kunitconfig`` also contains any other config options required by the tests (For example: dependencies for features under tests, configs that enable/disable certain code blocks, arch configs and so on).”h]”(hŒQIf we want to run a specific set of tests (rather than those listed in the KUnit ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ ``defconfig``”h]”hŒ defconfig”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ)), we can provide Kconfig options in the ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ& file. For default .kunitconfig, see: ”…”�”}”(hj�h²hh³Nh´NubhŒ reference”“”)�”}”(hŒrhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/kunit/configs/default.config”h]”hŒrhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/kunit/configs/default.config”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÍuh1jÉhj�ubhŒ. A ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ is a ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ ``minconfig``”h]”hŒ minconfig”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ! (a .config generated by running ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ``make savedefconfig``”h]”hŒmake savedefconfig”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ{), used for running a specific set of tests. This file contains the regular Kernel configs with specific test targets. The ”…”�”}”(hj�h²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj�ubhŒ¼ also contains any other config options required by the tests (For example: dependencies for features under tests, configs that enable/disable certain code blocks, arch configs and so on).”…”�”}”(hj�h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K@hjzh²hubhÞ)�”}”(hŒubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ(Configuring, building, and running tests”h]”hŒ(Configuring, building, and running tests”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj\h²hh³hÇh´KfubhÞ)�”}”(hŒéIf we want to make manual changes to the KUnit build process, we can run part of the KUnit build process independently. When running kunit_tool, from a ``.kunitconfig``, we can generate a ``.config`` by using the ``config`` argument:”h]”(hŒ˜If we want to make manual changes to the KUnit build process, we can run part of the KUnit build process independently. When running kunit_tool, from a ”…”�”}”(hjmh²hh³Nh´Nubjg)�”}”(hŒ``.kunitconfig``”h]”hŒ .kunitconfig”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjmubhŒ, we can generate a ”…”�”}”(hjmh²hh³Nh´Nubjg)�”}”(hŒ ``.config``”h]”hŒ.config”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjmubhŒ by using the ”…”�”}”(hjmh²hh³Nh´Nubjg)�”}”(hŒ ``config``”h]”hŒconfig”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjmubhŒ argument:”…”�”}”(hjmh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khhj\h²hubj )�”}”(hŒ%./tools/testing/kunit/kunit.py config”h]”hŒ%./tools/testing/kunit/kunit.py config”…”�”}”hj±sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´Kmhj\h²hubhÞ)�”}”(hŒXTo build a KUnit kernel from the current ``.config``, we can use the ``build`` argument:”h]”(hŒ)To build a KUnit kernel from the current ”…”�”}”(hjÀh²hh³Nh´Nubjg)�”}”(hŒ ``.config``”h]”hŒ.config”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÀubhŒ, we can use the ”…”�”}”(hjÀh²hh³Nh´Nubjg)�”}”(hŒ ``build``”h]”hŒbuild”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÀubhŒ argument:”…”�”}”(hjÀh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kqhj\h²hubj )�”}”(hŒ$./tools/testing/kunit/kunit.py build”h]”hŒ$./tools/testing/kunit/kunit.py build”…”�”}”hjòsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´Kthj\h²hubhÞ)�”}”(hŒŽIf we already have built UML kernel with built-in KUnit tests, we can run the kernel, and display the test results with the ``exec`` argument:”h]”(hŒ|If we already have built UML kernel with built-in KUnit tests, we can run the kernel, and display the test results with the ”…”�”}”(hjh²hh³Nh´Nubjg)�”}”(hŒ``exec``”h]”hŒexec”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjubhŒ argument:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kxhj\h²hubj )�”}”(hŒ#./tools/testing/kunit/kunit.py exec”h]”hŒ#./tools/testing/kunit/kunit.py exec”…”�”}”hj!sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´K|hj\h²hubhÞ)�”}”(hŒ‹The ``run`` command discussed in section: **Running tests with kunit_tool**, is equivalent to running the above three commands in sequence.”h]”(hŒThe ”…”�”}”(hj0h²hh³Nh´Nubjg)�”}”(hŒ``run``”h]”hŒrun”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj0ubhŒ command discussed in section: ”…”�”}”(hj0h²hh³Nh´NubhŒstrong”“”)�”}”(hŒ!**Running tests with kunit_tool**”h]”hŒRunning tests with kunit_tool”…”�”}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jJhj0ubhŒ@, is equivalent to running the above three commands in sequence.”…”�”}”(hj0h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K€hj\h²hubeh}”(h]”Œ&configuring-building-and-running-tests”ah ]”h"]”Œ(configuring, building, and running tests”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KfubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒParsing test results”h]”hŒParsing test results”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjlh²hh³hÇh´K„ubhÞ)�”}”(hŒéKUnit tests output displays results in TAP (Test Anything Protocol) format. When running tests, kunit_tool parses this output and prints a summary. To see the raw test results in TAP format, we can pass the ``--raw_output`` argument:”h]”(hŒÏKUnit tests output displays results in TAP (Test Anything Protocol) format. When running tests, kunit_tool parses this output and prints a summary. To see the raw test results in TAP format, we can pass the ”…”�”}”(hj}h²hh³Nh´Nubjg)�”}”(hŒ``--raw_output``”h]”hŒ --raw_output”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj}ubhŒ argument:”…”�”}”(hj}h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K†hjlh²hubj )�”}”(hŒ/./tools/testing/kunit/kunit.py run --raw_output”h]”hŒ/./tools/testing/kunit/kunit.py run --raw_output”…”�”}”hj�sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´K‹hjlh²hubhÞ)�”}”(hŒÜIf we have KUnit results in the raw TAP format, we 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.”h]”(hŒpIf we have KUnit results in the raw TAP format, we can parse them and print the human-readable summary with the ”…”�”}”(hj¬h²hh³Nh´Nubjg)�”}”(hŒ ``parse``”h]”hŒparse”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj¬ubhŒc command for kunit_tool. This accepts a filename for an argument, or will read from standard input.”…”�”}”(hj¬h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K�hjlh²hubj )�”}”(hŒ‹# Reading from a file ./tools/testing/kunit/kunit.py parse /var/log/dmesg # Reading from stdin dmesg | ./tools/testing/kunit/kunit.py parse”h]”hŒ‹# Reading from a file ./tools/testing/kunit/kunit.py parse /var/log/dmesg # Reading from stdin dmesg | ./tools/testing/kunit/kunit.py parse”…”�”}”hjÌsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jŒbash”j}”uh1j h³hÇh´K”hjlh²hubeh}”(h]”Œparsing-test-results”ah ]”h"]”Œparsing test results”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K„ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒFiltering tests”h]”hŒFiltering tests”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjäh²hh³hÇh´KœubhÞ)�”}”(hŒ¾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 example: if we only want to run KUnit resource tests, use:”h]”(hŒ+By passing a bash style glob filter to the ”…”�”}”(hjõh²hh³Nh´Nubjg)�”}”(hŒ``exec``”h]”hŒexec”…”�”}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjõubhŒ or ”…”�”}”(hjõh²hh³Nh´Nubjg)�”}”(hŒ``run``”h]”hŒrun”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjõubhŒ€ commands, we can run a subset of the tests built into a kernel . For example: if we only want to run KUnit resource tests, use:”…”�”}”(hjõh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kžhjäh²hubj )�”}”(hŒ4./tools/testing/kunit/kunit.py run 'kunit-resource*'”h]”hŒ4./tools/testing/kunit/kunit.py run 'kunit-resource*'”…”�”}”hj'sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jjj}”uh1j h³hÇh´K¢hjäh²hubhÞ)�”}”(hŒhjU ubhŒ block_quote”“”)�”}”(hŒ»- ``all``: To view the full kernel output, use ``--raw_output=all``. - ``kunit``: This is the default option and filters to KUnit output. Use ``--raw_output`` or ``--raw_output=kunit``. ”h]”jY)�”}”(hhh]”(j^)�”}”(hŒC``all``: To view the full kernel output, use ``--raw_output=all``. ”h]”hÞ)�”}”(hŒB``all``: To view the full kernel output, use ``--raw_output=all``.”h]”(jg)�”}”(hŒ``all``”h]”hŒall”…”�”}”(hj† h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj‚ ubhŒ&: To view the full kernel output, use ”…”�”}”(hj‚ h²hh³Nh´Nubjg)�”}”(hŒ``--raw_output=all``”h]”hŒ--raw_output=all”…”�”}”(hj˜ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj‚ ubhŒ.”…”�”}”(hj‚ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M@hj~ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hj{ ubj^)�”}”(hŒs``kunit``: This is the default option and filters to KUnit output. Use ``--raw_output`` or ``--raw_output=kunit``. ”h]”hÞ)�”}”(hŒr``kunit``: This is the default option and filters to KUnit output. Use ``--raw_output`` or ``--raw_output=kunit``.”h]”(jg)�”}”(hŒ ``kunit``”h]”hŒkunit”…”�”}”(hj¾ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjº ubhŒ>: This is the default option and filters to KUnit output. Use ”…”�”}”(hjº h²hh³Nh´Nubjg)�”}”(hŒ``--raw_output``”h]”hŒ --raw_output”…”�”}”(hjÐ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjº ubhŒ or ”…”�”}”(hjº h²hh³Nh´Nubjg)�”}”(hŒ``--raw_output=kunit``”h]”hŒ--raw_output=kunit”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjº ubhŒ.”…”�”}”(hjº h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MBhj¶ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hj{ ubeh}”(h]”h ]”h"]”h$]”h&]”j²j³uh1jXh³hÇh´M@hjw ubah}”(h]”h ]”h"]”h$]”h&]”uh1ju h³hÇh´M@hjU ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒƒ``--json``: If set, stores the test results in a JSON format and prints to `stdout` or saves to a file if a filename is specified. ”h]”hÞ)�”}”(hŒ‚``--json``: If set, stores the test results in a JSON format and prints to `stdout` or saves to a file if a filename is specified.”h]”(jg)�”}”(hŒ ``--json``”h]”hŒ--json”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjubhŒA: If set, stores the test results in a JSON format and prints to ”…”�”}”(hjh²hh³Nh´Nubj¡ )�”}”(hŒ`stdout`”h]”hŒstdout”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j  hjubhŒ/ or saves to a file if a filename is specified.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MDhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒ‡``--junit``: If set, stores the test results in JUnit XML format and prints to `stdout` or saves to a file if a filename is specified. ”h]”hÞ)�”}”(hŒ†``--junit``: If set, stores the test results in JUnit XML format and prints to `stdout` or saves to a file if a filename is specified.”h]”(jg)�”}”(hŒ ``--junit``”h]”hŒ--junit”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjNubhŒD: If set, stores the test results in JUnit XML format and prints to ”…”�”}”(hjNh²hh³Nh´Nubj¡ )�”}”(hŒ`stdout`”h]”hŒstdout”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j  hjNubhŒ/ or saves to a file if a filename is specified.”…”�”}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MGhjJubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒá``--filter``: Specifies filters on test attributes, for example, ``speed!=slow``. Multiple filters can be used by wrapping input in quotes and separating filters by commas. Example: ``--filter "speed>slow, module=example"``. ”h]”hÞ)�”}”(hŒà``--filter``: Specifies filters on test attributes, for example, ``speed!=slow``. Multiple filters can be used by wrapping input in quotes and separating filters by commas. Example: ``--filter "speed>slow, module=example"``.”h]”(jg)�”}”(hŒ ``--filter``”h]”hŒ--filter”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj†ubhŒ5: Specifies filters on test attributes, for example, ”…”�”}”(hj†h²hh³Nh´Nubjg)�”}”(hŒ``speed!=slow``”h]”hŒ speed!=slow”…”�”}”(hjœh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj†ubhŒf. Multiple filters can be used by wrapping input in quotes and separating filters by commas. Example: ”…”�”}”(hj†h²hh³Nh´Nubjg)�”}”(hŒ)``--filter "speed>slow, module=example"``”h]”hŒ%--filter "speed>slow, module=example"”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj†ubhŒ.”…”�”}”(hj†h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MJhj‚ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒ~``--filter_action``: If set to ``skip``, filtered tests will be shown as skipped in the output rather than showing no output. ”h]”hÞ)�”}”(hŒ}``--filter_action``: If set to ``skip``, filtered tests will be shown as skipped in the output rather than showing no output.”h]”(jg)�”}”(hŒ``--filter_action``”h]”hŒ--filter_action”…”�”}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÐubhŒ : If set to ”…”�”}”(hjÐh²hh³Nh´Nubjg)�”}”(hŒ``skip``”h]”hŒskip”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjÐubhŒV, filtered tests will be shown as skipped in the output rather than showing no output.”…”�”}”(hjÐh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MNhjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒ<``--list_tests``: If set, lists all tests that will be run. ”h]”hÞ)�”}”(hŒ;``--list_tests``: If set, lists all tests that will be run.”h]”(jg)�”}”(hŒ``--list_tests``”h]”hŒ --list_tests”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjubhŒ+: If set, lists all tests that will be run.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MQhjubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒ]``--list_tests_attr``: If set, lists all tests that will be run and all of their attributes. ”h]”hÞ)�”}”(hŒ\``--list_tests_attr``: If set, lists all tests that will be run and all of their attributes.”h]”(jg)�”}”(hŒ``--list_tests_attr``”h]”hŒ--list_tests_attr”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhj.ubhŒG: If set, lists all tests that will be run and all of their attributes.”…”�”}”(hj.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MShj*ubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubj^)�”}”(hŒ>``--list_suites``: If set, lists all suites that will be run. ”h]”hÞ)�”}”(hŒ=``--list_suites``: If set, lists all suites that will be run.”h]”(jg)�”}”(hŒ``--list_suites``”h]”hŒ --list_suites”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jfhjTubhŒ,: If set, lists all suites that will be run.”…”�”}”(hjTh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MVhjPubah}”(h]”h ]”h"]”h$]”h&]”uh1j]hjáh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j²j³uh1jXh³hÇh´KóhjÂh²hubeh}”(h]”Œrunning-command-line-arguments”ah ]”h"]”Œrunning command-line arguments”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KíubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒCommand-line completion”h]”hŒCommand-line completion”…”�”}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj„h²hh³hÇh´MYubhÞ)�”}”(hŒ3The kunit_tool comes with a bash completion script:”h]”hŒ3The kunit_tool comes with a bash completion script:”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M[hj„h²hubj )�”}”(hŒ.source tools/testing/kunit/kunit-completion.sh”h]”hŒ.source tools/testing/kunit/kunit-completion.sh”…”�”}”hj£sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆj‰jŒbash”j}”uh1j h³hÇh´M]hj„h²hubeh}”(h]”Œcommand-line-completion”ah ]”h"]”Œcommand-line completion”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MYubeh}”(h]”Œrunning-tests-with-kunit-tool”ah ]”h"]”Œrunning tests with kunit_tool”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jæŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”jQ]”jFasŒnameids”}”(jÀj½jYjVjijfjájÞjWjTj»jQjºj·j�j~j¸jµuŒ nametypes”}”(jÀ‰jY‰ji‰já‰jW‰j»ˆjº‰j�‰j¸‰uh}”(j½hÊjVjzjfj\jÞjljTjäjQjZj·jZj~jÂjµj„uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)�”}”(hhh]”hÞ)�”}”(hhh]”hŒ3Hyperlink target "kunit-on-qemu" is not referenced.”…”�”}”hjPsbah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhjMubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”K¨uh1jKubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.