History

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.

Steven Rostedt committed 14 years ago

Commit 8bc5e4e1 parent 6f0c0581 file · +4 −2Browse files

Unified · Split

tools/testing/ktest/ktest.pl+4−2
@@ -1740,8 +1740,10 @@ sub install { · 1739 unmodified lines
1740 open(IN, "$output_config") or dodie("Can't read config file");1740 open(IN, "$output_config") or dodie("Can't read config file");
1741 while (<IN>) {1741 while (<IN>) {
1742 if (/CONFIG_MODULES(=y)?/) {1742 if (/CONFIG_MODULES(=y)?/) {
1743 $install_mods = 1 if (defined($1));1743 if (defined($1)) {
1744 last;1744 $install_mods = 1;
1745 last;
1746 }
1745 }1747 }
1746 }1748 }
1747 close(IN);1749 close(IN);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t