From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755017Ab2G3TaX (ORCPT ); Mon, 30 Jul 2012 15:30:23 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:4399 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508Ab2G3T05 (ORCPT ); Mon, 30 Jul 2012 15:26:57 -0400 X-Authority-Analysis: v=2.0 cv=LIjkseq9 c=1 sm=0 a=s5Htg7xnQOKvHEu9STBOug==:17 a=OpT9cpI26MMA:10 a=Ciwy3NGCPMMA:10 a=O9n03aGDjCAA:10 a=5SG0PmZfjMsA:10 a=bbbx4UPp9XUA:10 a=meVymXHHAAAA:8 a=20KFwNOVAAAA:8 a=m5H1sd5EA71SaqQvpYkA:9 a=QEXdDO2ut3YA:10 a=jEp0ucaQiEUA:10 a=jeBq3FmKZ4MA:10 a=YL-pVB1CO8UV0-KiJiMA:9 a=s5Htg7xnQOKvHEu9STBOug==:117 X-Cloudmark-Score: 0 X-Originating-IP: 72.230.195.127 Message-Id: <20120730192656.207135407@goodmis.org> User-Agent: quilt/0.60-1 Date: Mon, 30 Jul 2012 15:23:17 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds Subject: [PATCH 03/10] ktest: Add PRE_INSTALL option References: <20120730192314.144253843@goodmis.org> Content-Disposition: inline; filename=0003-ktest-Add-PRE_INSTALL-option.patch Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="00GvhwF7k39YY" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00GvhwF7k39YY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: Steven Rostedt 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 --- 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 =3D ( "ADD_CONFIG" =3D> \$addconfig, "REBOOT_TYPE" =3D> \$reboot_type, "GRUB_MENU" =3D> \$grub_menu, + "PRE_INSTALL" =3D> \$pre_install, "POST_INSTALL" =3D> \$post_install, "NO_INSTALL" =3D> \$no_install, "REBOOT_SCRIPT" =3D> \$reboot_script, @@ -1669,6 +1671,12 @@ sub install { =20 return if ($no_install); =20 + if (defined($pre_install)) { + my $cp_pre_install =3D eval_kernel_version $pre_install; + run_command "$cp_pre_install" or + dodie "Failed to run pre install"; + } + my $cp_target =3D eval_kernel_version $target_image; =20 run_scp_install "$outputdir/$build_target", "$cp_target" or diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.c= onf index 4472452..19754e0 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf @@ -426,6 +426,14 @@ # (default "") #BUILD_OPTIONS =3D -j20 =20 +# 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 =3D 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 --=20 1.7.10.4 --00GvhwF7k39YY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJQFuAAAAoJEIy3vGnGbaoA+MAQAJVPl6j3dQ9ii/Y27DZOnCsu t3iyw1SK8nFNTWKBabA/vw/vlu67o6RftUTCsSA8B4qCCvNxwRVb14FGlOSkgNDS hDOJ9nP17QdS0OqbmjMM7J2PRwNt4bAYVDVfMTKOC1sKXkq21H7DuexfjRqIKI29 wmypjcxarmyOTNM3S6dOoTnHuUXDdUpQSC2Pip2B+JbuqfTkoK3HIvQE1rV0K6cI 7Fh20mhfvGeIELi0JXwRWxmxoR9nJvxCwqTQOlznj0fEFDQvBZeGwYpUSJXcIGnh ArmpKBObAdQvFEsfgTL5a4TUv6PFjnKFNXloJ7y+ItswR7I4vMRlW+Hcpg6H/mCy UV1J1Ppi1nJiSw9A/p6DuxlCcz4N7iuRwFPRDAwwUSGxgs/97m4NU1bxOgXFPt+3 oc8XkzD3XmioYu1FUnmtHgC0iWWAceA35r4US2Rg8iYiBiC44U0RspeADLPPHO4X 4vGnDi8gov2fArZ2kwh/0cU/V04qHHH85lj3WqCXE58Afv7cmA6WeH7XChmUDf+A 35mDS07oZC76uj88KVau8nNLqUh77XnigNH3Sonl+4ldvBkoUX5zda2BZmrdVT9L xpvSm/YSnBecCPUShrA4c1F+UyS47Ucp6UKv7g7wj6WI91AzzGz4jZzPzKhWKIJd lHGLRaLZceFjapwL3qAy =lOCd -----END PGP SIGNATURE----- --00GvhwF7k39YY--