From 32caccb8f47c032df55e77102ea43c627f1ca507 Mon Sep 17 00:00:00 2001 From: Paul E. McKenney Date: Mon, 28 Oct 2013 08:57:29 -0700 Subject: rcutorture: Move checkarg to functions.sh Signed-off-by: Paul E. McKenney Cc: Greg KH --- tools/testing/selftests/rcutorture/bin/kvm.sh | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'tools/testing/selftests/rcutorture/bin/kvm.sh') diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 0783ec9c583e..7ba375ebe396 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh @@ -32,6 +32,7 @@ args="$*" dur=30 KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM +PATH=${KVM}/bin:$PATH; export PATH builddir="${KVM}/b1" RCU_INITRD="$KVM/initrd"; export RCU_INITRD RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG @@ -40,6 +41,8 @@ configs="" ds=`date +%Y.%m.%d-%H:%M:%S` kversion="" +. functions.sh + usage () { echo "Usage: $scriptname optional arguments:" echo " --bootargs kernel-boot-arguments" @@ -60,27 +63,6 @@ usage () { exit 1 } -# checkarg --argname argtype $# arg mustmatch cannotmatch -checkarg () { - if test $3 -le 1 - then - echo $1 needs argument $2 matching \"$5\" - usage - fi - if echo "$4" | grep -q -e "$5" - then - : - else - echo $1 $2 \"$4\" must match \"$5\" - usage - fi - if echo "$4" | grep -q -e "$6" - then - echo $1 $2 \"$4\" must not match \"$6\" - usage - fi -} - while test $# -gt 0 do case "$1" in @@ -164,7 +146,6 @@ do shift done -PATH=${KVM}/bin:$PATH; export PATH CONFIGFRAG=${KVM}/configs; export CONFIGFRAG KVPATH=${CONFIGFRAG}/$kversion; export KVPATH -- cgit v1.2.3-55-g7522