Documentation: kunit: update kconfig options needed for UML coverage
authorDaniel Latypov <dlatypov@google.com>
Sat, 26 Mar 2022 00:33:56 +0000 (17:33 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 4 Apr 2022 22:42:38 +0000 (16:42 -0600)
Recent changes have made it so the current set is not sufficient.
Namely, CONFIG_DEBUG_INFO is not being set even when explicitly asked.

Specifying a version of the debug info fixes this.
Pick CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT as an option that's
hopefully less fragile (esp. given we're tied to GCC 6 and lower).

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Tested-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Documentation/dev-tools/kunit/running_tips.rst

index 7b6d26a25959507f31b82e57451678d40af5c8f8..c36f6760087d5be1eb9c258b8d58e2f7a8dfbc02 100644 (file)
@@ -114,6 +114,7 @@ Instead of enabling ``CONFIG_GCOV_KERNEL=y``, we can set these options:
 
        CONFIG_DEBUG_KERNEL=y
        CONFIG_DEBUG_INFO=y
+       CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
        CONFIG_GCOV=y
 
 
@@ -122,7 +123,7 @@ Putting it together into a copy-pastable sequence of commands:
 .. code-block:: bash
 
        # Append coverage options to the current config
-       $ echo -e "CONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_INFO=y\nCONFIG_GCOV=y" >> .kunit/.kunitconfig
+       $ echo -e "CONFIG_DEBUG_KERNEL=y\nCONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y\nCONFIG_GCOV=y" >> .kunit/.kunitconfig
        $ ./tools/testing/kunit/kunit.py run
        # Extract the coverage information from the build dir (.kunit/)
        $ lcov -t "my_kunit_tests" -o coverage.info -c -d .kunit/