summaryrefslogtreecommitdiff
path: root/tools/testing/ktest
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2012-10-26 00:10:32 -0400
committerSteven Rostedt <rostedt@goodmis.org>2012-10-26 00:10:32 -0400
commit8bc5e4ea3ea0e24142db2dc941233eab2a223ed4 (patch)
treea6fd095bed6139aa9e6076fbf55444ee960728cc /tools/testing/ktest
parent6f0c0580b70c89094b3422ba81118c7b959c7556 (diff)
downloadkernel-common-8bc5e4ea3ea0e24142db2dc941233eab2a223ed4.tar.gz
kernel-common-8bc5e4ea3ea0e24142db2dc941233eab2a223ed4.tar.bz2
kernel-common-8bc5e4ea3ea0e24142db2dc941233eab2a223ed4.zip
ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA
In order to decide if ktest should bother installing modules on the target box, it checks if the config file has CONFIG_MODULES=y. But it also checks if the '=y' part exists. It only will install modules if the config exists and is set with '=y'. But as the regex that was used tests: /^CONFIG_MODULES(=y)?/ this will also match: CONFIG_MODULES_USE_ELF_RELA as the '=y' part was optional and it did not test the rest of the line. When this happens, ktest will stop checking the rest of the configs but it will also think that no modules are needed to be installed. What it should do is only jump out of the loop if it actually found a CONFIG_MODULES that is set to true. Otherwise, ktest wont install the necessary modules needed for proper booting of the test target. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index b51d787176d3..c7ba7614061b 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1740,8 +1740,10 @@ sub install {
open(IN, "$output_config") or dodie("Can't read config file");
while (<IN>) {
if (/CONFIG_MODULES(=y)?/) {
- $install_mods = 1 if (defined($1));
- last;
+ if (defined($1)) {
+ $install_mods = 1;
+ last;
+ }
}
}
close(IN);