aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-06-13 11:09:22 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-06-13 11:09:22 -0400
commitdb05cfefce6e6120267974345599760b1d653439 (patch)
tree35e7229da79a4108e9aecd54b2d7e7b1b2c18172 /tools
parent23715c3c9a31dd34c8c2f27086a9562e35da423b (diff)
ktest: Allow initrd processing without modules defined
When a config is set with CONFIG_MODULES=n, it does not mean that the kernel does not need an initrd to boot. For systems that depend on LVM and such, an initrd must run first. If POST_INSTALL is defined, then run the post install regardless if modules are needed or not. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/ktest/ktest.pl18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 83dcfaf0cac4..fb46e12eb1d7 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1031,6 +1031,16 @@ sub monitor {
1031 return 1; 1031 return 1;
1032} 1032}
1033 1033
1034sub do_post_install {
1035
1036 return if (!defined($post_install));
1037
1038 my $cp_post_install = $post_install;
1039 $cp_post_install =~ s/\$KERNEL_VERSION/$version/g;
1040 run_command "$cp_post_install" or
1041 dodie "Failed to run post install";
1042}
1043
1034sub install { 1044sub install {
1035 1045
1036 run_scp "$outputdir/$build_target", "$target_image" or 1046 run_scp "$outputdir/$build_target", "$target_image" or
@@ -1050,6 +1060,7 @@ sub install {
1050 close(IN); 1060 close(IN);
1051 1061
1052 if (!$install_mods) { 1062 if (!$install_mods) {
1063 do_post_install;
1053 doprint "No modules needed\n"; 1064 doprint "No modules needed\n";
1054 return; 1065 return;
1055 } 1066 }
@@ -1077,12 +1088,7 @@ sub install {
1077 1088
1078 run_ssh "rm -f /tmp/$modtar"; 1089 run_ssh "rm -f /tmp/$modtar";
1079 1090
1080 return if (!defined($post_install)); 1091 do_post_install;
1081
1082 my $cp_post_install = $post_install;
1083 $cp_post_install =~ s/\$KERNEL_VERSION/$version/g;
1084 run_command "$cp_post_install" or
1085 dodie "Failed to run post install";
1086} 1092}
1087 1093
1088sub check_buildlog { 1094sub check_buildlog {