Lines Matching +full:qemu +full:- +full:x86_64

1 .. SPDX-License-Identifier: GPL-2.0
9 manually, see: Documentation/dev-tools/kunit/run_manual.rst.
17 .. code-block::
23 .. code-block::
31 .. code-block::
33 ./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`
35 - ``--timeout`` sets a maximum amount of time for tests to run.
36 - ``--jobs`` sets the number of threads to build the kernel.
45 tests we want to run independently, or if we want to use pre-defined
51 .. code-block::
53 ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig
55 To view kunit_tool flags (optional command-line arguments), run:
57 .. code-block::
59 ./tools/testing/kunit/kunit.py run --help
78 .. code-block::
85 .. code-block::
109 .. code-block::
116 .. code-block::
120 If we already have built UML kernel with built-in KUnit tests, we
124 .. code-block::
137 ``--raw_output`` argument:
139 .. code-block::
141 ./tools/testing/kunit/kunit.py run --raw_output
144 print the human-readable summary with the ``parse`` command for
148 .. code-block:: bash
162 .. code-block::
164 ./tools/testing/kunit/kunit.py run 'kunit-resource*'
168 .. _kunit-on-qemu:
170 Running tests on QEMU
173 kunit_tool supports running tests on qemu as well as
174 via UML. To run tests on qemu, by default it requires two flags:
176 - ``--arch``: Selects a configs collection (Kconfig, qemu config options
181 ``--qemu_config`` to handle it. If ``um`` is passed (or this flag
182 is ignored), the tests will run via UML. Non-UML architectures,
183 for example: i386, x86_64, arm and so on; run on qemu.
185 - ``--cross_compile``: Specifies the Kbuild toolchain. It passes the
190 - ``sparc64-linux-gnu`` if we have the sparc toolchain installed on
193 - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux``
194 if we have downloaded the microblaze toolchain from the 0-day
197 This means that for most architectures, running under qemu is as simple as:
199 .. code-block:: bash
201 ./tools/testing/kunit/kunit.py run --arch=x86_64
203 When cross-compiling, we'll likely need to specify a different toolchain, for
206 .. code-block:: bash
209 --arch=s390 \
210 --cross_compile=s390x-linux-gnu-
213 the ``--arch`` flag, or want to run KUnit tests on qemu using a
214 non-default configuration; then we can write our own``QemuConfig``.
219 ``tools/testing/kunit/qemu_configs/x86_64.py``.
222 using the ``--qemu_config`` flag. When used, this flag replaces the
223 ``--arch`` flag. For example: using
224 ``tools/testing/kunit/qemu_configs/x86_64.py``, the invocation appear
227 .. code-block:: bash
230 --timeout=60 \
231 --jobs=12 \
232 --qemu_config=./tools/testing/kunit/qemu_configs/x86_64.py
234 Running command-line arguments
237 kunit_tool has a number of other command-line arguments which can
241 - ``--help``: Lists all available options. To list common options,
242 place ``--help`` before the command. To list options specific to that
243 command, place ``--help`` after the command.
247 - ``--build_dir``: Specifies kunit_tool build directory. It includes
250 - ``--make_options``: Specifies additional options to pass to make, when
252 to enable compiler warnings, we can pass ``--make_options W=1``.
254 - ``--alltests``: Enable a predefined set of options in order to build
264 - ``--kunitconfig``: Specifies the path or the directory of the ``.kunitconfig``
267 - ``lib/kunit/.kunitconfig`` can be the path of the file.
269 - ``lib/kunit`` can be the directory in which the file is located.
274 - ``--kconfig_add``: Specifies additional configuration options to be
277 .. code-block::
279 ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_KASAN=y
281 - ``--arch``: Runs tests on the specified architecture. The architecture
283 For example, i386, x86_64, arm, um, etc. Non-UML architectures run on qemu.
286 - ``--cross_compile``: Specifies the Kbuild toolchain. It passes the
291 - ``sparc64-linux-gnu-`` if we have the sparc toolchain installed on
294 - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux``
295 if we have downloaded the microblaze toolchain from the 0-day
298 - ``--qemu_config``: Specifies the path to a file containing a
299 custom qemu architecture definition. This should be a python file
302 - ``--qemu_args``: Specifies additional qemu arguments, for example, ``-smp 8``.
304 - ``--jobs``: Specifies the number of jobs (commands) to run simultaneously.
307 - ``--timeout``: Specifies the maximum number of seconds allowed for all tests to run.
310 - ``--kernel_args``: Specifies additional kernel command-line arguments. May be repeated.
312 - ``--run_isolated``: If set, boots the kernel for each individual suite/test.
313 This is useful for debugging a non-hermetic test, one that
316 - ``--raw_output``: If set, generates unformatted output from kernel. Possible options are:
318 - ``all``: To view the full kernel output, use ``--raw_output=all``.
320- ``kunit``: This is the default option and filters to KUnit output. Use ``--raw_output`` or ``--r…
322 - ``--json``: If set, stores the test results in a JSON format and prints to `stdout` or
325 - ``--filter``: Specifies filters on test attributes, for example, ``speed!=slow``.
327 by commas. Example: ``--filter "speed>slow, module=example"``.
329 - ``--filter_action``: If set to ``skip``, filtered tests will be shown as skipped
332 - ``--list_tests``: If set, lists all tests that will be run.
334 - ``--list_tests_attr``: If set, lists all tests that will be run and all of their