summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2022-12-02 11:59:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-07 12:07:35 +0100
commit2d308bd0ba32942aead0b67474e40b89a23150cf (patch)
tree40b79648d17520a67cc54d26334dee5c9d969d72
parentfca7a1c33c4f7747a13806725d4b244b982c3d61 (diff)
downloadlinux-stable-2d308bd0ba32942aead0b67474e40b89a23150cf.tar.gz
linux-stable-2d308bd0ba32942aead0b67474e40b89a23150cf.tar.bz2
linux-stable-2d308bd0ba32942aead0b67474e40b89a23150cf.zip
ktest.pl minconfig: Unset configs instead of just removing them
commit ef784eebb56425eed6e9b16e7d47e5c00dcf9c38 upstream. After a full run of a make_min_config test, I noticed there were a lot of CONFIGs still enabled that really should not be. Looking at them, I noticed they were all defined as "default y". The issue is that the test simple removes the config and re-runs make oldconfig, which enables it again because it is set to default 'y'. Instead, explicitly disable the config with writing "# CONFIG_FOO is not set" to the file to keep it from being set again. With this change, one of my box's minconfigs went from 768 configs set, down to 521 configs set. Link: https://lkml.kernel.org/r/20221202115936.016fce23@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 0a05c769a9de5 ("ktest: Added config_bisect test type") Reviewed-by: John 'Warthog9' Hawley (VMware) <warthog9@eaglescrag.net> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xtools/testing/ktest/ktest.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 223d88e25e05..74b4455c8839 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -3751,9 +3751,10 @@ sub test_this_config {
# .config to make sure it is missing the config that
# we had before
my %configs = %min_configs;
- delete $configs{$config};
+ $configs{$config} = "# $config is not set";
make_new_config ((values %configs), (values %keep_configs));
make_oldconfig;
+ delete $configs{$config};
undef %configs;
assign_configs \%configs, $output_config;