linux/Documentation/dev-tools
Daniel Latypov 4c2911f1e1 kunit: tool: reconfigure when the used kunitconfig changes
Problem: currently, if you remove something from your kunitconfig,
kunit.py will not regenerate the .config file.
The same thing happens if you did --kunitconfig_add=CONFIG_KASAN=y [1]
and then ran again without it. Your new run will still have KASAN.

The reason is that kunit.py won't regenerate the .config file if it's a
superset of the kunitconfig. This speeds it up a bit for iterating.

This patch adds an additional check that forces kunit.py to regenerate
the .config file if the current kunitconfig doesn't match the previous
one.

What this means:
* deleting entries from .kunitconfig works as one would expect
* dropping  a --kunitconfig_add also triggers a rebuild
* you can still edit .config directly to turn on new options

We implement this by creating a `last_used_kunitconfig` file in the
build directory (so .kunit, by default) after we generate the .config.
When comparing the kconfigs, we compare python sets, so duplicates and
permutations don't trip us up.

The majority of this patch is adding unit tests for the existing logic
and for the new case where `last_used_kunitconfig` differs.

[1] https://lore.kernel.org/linux-kselftest/20211106013058.2621799-2-dlatypov@google.com/

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-12-13 13:59:03 -07:00
..
kunit kunit: tool: reconfigure when the used kunitconfig changes 2021-12-13 13:59:03 -07:00
checkpatch.rst Revert "docs: checkpatch: add UNNECESSARY/UNSPECIFIED_INT and UNNECESSARY_ELSE" 2021-10-04 17:13:53 -06:00
coccinelle.rst Documentation: Coccinelle: Improve command example for debugging patches 2020-12-03 15:45:18 -07:00
gcov.rst docs/gcov: Convert two tags to ref in dev-tools/gov.rst 2021-04-08 11:19:43 -06:00
gdb-kernel-debugging.rst scripts/gdb: add lx_current support for arm64 2021-05-07 00:26:33 -07:00
index.rst Documentation: dev-tools: Add Testing Overview 2021-04-15 14:53:02 -06:00
kasan.rst kasan: Extend KASAN mode kernel parameter 2021-10-07 09:30:24 +01:00
kcov.rst Documentation/kcov: define `ip' in the example 2021-11-09 10:02:52 -08:00
kcsan.rst kcsan: Rework atomic.h into permissive.h 2021-07-20 13:49:43 -07:00
kfence.rst kfence: default to dynamic branch instead of static keys mode 2021-11-06 13:30:43 -07:00
kgdb.rst Documentation: kgdb: Fix a typo 2020-11-18 13:47:17 -07:00
kmemleak.rst mm,kmemleak-test.c: move kmemleak-test.c to samples dir 2020-10-13 18:38:27 -07:00
kselftest.rst Documentation: kselftest: fix path to test module files 2021-04-02 16:17:18 -06:00
sparse.rst doc: add link to sparse's home page/internal docs 2020-07-05 14:32:56 -06:00
testing-overview.rst docs: dev-tools: testing-overview.rst: avoid using ReST :doc:foo markup 2021-06-17 13:24:37 -06:00
ubsan.rst ubsan: remove UBSAN_MISC in favor of individual options 2020-12-15 22:46:19 -08:00