From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 03/10] ktest: Add PRE_INSTALL option
Date: Mon, 30 Jul 2012 15:23:17 -0400 [thread overview]
Message-ID: <20120730192656.207135407@goodmis.org> (raw)
In-Reply-To: 20120730192314.144253843@goodmis.org
[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
Add the PRE_INSTALL option that will allow a user to specify a shell
command to be executed before the install operation executes.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 8 ++++++++
tools/testing/ktest/sample.conf | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 31b9416..e91702e 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -106,6 +106,7 @@ my $grub_menu;
my $grub_number;
my $target;
my $make;
+my $pre_install;
my $post_install;
my $no_install;
my $noclean;
@@ -225,6 +226,7 @@ my %option_map = (
"ADD_CONFIG" => \$addconfig,
"REBOOT_TYPE" => \$reboot_type,
"GRUB_MENU" => \$grub_menu,
+ "PRE_INSTALL" => \$pre_install,
"POST_INSTALL" => \$post_install,
"NO_INSTALL" => \$no_install,
"REBOOT_SCRIPT" => \$reboot_script,
@@ -1669,6 +1671,12 @@ sub install {
return if ($no_install);
+ if (defined($pre_install)) {
+ my $cp_pre_install = eval_kernel_version $pre_install;
+ run_command "$cp_pre_install" or
+ dodie "Failed to run pre install";
+ }
+
my $cp_target = eval_kernel_version $target_image;
run_scp_install "$outputdir/$build_target", "$cp_target" or
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 4472452..19754e0 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -426,6 +426,14 @@
# (default "")
#BUILD_OPTIONS = -j20
+# If you need to do some special handling before installing
+# you can add a script with this option.
+# The environment variable KERNEL_VERSION will be set to the
+# kernel version that is used.
+#
+# default (undefined)
+#PRE_INSTALL = ssh user@target rm -rf '/lib/modules/*-test*'
+
# If you need an initrd, you can add a script or code here to install
# it. The environment variable KERNEL_VERSION will be set to the
# kernel version that is used. Remember to add the initrd line
--
1.7.10.4
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-07-30 19:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-30 19:23 [PATCH 00/10] [GIT PULL] ktest: changes for v3.6 Steven Rostedt
2012-07-30 19:23 ` [PATCH 01/10] ktest: Remove commented exit Steven Rostedt
2012-07-30 19:23 ` [PATCH 02/10] ktest: Add PRE/POST_KTEST and TEST options Steven Rostedt
2012-07-30 19:23 ` Steven Rostedt [this message]
2012-07-30 19:23 ` [PATCH 04/10] ktest: Add CONFIG_BISECT_CHECK option Steven Rostedt
2012-07-30 19:23 ` [PATCH 05/10] ktest: Fix config bisect with how make oldnoconfig works Steven Rostedt
2012-07-30 19:23 ` [PATCH 06/10] ktest: Add MAX_MONITOR_WAIT option Steven Rostedt
2012-07-30 19:23 ` [PATCH 07/10] ktest: Add check for bug or panic during reboot Steven Rostedt
2012-07-30 19:23 ` [PATCH 08/10] ktest: Reset saved min (force) configs for each test Steven Rostedt
2012-07-30 19:23 ` [PATCH 09/10] ktest: Ignore errors it tests if IGNORE_ERRORS is set Steven Rostedt
2012-07-30 19:23 ` [PATCH 10/10] ktest: Allow perl regex expressions in conditional statements Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120730192656.207135407@goodmis.org \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox