]> git.baikalelectronics.ru Git - kernel.git/commit
kunit: tool: simplify kconfig is_subset_of() logic
authorDaniel Latypov <dlatypov@google.com>
Tue, 8 Dec 2020 23:21:02 +0000 (15:21 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 8 Feb 2021 22:38:55 +0000 (15:38 -0700)
commita917f0c6c9fe9a543a76f1303f88d653483525e7
treea5ce80efff581ab42471ef7b44da91896f97f557
parent24323d09971c359fa607b5d8f7825d70e2cf6dbd
kunit: tool: simplify kconfig is_subset_of() logic

Don't use an O(nm) algorithm* and make it more readable by using a dict.

*Most obviously, it does a nested for-loop over the entire other config.
A bit more subtle, it calls .entries(), which constructs a set from the
list for _every_ outer iteration.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Acked-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_config.py