From c9c97d3d9c836a1c1424d0ec0d9f0558315bf72b Mon Sep 17 00:00:00 2001 From: adilger Date: Mon, 28 Feb 2005 23:12:47 +0000 Subject: [PATCH] Branch: b1_4 Add optional path for DBENCH client scripts. Change test 72 to only run for kernel 43 or higher. --- lustre/tests/sanity.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index d1ea72e..6543ad4 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2299,26 +2299,23 @@ test_69() { run_test 69 "verify oa2dentry return -ENOENT doesn't LBUG ======" test_71() { + DBENCH_LIB=${DBENCH_LIB:-/usr/lib/dbench} + PATH=${PATH}:$DBENCH_LIB cp `which dbench` $DIR [ ! -f $DIR/dbench ] && echo "dbench not installed, skip this test" && return 0 TGT=$DIR/client.txt - SRC=${SRC:-/usr/lib/dbench/client.txt} + SRC=${SRC:-$DBENCH_LIB/client.txt} [ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT - SRC=/usr/lib/dbench/client_plain.txt + SRC=$DBENCH_LIB/client_plain.txt [ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT echo "copying necessary lib to $DIR" - if [ -d /lib64 ]; then - mkdir $DIR/lib64 - cp /lib64/libc* $DIR/lib64 - cp /lib64/ld-* $DIR/lib64 - else - mkdir $DIR/lib - cp /lib/libc* $DIR/lib - cp /lib/ld-* $DIR/lib - fi + [ -d /lib64 ] && LIB71=/lib64 || LIB71=/lib + mkdir $DIR$LIB71 || error "can't create $DIR$LIB71" + cp $LIB71/libc* $DIR$LIB71 || error "can't copy $LIB71/libc*" + cp $LIB71/ld-* $DIR$LIB71 || error "can't create $LIB71/ld-*" echo "chroot $DIR /dbench -c client.txt 2" chroot $DIR /dbench -c client.txt 2 @@ -2326,15 +2323,14 @@ test_71() { rm -f $DIR/dbench rm -f $TGT - rm -fr $DIR/lib - rm -fr $DIR/lib64 + rm -fr $DIR$LIB71 return $RC } run_test 71 "Running dbench on lustre (don't segment fault) ====" test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly - check_kernel_version 40 || return 0 + check_kernel_version 43 || return 0 [ "$RUNAS_ID" = "$UID" ] && echo "skipping test 72" && return touch $DIR/f72 chmod 777 $DIR/f72 -- 1.8.3.1