€•œpŒ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/faq”Œ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/faq”Œ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/faq”Œ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/faq”Œ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/faq”Œ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/faq”Œ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/faq”Œ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³ŒA/var/lib/git/docbuild/linux/Documentation/dev-tools/kunit/faq.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒFrequently Asked Questions”h]”hŒFrequently Asked Questions”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ:How is this different from Autotest, kselftest, and so on?”h]”hŒ:How is this different from Autotest, kselftest, and so on?”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒQKUnit is a unit testing framework. Autotest, kselftest (and some others) are not.”h]”hŒQKUnit is a unit testing framework. Autotest, kselftest (and some others) are not.”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)”}”(hX©A `unit test `_ is supposed to test a single unit of code in isolation and hence the name *unit test*. A unit test should be the finest granularity of testing and should allow all possible code paths to be tested in the code under test. This is only possible if the code under test is small and does not have any external dependencies outside of the test's control like hardware.”h]”(hŒA ”…””}”(hhþh²hh³Nh´NubhŒ reference”“”)”}”(hŒ;`unit test `_”h]”hŒ unit test”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ unit test”Œrefuri”Œ,https://martinfowler.com/bliki/UnitTest.html”uh1jhhþubhŒtarget”“”)”}”(hŒ/ ”h]”h}”(h]”Œ unit-test”ah ]”h"]”Œ unit test”ah$]”h&]”Œrefuri”juh1jŒ referenced”KhhþubhŒK is supposed to test a single unit of code in isolation and hence the name ”…””}”(hhþh²hh³Nh´NubhŒemphasis”“”)”}”(hŒ *unit test*”h]”hŒ unit test”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j.hhþubhX. A unit test should be the finest granularity of testing and should allow all possible code paths to be tested in the code under test. This is only possible if the code under test is small and does not have any external dependencies outside of the test’s control like hardware.”…””}”(hhþh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)”}”(hXyThere are no testing frameworks currently available for the kernel that do not require installing the kernel on a test machine or in a virtual machine. All testing frameworks require tests to be written in userspace and run on the kernel under test. This is true for Autotest, kselftest, and some others, disqualifying any of them from being considered unit testing frameworks.”h]”hXyThere are no testing frameworks currently available for the kernel that do not require installing the kernel on a test machine or in a virtual machine. All testing frameworks require tests to be written in userspace and run on the kernel under test. This is true for Autotest, kselftest, and some others, disqualifying any of them from being considered unit testing frameworks.”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubeh}”(h]”Œ7how-is-this-different-from-autotest-kselftest-and-so-on”ah ]”h"]”Œ:how is this different from autotest, kselftest, and so on?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ;Does KUnit support running on architectures other than UML?”h]”hŒ;Does KUnit support running on architectures other than UML?”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj^h²hh³hÇh´Kubhï)”}”(hŒ•Yes. KUnit can run on any architecture, though the kunit.py tool can only build and run kernels for some architectures (of which UML is the default).”h]”hŒ•Yes. KUnit can run on any architecture, though the kunit.py tool can only build and run kernels for some architectures (of which UML is the default).”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj^h²hubhï)”}”(hŒÁYou can build and run tests without kunit.py at all on any architecture by enabling ``CONFIG_KUNIT=y`` and booting the kernel. See Documentation/dev-tools/kunit/run_manual.rst for more details.”h]”(hŒTYou can build and run tests without kunit.py at all on any architecture by enabling ”…””}”(hj}h²hh³Nh´NubhŒliteral”“”)”}”(hŒ``CONFIG_KUNIT=y``”h]”hŒCONFIG_KUNIT=y”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj}ubhŒ[ and booting the kernel. See Documentation/dev-tools/kunit/run_manual.rst for more details.”…””}”(hj}h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj^h²hubhï)”}”(hXKAlternatively, kunit.py supports many common architectures using cross-compilers and the qemu emulator. This can be done using the ``--arch`` parameter when running the tests, and the ``--cross_compile`` parameter when building (if the architecture is not supported by the host compiler). See :ref:`kunit-on-qemu` for more details.”h]”(hŒƒAlternatively, kunit.py supports many common architectures using cross-compilers and the qemu emulator. This can be done using the ”…””}”(hjŸh²hh³Nh´Nubj†)”}”(hŒ ``--arch``”h]”hŒ--arch”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjŸubhŒ+ parameter when running the tests, and the ”…””}”(hjŸh²hh³Nh´Nubj†)”}”(hŒ``--cross_compile``”h]”hŒ--cross_compile”…””}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjŸubhŒZ parameter when building (if the architecture is not supported by the host compiler). See ”…””}”(hjŸh²hh³Nh´Nubh)”}”(hŒ:ref:`kunit-on-qemu`”h]”hŒinline”“”)”}”(hjÍh]”hŒ kunit-on-qemu”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jÏhjËubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œdev-tools/kunit/faq”Œ refdomain”jÜŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œ kunit-on-qemu”uh1hh³hÇh´K#hjŸubhŒ for more details.”…””}”(hjŸh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K#hj^h²hubhï)”}”(hŒzWhen writing tests targeting other architectures, it's worth keeping the tips on the :ref:`kunit-on-non-uml` page in mind.”h]”(hŒWWhen writing tests targeting other architectures, it’s worth keeping the tips on the ”…””}”(hjúh²hh³Nh´Nubh)”}”(hŒ:ref:`kunit-on-non-uml`”h]”jÐ)”}”(hjh]”hŒkunit-on-non-uml”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jÛŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jÏhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jèŒ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjîŒkunit-on-non-uml”uh1hh³hÇh´K)hjúubhŒ page in mind.”…””}”(hjúh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K)hj^h²hubj)”}”(hŒ.. _kinds-of-tests:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œkinds-of-tests”uh1jh´K,hj^h²hh³hÇubeh}”(h]”Œ:does-kunit-support-running-on-architectures-other-than-uml”ah ]”h"]”Œ;does kunit support running on architectures other than uml?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒDWhat is the difference between a unit test and other kinds of tests?”h]”hŒDWhat is the difference between a unit test and other kinds of tests?”…””}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj@h²hh³hÇh´K/ubhï)”}”(hŒlMost existing tests for the Linux kernel would be categorized as an integration test, or an end-to-end test.”h]”hŒlMost existing tests for the Linux kernel would be categorized as an integration test, or an end-to-end test.”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K0hj@h²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hX\A unit test is supposed to test a single unit of code in isolation. A unit test should be the finest granularity of testing and, as such, allows all possible code paths to be tested in the code under test. This is only possible if the code under test is small and does not have any external dependencies outside of the test's control like hardware.”h]”hï)”}”(hX\A unit test is supposed to test a single unit of code in isolation. A unit test should be the finest granularity of testing and, as such, allows all possible code paths to be tested in the code under test. This is only possible if the code under test is small and does not have any external dependencies outside of the test's control like hardware.”h]”hX^A unit test is supposed to test a single unit of code in isolation. A unit test should be the finest granularity of testing and, as such, allows all possible code paths to be tested in the code under test. This is only possible if the code under test is small and does not have any external dependencies outside of the test’s control like hardware.”…””}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K3hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjah²hh³hÇh´Nubje)”}”(hXÒAn integration test tests the interaction between a minimal set of components, usually just two or three. For example, someone might write an integration test to test the interaction between a driver and a piece of hardware, or to test the interaction between the userspace libraries the kernel provides and the kernel itself. However, one of these tests would probably not test the entire kernel along with hardware interactions and interactions with the userspace.”h]”hï)”}”(hXÒAn integration test tests the interaction between a minimal set of components, usually just two or three. For example, someone might write an integration test to test the interaction between a driver and a piece of hardware, or to test the interaction between the userspace libraries the kernel provides and the kernel itself. However, one of these tests would probably not test the entire kernel along with hardware interactions and interactions with the userspace.”h]”hXÒAn integration test tests the interaction between a minimal set of components, usually just two or three. For example, someone might write an integration test to test the interaction between a driver and a piece of hardware, or to test the interaction between the userspace libraries the kernel provides and the kernel itself. However, one of these tests would probably not test the entire kernel along with hardware interactions and interactions with the userspace.”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K8hj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjah²hh³hÇh´Nubje)”}”(hX…An end-to-end test usually tests the entire system from the perspective of the code under test. For example, someone might write an end-to-end test for the kernel by installing a production configuration of the kernel on production hardware with a production userspace and then trying to exercise some behavior that depends on interactions between the hardware, the kernel, and userspace. ”h]”hï)”}”(hX„An end-to-end test usually tests the entire system from the perspective of the code under test. For example, someone might write an end-to-end test for the kernel by installing a production configuration of the kernel on production hardware with a production userspace and then trying to exercise some behavior that depends on interactions between the hardware, the kernel, and userspace.”h]”hX„An end-to-end test usually tests the entire system from the perspective of the code under test. For example, someone might write an end-to-end test for the kernel by installing a production configuration of the kernel on production hardware with a production userspace and then trying to exercise some behavior that depends on interactions between the hardware, the kernel, and userspace.”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K?hj–ubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjah²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j_h³hÇh´K3hj@h²hubeh}”(h]”(ŒCwhat-is-the-difference-between-a-unit-test-and-other-kinds-of-tests”j7eh ]”h"]”(ŒDwhat is the difference between a unit test and other kinds of tests?”Œkinds-of-tests”eh$]”h&]”uh1hÈhhÊh²hh³hÇh´K/Œexpect_referenced_by_name”}”j¼j,sŒexpect_referenced_by_id”}”j7j,subhÉ)”}”(hhh]”(hÎ)”}”(hŒ'KUnit is not working, what should I do?”h]”hŒ'KUnit is not working, what should I do?”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÃh²hh³hÇh´KFubhï)”}”(hŒ]Unfortunately, there are a number of things which can break, but here are some things to try.”h]”hŒ]Unfortunately, there are a number of things which can break, but here are some things to try.”…””}”(hjÔh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KHhjÃh²hubhŒenumerated_list”“”)”}”(hhh]”(je)”}”(hŒšRun ``./tools/testing/kunit/kunit.py run`` with the ``--raw_output`` parameter. This might show details or error messages hidden by the kunit_tool parser.”h]”hï)”}”(hŒšRun ``./tools/testing/kunit/kunit.py run`` with the ``--raw_output`` parameter. This might show details or error messages hidden by the kunit_tool parser.”h]”(hŒRun ”…””}”(hjëh²hh³Nh´Nubj†)”}”(hŒ&``./tools/testing/kunit/kunit.py run``”h]”hŒ"./tools/testing/kunit/kunit.py run”…””}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjëubhŒ with the ”…””}”(hjëh²hh³Nh´Nubj†)”}”(hŒ``--raw_output``”h]”hŒ --raw_output”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjëubhŒV parameter. This might show details or error messages hidden by the kunit_tool parser.”…””}”(hjëh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KKhjçubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hX(Instead of running ``kunit.py run``, try running ``kunit.py config``, ``kunit.py build``, and ``kunit.py exec`` independently. This can help track down where an issue is occurring. (If you think the parser is at fault, you can run it manually against ``stdin`` or a file with ``kunit.py parse``.)”h]”hï)”}”(hX(Instead of running ``kunit.py run``, try running ``kunit.py config``, ``kunit.py build``, and ``kunit.py exec`` independently. This can help track down where an issue is occurring. (If you think the parser is at fault, you can run it manually against ``stdin`` or a file with ``kunit.py parse``.)”h]”(hŒInstead of running ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ``kunit.py run``”h]”hŒ kunit.py run”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒ, try running ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ``kunit.py config``”h]”hŒkunit.py config”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒ, ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ``kunit.py build``”h]”hŒkunit.py build”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒ, and ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ``kunit.py exec``”h]”hŒ kunit.py exec”…””}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒŒ independently. This can help track down where an issue is occurring. (If you think the parser is at fault, you can run it manually against ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ ``stdin``”h]”hŒstdin”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒ or a file with ”…””}”(hj'h²hh³Nh´Nubj†)”}”(hŒ``kunit.py parse``”h]”hŒkunit.py parse”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj'ubhŒ.)”…””}”(hj'h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KNhj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hX<Running the UML kernel directly can often reveal issues or error messages, ``kunit_tool`` ignores. This should be as simple as runningi the ``vmlinux`` binary in the output directory (by default ``./.kunit/vmlinux``) after building the UML kernel (for example, by using ``kunit.py build``). Note that UML has some unusual requirements (such as the host having a tmpfs filesystem mounted), and has had issues in the past when built statically and the host has KASLR enabled. (On older host kernels, you may need to run ``setarch `uname -m` -R ./vmlinux`` to disable KASLR.)”h]”hï)”}”(hX<Running the UML kernel directly can often reveal issues or error messages, ``kunit_tool`` ignores. This should be as simple as runningi the ``vmlinux`` binary in the output directory (by default ``./.kunit/vmlinux``) after building the UML kernel (for example, by using ``kunit.py build``). Note that UML has some unusual requirements (such as the host having a tmpfs filesystem mounted), and has had issues in the past when built statically and the host has KASLR enabled. (On older host kernels, you may need to run ``setarch `uname -m` -R ./vmlinux`` to disable KASLR.)”h]”(hŒKRunning the UML kernel directly can often reveal issues or error messages, ”…””}”(hj«h²hh³Nh´Nubj†)”}”(hŒ``kunit_tool``”h]”hŒ kunit_tool”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj«ubhŒ3 ignores. This should be as simple as runningi the ”…””}”(hj«h²hh³Nh´Nubj†)”}”(hŒ ``vmlinux``”h]”hŒvmlinux”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj«ubhŒ, binary in the output directory (by default ”…””}”(hj«h²hh³Nh´Nubj†)”}”(hŒ``./.kunit/vmlinux``”h]”hŒ./.kunit/vmlinux”…””}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj«ubhŒ7) after building the UML kernel (for example, by using ”…””}”(hj«h²hh³Nh´Nubj†)”}”(hŒ``kunit.py build``”h]”hŒkunit.py build”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj«ubhŒæ). Note that UML has some unusual requirements (such as the host having a tmpfs filesystem mounted), and has had issues in the past when built statically and the host has KASLR enabled. (On older host kernels, you may need to run ”…””}”(hj«h²hh³Nh´Nubj†)”}”(hŒ#``setarch `uname -m` -R ./vmlinux``”h]”hŒsetarch `uname -m` -R ./vmlinux”…””}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj«ubhŒ to disable KASLR.)”…””}”(hj«h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KRhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hŒŽTry running KUnit on a different architecture by using the ``--arch`` option. On an x86_64 host, using ``--arch=x86_64`` is a good first step.”h]”hï)”}”(hŒŽTry running KUnit on a different architecture by using the ``--arch`` option. On an x86_64 host, using ``--arch=x86_64`` is a good first step.”h]”(hŒ;Try running KUnit on a different architecture by using the ”…””}”(hjh²hh³Nh´Nubj†)”}”(hŒ ``--arch``”h]”hŒ--arch”…””}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjubhŒ" option. On an x86_64 host, using ”…””}”(hjh²hh³Nh´Nubj†)”}”(hŒ``--arch=x86_64``”h]”hŒ --arch=x86_64”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjubhŒ is a good first step.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KZhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hX}Make sure the kernel .config has ``CONFIG_KUNIT=y`` and at least one test (e.g. ``CONFIG_KUNIT_EXAMPLE_TEST=y``). kunit_tool will keep its .config around, so you can see what config was used after running ``kunit.py run``. It also preserves any config changes you might make, so you can enable/disable things with ``make ARCH=um menuconfig`` or similar, and then re-run kunit_tool.”h]”hï)”}”(hX}Make sure the kernel .config has ``CONFIG_KUNIT=y`` and at least one test (e.g. ``CONFIG_KUNIT_EXAMPLE_TEST=y``). kunit_tool will keep its .config around, so you can see what config was used after running ``kunit.py run``. It also preserves any config changes you might make, so you can enable/disable things with ``make ARCH=um menuconfig`` or similar, and then re-run kunit_tool.”h]”(hŒ!Make sure the kernel .config has ”…””}”(hjYh²hh³Nh´Nubj†)”}”(hŒ``CONFIG_KUNIT=y``”h]”hŒCONFIG_KUNIT=y”…””}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjYubhŒ and at least one test (e.g. ”…””}”(hjYh²hh³Nh´Nubj†)”}”(hŒ``CONFIG_KUNIT_EXAMPLE_TEST=y``”h]”hŒCONFIG_KUNIT_EXAMPLE_TEST=y”…””}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjYubhŒ^). kunit_tool will keep its .config around, so you can see what config was used after running ”…””}”(hjYh²hh³Nh´Nubj†)”}”(hŒ``kunit.py run``”h]”hŒ kunit.py run”…””}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjYubhŒ]. It also preserves any config changes you might make, so you can enable/disable things with ”…””}”(hjYh²hh³Nh´Nubj†)”}”(hŒ``make ARCH=um menuconfig``”h]”hŒmake ARCH=um menuconfig”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjYubhŒ( or similar, and then re-run kunit_tool.”…””}”(hjYh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K\hjUubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hŒ˜Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This may help clean up any residual config items which could be causing problems.”h]”hï)”}”(hŒ˜Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This may help clean up any residual config items which could be causing problems.”h]”(hŒ Try to run ”…””}”(hj¹h²hh³Nh´Nubj†)”}”(hŒ``make ARCH=um defconfig``”h]”hŒmake ARCH=um defconfig”…””}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj¹ubhŒ before running ”…””}”(hj¹h²hh³Nh´Nubj†)”}”(hŒ``kunit.py run``”h]”hŒ kunit.py run”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hj¹ubhŒS. This may help clean up any residual config items which could be causing problems.”…””}”(hj¹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kbhjµubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubje)”}”(hXãFinally, try running KUnit manually, instead of via ``kunit.py``. KUnit can be built into any kernel, or can be built as a module and loaded at runtime. When tests are built-in, they will execute when the kernel boots, and modules will automatically execute associated tests when loaded. Test results can be collected from ``/sys/kernel/debug/kunit//results``, and can be parsed with ``kunit.py parse``. For more details, see Documentation/dev-tools/kunit/run_manual.rst ”h]”hï)”}”(hXâFinally, try running KUnit manually, instead of via ``kunit.py``. KUnit can be built into any kernel, or can be built as a module and loaded at runtime. When tests are built-in, they will execute when the kernel boots, and modules will automatically execute associated tests when loaded. Test results can be collected from ``/sys/kernel/debug/kunit//results``, and can be parsed with ``kunit.py parse``. For more details, see Documentation/dev-tools/kunit/run_manual.rst”h]”(hŒ4Finally, try running KUnit manually, instead of via ”…””}”(hjõh²hh³Nh´Nubj†)”}”(hŒ ``kunit.py``”h]”hŒkunit.py”…””}”(hjýh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjõubhX. KUnit can be built into any kernel, or can be built as a module and loaded at runtime. When tests are built-in, they will execute when the kernel boots, and modules will automatically execute associated tests when loaded. Test results can be collected from ”…””}”(hjõh²hh³Nh´Nubj†)”}”(hŒ0``/sys/kernel/debug/kunit//results``”h]”hŒ,/sys/kernel/debug/kunit//results”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjõubhŒ, and can be parsed with ”…””}”(hjõh²hh³Nh´Nubj†)”}”(hŒ``kunit.py parse``”h]”hŒkunit.py parse”…””}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j…hjõubhŒD. For more details, see Documentation/dev-tools/kunit/run_manual.rst”…””}”(hjõh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kdhjñubah}”(h]”h ]”h"]”h$]”h&]”uh1jdhjäh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jâhjÃh²hh³hÇh´KKubhï)”}”(hŒkIf none of the above tricks help, you are always welcome to email any issues to kunit-dev@googlegroups.com.”h]”(hŒPIf none of the above tricks help, you are always welcome to email any issues to ”…””}”(hjJh²hh³Nh´Nubj)”}”(hŒkunit-dev@googlegroups.com”h]”hŒkunit-dev@googlegroups.com”…””}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œ!mailto:kunit-dev@googlegroups.com”uh1jhjJubhŒ.”…””}”(hjJh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KlhjÃh²hubeh}”(h]”Œ%kunit-is-not-working-what-should-i-do”ah ]”h"]”Œ'kunit is not working, what should i do?”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KFubeh}”(h]”Œfrequently-asked-questions”ah ]”h"]”Œfrequently asked questions”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”}”j7]”j,asŒnameids”}”(jyjvj[jXj%j"j=j:j¼j7j»j¸jqjnuŒ nametypes”}”(jy‰j[‰j%ˆj=‰j¼ˆj»‰jq‰uh}”(jvhÊjXhÝj"jj:j^j7j@j¸j@jnjÃ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Œ4Hyperlink target "kinds-of-tests" is not referenced.”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”uh1hîhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”K,uh1jubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.