@@ -233,7 +233,7 @@ Command-Line Arguments
233233======================
234234
235235kunit_tool has a number of other command-line arguments which can
236- be useful for our test environment. Below the most commonly used
236+ be useful for our test environment. Below are the most commonly used
237237command line arguments:
238238
239239- ``--help ``: Lists all available options. To list common options,
@@ -257,3 +257,64 @@ command line arguments:
257257 added or modified. Instead, enable all tests
258258 which have satisfied dependencies by adding
259259 ``CONFIG_KUNIT_ALL_TESTS=y `` to your ``.kunitconfig ``.
260+
261+ - ``--kunitconfig ``: Specifies the path or the directory of the ``.kunitconfig ``
262+ file. For example:
263+
264+ - ``lib/kunit/.kunitconfig `` can be the path of the file.
265+
266+ - ``lib/kunit `` can be the directory in which the file is located.
267+
268+ This file is used to build and run with a predefined set of tests
269+ and their dependencies. For example, to run tests for a given subsystem.
270+
271+ - ``--kconfig_add ``: Specifies additional configuration options to be
272+ appended to the ``.kunitconfig `` file. For example:
273+
274+ .. code-block ::
275+
276+ ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_KASAN=y
277+
278+ - ``--arch ``: Runs tests on the specified architecture. The architecture
279+ argument is same as the Kbuild ARCH environment variable.
280+ For example, i386, x86_64, arm, um, etc. Non-UML architectures run on qemu.
281+ Default is `um `.
282+
283+ - ``--cross_compile ``: Specifies the Kbuild toolchain. It passes the
284+ same argument as passed to the ``CROSS_COMPILE `` variable used by
285+ Kbuild. This will be the prefix for the toolchain
286+ binaries such as GCC. For example:
287+
288+ - ``sparc64-linux-gnu- `` if we have the sparc toolchain installed on
289+ our system.
290+
291+ - ``$HOME/toolchains/microblaze/gcc-9.2.0-nolibc/microblaze-linux/bin/microblaze-linux ``
292+ if we have downloaded the microblaze toolchain from the 0-day
293+ website to a specified path in our home directory called toolchains.
294+
295+ - ``--qemu_config ``: Specifies the path to a file containing a
296+ custom qemu architecture definition. This should be a python file
297+ containing a `QemuArchParams ` object.
298+
299+ - ``--qemu_args ``: Specifies additional qemu arguments, for example, ``-smp 8 ``.
300+
301+ - ``--jobs ``: Specifies the number of jobs (commands) to run simultaneously.
302+ By default, this is set to the number of cores on your system.
303+
304+ - ``--timeout ``: Specifies the maximum number of seconds allowed for all tests to run.
305+ This does not include the time taken to build the tests.
306+
307+ - ``--kernel_args ``: Specifies additional kernel command-line arguments. May be repeated.
308+
309+ - ``--run_isolated ``: If set, boots the kernel for each individual suite/test.
310+ This is useful for debugging a non-hermetic test, one that
311+ might pass/fail based on what ran before it.
312+
313+ - ``--raw_output ``: If set, generates unformatted output from kernel. Possible options are:
314+
315+ - ``all ``: To view the full kernel output, use ``--raw_output=all ``.
316+
317+ - ``kunit ``: This is the default option and filters to KUnit output. Use ``--raw_output `` or ``--raw_output=kunit ``.
318+
319+ - ``--json ``: If set, stores the test results in a JSON format and prints to `stdout ` or
320+ saves to a file if a filename is specified.
0 commit comments