Add tip sections to the usage page Add a tip on how to use kunit_tool, and another tip on how to build the kernel. Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Change-Id: I03bf82013670f54cc88dfa34227f4cfe4ebf939d
diff --git a/usage/index.rst b/usage/index.rst index 9a4aea7..e7ec80b 100644 --- a/usage/index.rst +++ b/usage/index.rst
@@ -27,11 +27,44 @@ Once you have the ``kunitconfig`` file, just run: -``$ ./tools/testing/kunit/kunit.py run`` +.. code-block:: bash + + ./tools/testing/kunit/kunit.py run + +.. tip:: + + You may want to run KUnit with flags like: + + .. code-block:: bash + + ./tools/testing/kunit/kunit.py run --timeout=30 --jobs=24 --defconfig + + - ``--timeout`` sets a maximum amount of time to allow tests to run. + - ``--jobs`` sets the number of threads to use to build the kernel. + - ``--defconfig`` uses an default kunitconfig in the kernel source. + + For more information on these and other flags, try running: + + .. code-block:: bash + + ./tools/testing/kunit/kunit.py run --help This will build a UML (User Mode Linux) kernel, run the specified tests, and print the results (nicely formatted) to the screen. +.. tip:: + + If you get the error message: ``/bin/sh: flex: command not found`` or + similarly ``/bin/sh: bison: command not found``, you are most likely missing + the flex and bison packages. On a system using the apt package manager you + can install them with + + .. code-block:: bash + + sudo apt-get install flex bison + + For more information on building the kernel, see + https://www.kernel.org/doc/html/latest/process/changes.html Writing tests =============