summaryrefslogtreecommitdiffstats
path: root/sanity
diff options
context:
space:
mode:
Diffstat (limited to 'sanity')
-rwxr-xr-xsanity/system_light/config6
-rwxr-xr-xsanity/system_light/config~139
-rwxr-xr-xsanity/system_light/legacy/lmbench_test.sh (renamed from sanity/system_light/scripts/lmbench_test.sh)0
-rwxr-xr-x[-rw-r--r--]sanity/system_light/legacy/mmapstress.sh (renamed from sanity/system_light/scripts/mmapstress.sh)0
-rwxr-xr-xsanity/system_light/run.sh421
-rwxr-xr-xsanity/system_light/run.sh~408
-rwxr-xr-xsanity/system_light/run_nfs.sh101
-rwxr-xr-xsanity/system_light/scripts/#kernel.sh#44
-rwxr-xr-xsanity/system_light/scripts/arequal/arequal.sh15
-rwxr-xr-xsanity/system_light/scripts/arequal/arequal_run.sh (renamed from sanity/system_light/scripts/arequal_test.sh)14
-rwxr-xr-xsanity/system_light/scripts/blazer.sh25
-rwxr-xr-xsanity/system_light/scripts/bonnie/bonnie.sh (renamed from sanity/system_light/scripts/bonnie_test.sh)0
-rwxr-xr-xsanity/system_light/scripts/compile_kernel/compile_kernel.sh15
-rwxr-xr-xsanity/system_light/scripts/compile_kernel/kernel.sh (renamed from sanity/system_light/scripts/kernel.sh)20
-rwxr-xr-xsanity/system_light/scripts/compile_kernel/kernel_compile.sh (renamed from sanity/system_light/scripts/kernel_compile.sh)0
-rwxr-xr-xsanity/system_light/scripts/dbench/dbench.sh14
-rwxr-xr-xsanity/system_light/scripts/dbench/dbench_run.sh (renamed from sanity/system_light/scripts/dbench_test.sh)8
-rwxr-xr-xsanity/system_light/scripts/dd/dd.sh14
-rwxr-xr-xsanity/system_light/scripts/dd/dd_run.sh (renamed from sanity/system_light/scripts/dd_test.sh)10
-rwxr-xr-xsanity/system_light/scripts/ffsb/ffsb.sh21
-rwxr-xr-xsanity/system_light/scripts/ffsb/ffsb_run.sh19
-rwxr-xr-xsanity/system_light/scripts/ffsb_test.sh19
-rwxr-xr-xsanity/system_light/scripts/fileop/fileop.sh (renamed from sanity/system_light/scripts/fileop_test.sh)12
-rwxr-xr-xsanity/system_light/scripts/fs_mark/fs_mark.sh (renamed from sanity/system_light/scripts/fs_mark.sh)0
-rwxr-xr-xsanity/system_light/scripts/fsx/fsx.sh13
-rwxr-xr-xsanity/system_light/scripts/fsx/fsx_run.sh (renamed from sanity/system_light/scripts/fsx_test.sh)10
-rwxr-xr-xsanity/system_light/scripts/glusterfs_build/build_glusterfs.sh (renamed from sanity/system_light/scripts/glusterfs_build.sh)14
-rwxr-xr-xsanity/system_light/scripts/glusterfs_build/glusterfs_build.sh14
-rwxr-xr-xsanity/system_light/scripts/iozone/iozone.sh (renamed from sanity/system_light/scripts/iozone_test.sh)3
-rwxr-xr-xsanity/system_light/scripts/kernel.sh~43
-rwxr-xr-xsanity/system_light/scripts/locks/locks.sh17
-rwxr-xr-xsanity/system_light/scripts/locks/locks_run.sh (renamed from sanity/system_light/scripts/locks.sh)18
-rwxr-xr-xsanity/system_light/scripts/ltp/ltp.sh23
-rwxr-xr-xsanity/system_light/scripts/ltp/ltp_run.sh (renamed from sanity/system_light/scripts/ltp_test.sh)54
-rwxr-xr-xsanity/system_light/scripts/ltp_test.sh~335
-rwxr-xr-xsanity/system_light/scripts/multiple_files/multiple_files.sh (renamed from sanity/system_light/scripts/multiple_files.sh)12
-rwxr-xr-xsanity/system_light/scripts/openssl/openssl.sh14
-rwxr-xr-xsanity/system_light/scripts/openssl/openssl_run.sh (renamed from sanity/system_light/scripts/open.sh)20
-rwxr-xr-xsanity/system_light/scripts/posix_compliance.sh6
-rwxr-xr-xsanity/system_light/scripts/posix_compliance/posix_compliance.sh14
-rwxr-xr-xsanity/system_light/scripts/posix_compliance/posix_compliance_run.sh19
-rwxr-xr-xsanity/system_light/scripts/postmark/postmark.sh (renamed from sanity/system_light/scripts/postmark.sh)0
-rwxr-xr-xsanity/system_light/scripts/read_large/read_large.sh15
-rwxr-xr-xsanity/system_light/scripts/read_large/read_large_run.sh (renamed from sanity/system_light/scripts/read_large.sh)2
-rw-r--r--sanity/system_light/scripts/rpc-fops.sh~20
-rwxr-xr-xsanity/system_light/scripts/rpc/rpc-coverage.sh (renamed from sanity/system_light/scripts/rpc-coverage.sh)0
-rwxr-xr-xsanity/system_light/scripts/rpc/rpc.sh (renamed from sanity/system_light/scripts/rpc-fops.sh)0
-rwxr-xr-xsanity/system_light/scripts/syscallbench/syscallbench.sh (renamed from sanity/system_light/scripts/syscallbench.sh)4
-rwxr-xr-xsanity/system_light/scripts/tiobench/tiobench.sh (renamed from sanity/system_light/scripts/tiobench.sh)6
49 files changed, 383 insertions, 1618 deletions
diff --git a/sanity/system_light/config b/sanity/system_light/config
index 3acde78..91422eb 100755
--- a/sanity/system_light/config
+++ b/sanity/system_light/config
@@ -13,6 +13,7 @@ export LOG_FILE="$TMP/time$$.log"
export TEST_DIR=$PWD
export DECISION="n"
export TYPE="other"
+export TEST="all"
while getopts 'w:t:l:D' option
do
@@ -26,9 +27,12 @@ do
D)
DECISION="$OPTARG"
;;
- t)
+ m)
TYPE="$OPTARG"
;;
+ t)
+ TEST="$OPTARG"
+ ;;
esac
done
diff --git a/sanity/system_light/config~ b/sanity/system_light/config~
deleted file mode 100755
index 99b6779..0000000
--- a/sanity/system_light/config~
+++ /dev/null
@@ -1,139 +0,0 @@
-
-#Test path i.e. the path where the configuration file resides.Execution must be done from the saopt location where it resides
-export CONF_FILE=/opt/qa/tools/system_light/config
-
-#Directory from which the script is invoked
-export INVOKEDIR=$PWD
-
-export ERR=0
-
-#The log file where the error optassages and the tiopt duration should be logged
-export TMP="/mnt/logs"
-export LOG_FILE="$TMP/time$$.log"
-export TEST_DIR=$PWD
-export DECISION="n"
-export TYPE="other"
-
-while getopts 'w:l:D:t' option
-do
- case $option in
- w)
- TEST_DIR="$OPTARG"
- ;;
- l)
- LOG_FILE="$OPTARG"
- ;;
- D)
- DECISION="$OPTARG"
- ;;
- t)
- TYPE="$OPTARG"
- ;;
- esac
-done
-
-# Do you want thetest to be terminated on first falure? Press y if you want to
-if [ "$DECISION" = "y" ]; then
- set -e;
-fi
-
-#File where failed tests are saved"
-export LOG_DIR=$(dirname $LOG_FILE)
-#mkdir $LOG_DIR/tests_failed
-export TEST_FAIL=$LOG_DIR/tests_failed
-
-#GlusterFS mount point
-export GF_MP=$TEST_DIR
-export THIS_TEST_DIR=$TEST_DIR/run$$/
-mkdir $THIS_TEST_DIR
-
-#The path which contains the binaries of arequal,postmark,dbench,fileop etc if they are not installed in the system
-export PATH=$PATH:/opt/qa/tools
-export BIN_PATH=/opt/qa/tools
-
-#Arequal related variables
-export ARE_SRC_DIR=/opt/qa/tools/ #The Directory in which the file or the directory being tested is present
-export FILEORDIR=system_light #THe file or the directory to be tested
-export ARE_SRC=$ARE_SRC_DIR$FILEORDIR
-export ARE_DST=$THIS_TEST_DIR$FILEORDIR #The destination directory where the test file should be copied
-
-#Bonnie Related variables
-export USER_NAME=`whoami`
-export WD=$THIS_TEST_DIR
-
-#dbench related variables
-export TIME=300
-export DBENCH_CLNTS=10
-
-#dd related variables
-export OF=dd_test
-export BS_SIZE=100M
-export DD_CNT=10
-
-#Read from the large file
-export LARGE_FILE_SOURCE=$THIS_TEST_DIR/$OF
-export LARGE_FILE_DEST=/dev/null
-
-#fileop related variables
-#export FILEOP_SIZE=100
-export FILEOP_CNT=30
-
-#fsx related variables
-export FSX_FILE_ORIG=/opt/qa/tools/read
-export FSX_FILE=$(basename $FSX_FILE_ORIG)
-export NUM_OPS=100 #Number of operations to be perforoptd default is infinity
-
-#ffsb related variables
-export FFSB_FILE=$THIS_TEST_DIR/profile_everything
-
-#glusterfs build
-export GFS_VERSION=3.0.0pre2
-export GLUSTERFS_TAR_FILE=/opt/qa/tools/glusterfs-$GFS_VERSION.tar.gz
-export GLUSTERFS_DIR=glusterfs.git
-
-#ioblazer related variables
-export BLAZER_DIR=$THIS_TEST_DIR;
-
-#iozone related variables
-export FILE_SIZE=4g
-export RECORD_SIZE=22k
-
-# kernel related variables
-#export SCRIPTS_PATH="/opt/qa/tools/system_light/scripts"
-export VERSION=2.6.31.1
-export KERNEL_PATH=/opt/qa/tools/linux-$VERSION.tar.bz2
-
-#ltp related variables
-export LTP_DIR=/opt/qa/tools/ltp-full-20091031/testcases/kernel/fs/
-
-#locks related variables
-export LOCK_BIN=/opt/qa/tools/locks/locktests
-export CON_PROC=22
-export LOCK_TEST_FILE=$THIS_TEST_DIR/locks_test
-
-#lmbench related variables
-export LM_DIR=lmbench-3.0-a9
-export SRC_DIR=$BIN_PATH/lmbench-3.0-a9
-
-#openssl related variables
-export OPENSSL_TAR_FILE="/opt/qa/tools/openssl-0.9.8c.tar.gz"
-export OPENSSL_DIR="openssl-0.9.8c"
-export PREFIX=''
-export OPENSSLDIR=''
-
-#posix compliance related variables
-export DIR="/opt/qa/tools/posix-testsuite";
-
-#postmark related variables
-export POST_FILE=/opt/qa/tools/system_light/pm.config
-
-#Multiple file related variables
-export NUM_OF_FILES=100000
-
-#syscallbench related variables
-export TOOL_DIR=/opt/qa/tools/tools.git
-export SYSCALL_BIN=$TOOL_DIR/syscallbench/syscallbench
-export SYSCALL_PLOT=$TOOL_DIR/syscallbench/syscallben-plot
-
-#tiobench related variables
-export TIO_BIN=/opt/qa/tools/tiobench-0.3.3/tiotest
diff --git a/sanity/system_light/scripts/lmbench_test.sh b/sanity/system_light/legacy/lmbench_test.sh
index 30c5f6d..30c5f6d 100755
--- a/sanity/system_light/scripts/lmbench_test.sh
+++ b/sanity/system_light/legacy/lmbench_test.sh
diff --git a/sanity/system_light/scripts/mmapstress.sh b/sanity/system_light/legacy/mmapstress.sh
index bfcb206..bfcb206 100644..100755
--- a/sanity/system_light/scripts/mmapstress.sh
+++ b/sanity/system_light/legacy/mmapstress.sh
diff --git a/sanity/system_light/run.sh b/sanity/system_light/run.sh
index 910f5bc..93852db 100755
--- a/sanity/system_light/run.sh
+++ b/sanity/system_light/run.sh
@@ -11,401 +11,72 @@ _init ()
CNT=0
. $basedir/config;
#. /opt/qa/tools/system_light/config
-
- echo " This script runs the tools and scriprts which are used to test the performance.The tests are run on ther glusterFS mountpoint.They are:
-1.dd
-2.dbench
-3.arequal
-4.posix_compliance
-5.kernel compile
-6.fsx
-7.ltp tests
-8.fileop
-9.openssl build
-10.postmark
-11.ffsb
-12.Reading from large file
-13.Multiple file creation(100000)
-14.glusterfs build
-15.syscallbench
-16.tiobench
-17.locktests
-18.ioblazer
-19.fsmark";
-}
-
-run_ffsb ()
-{
- echo "Executing ffsb"
- set +x
- cp $BIN_PATH/system_light/profile_everything $THIS_TEST_DIR/profile_everything
- sed -i "s[/mnt/test1[$THIS_TEST_DIR[" profile_everything
- $SCRIPTS_PATH/ffsb_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing data"
- rm -rfv data && echo "Removed"
- echo "Removing meta"
- rm -rfv meta && echo "Removed"
- echo "Removing profile_everything"
- rm $FFSB_FILE && echo "Removed"
- else
- echo "ffsb failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_ltp ()
-{
- echo "Executing ltp tests"
- set +x
- mkdir ltp
- cd ltp
- $SCRIPTS_PATH/ltp_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing directory"
- cd -
- rm -rfv ltp && echo "removed"
- else
- echo "ltp failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_fileop ()
-{
- echo "Executing fileop"
- set +x
- $SCRIPTS_PATH/fileop_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "fileop failed"
- echo $CNT
- fi
-}
-
-run_kernel_compile ()
-{
- echo "Kernel compiling" #Untars the given kernel file and compiles it
- set +x
- $SCRIPTS_PATH/kernel.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing linux-$VERSION.tar.bz2 and linux-$VERSION"
- rm -r linux-$VERSION* && echo "removed"
- else
- echo "kernel compile failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_bonnie ()
-{
- echo "Executing bonnie++"
- set +x
- $SCRIPTS_PATH/bonnie_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "bonnie failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_dd ()
-{
- echo "Executing dd"
- set +x
- $SCRIPTS_PATH/dd_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "dd failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_read_large ()
-{
- echo "Reading from large file"
- set +x
- $SCRIPTS_PATH/read_large.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $PWD/$OF"
- rm $PWD/$OF && echo "Removed"
- else
- echo "Large file reading failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_dbench ()
-{
- echo "Executing dbench"
- set +x
- $SCRIPTS_PATH/dbench_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing clients"
- rm -r clients && echo "Removed"
- else
- echo "dbench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_glusterfs_build ()
-{
- echo "glusterfs build"
- set +x;
- $SCRIPTS_PATH/glusterfs_build.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing glusterfs directory"
- rm -r $GLUSTERFS_DIR && echo "Removed"
- else
- echo "glusterfs build failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_posix_compliance ()
-{
- echo "Checking for POSIX compliance"
- set +x
- $SCRIPTS_PATH/posix_compliance.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing posix created directories and files"
- rm -r fstest* && echo "Removed"
- else
- echo "posix failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_openssl_build ()
-{
- echo "Building opnssl"
- set +x
- $SCRIPTS_PATH/open.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $OPENSSL_DIR"
- rm -r openssl* && echo "Removed"
- else
- echo "openssl failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
}
-run_postmark ()
+function run_tests ()
{
- echo "Running postmark"
- set +x
- $SCRIPTS_PATH/postmark.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "postmark failed" | tee -a $TEST_FAIL
- echo $CNT
+ local tool=;
+ if [ $# -eq 1 ]; then
+ tool=$1;
fi
-}
-run_multiple_files ()
-{
- echo "Multiple files creation(100000),listing,removal"
- set +x
- $SCRIPTS_PATH/multiple_files.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "multiple files failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
+ export global_test=;
-run_iozone ()
-{
- echo "Executing iozone"
- set +x
- $SCRIPTS_PATH/iozone_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "iozone failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_fsx ()
-{
- echo "Executing fsx"
- set +x
- $SCRIPTS_PATH/fsx_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $FSX_FILE,$FSX_FILE.fsxgood and $FSX_FILE.fsxlog"
- rm $FSX_FILE* && echo "Removed"
- else
- echo "fsx failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_arequal ()
-{
- echo "executing arequal"
- set +x
- $SCRIPTS_PATH/arequal_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $ARE_DST"
- rm -r $ARE_DST && echo "Removed"
- else
- echo "arequal failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_syscallbench ()
-{
- echo "Executing syscallbench"
- set +x
- $SCRIPTS_PATH/syscallbench.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "syscallbench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
+ if [ $tool ]; then
+ global_test=$tool;
+ export TOOLDIR=$SCRIPTS_PATH/$global_test;
-run_tiobench ()
-{
- echo "Executing tiobench"
- set +x
- $SCRIPTS_PATH/tiobench.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "tiobench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
+ if [ -f $SCRIPTS_PATH/$tool/$tool.sh ]; then
-run_locktests ()
-{
- echo "Executing locktests"
- set +x
- locks_dirname=$(dirname $LOCK_BIN)
- cp $locks_dirname/test $LOCK_TEST_FILE
- $SCRIPTS_PATH/locks.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- rm $LOCK_TEST_FILE
- else
- echo "locktests failed" | tee -a $TEST_FAIL
- echo $CNT
- rm $LOCK_TEST_FILE
+ echo "executing $tool" && sleep 2;
+ set +x;
+ $SCRIPTS_PATH/$tool/$tool.sh;
+ if [ "${?}" -eq 0 ]; then
+ CNT=$((CNT+1))
+ echo $CNT
+ else
+ echo "$tool failed"
+ echo $CNT
+ fi
+ return 0;
+ else
+ echo "tool $tool is not there in the script directory. Exiting";
+ return 22;
+ fi
fi
-}
-run_blazer ()
-{
- echo "Executing ioblazer";
- set +x;
- $SCRIPTS_PATH/blazer.sh;
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1));
- echo $CNT;
- else
- echo "blazer failed | tee -a $TEST_FAIL";
- echo $CNT;
- fi
+ for i in $(ls $SCRIPTS_PATH | sort -n) #grep "^[0-9]*$" |
+ do
+ if [ -f $SCRIPTS_PATH/$i/$i.sh ]; then
+ run_tests $i;
+ sleep 1;
+ fi
+ done
}
-run_rpc_coverage ()
+main ()
{
- echo "Executing rpc coverage tests";
- set +x;
- $SCRIPTS_PATH/rpc-fops.sh;
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1));
- echo $CNT;
- else
- echo "rpc-coverage failed | tee -a $TEST_FAIL";
- echo $CNT;
- fi
-}
+ echo "Tests available:"
+ ls $SCRIPTS_PATH | sort -n && sleep 1;
-run_fsmark ()
-{
- echo "Executing fsmark"
- set +x
- $SCRIPTS_PATH/fs_mark.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "fsmark failed"
- echo $CNT
- fi
-}
+ old_PWD=$PWD;
-main ()
-{
- echo " Changing to the specified mountpoint";
+ echo "===========================TESTS RUNNING===========================";
+ echo "Changing to the specified mountpoint";
cd $THIS_TEST_DIR;
pwd;
sleep 1;
- run_rpc_coverage;
- run_posix_compliance;
- run_ffsb;
- run_ltp;
- run_fileop;
- run_kernel_compile;
- run_dd;
- run_read_large;
- run_dbench;
- run_bonnie;
- run_iozone;
- run_glusterfs_build;
- run_openssl_build;
- run_postmark;
- run_multiple_files;
- run_fsx;
- run_arequal;
- run_syscallbench;
- run_tiobench;
- run_fsmark;
- if [ $TYPE != "nfs" ]; then
- run_locktests;
+ if [ $TEST == "all" ]; then
+ run_tests;
+ else
+ run_tests $TEST;
+ if [ $? -ne 0 ]; then
+ cd $old_PWD;
+ rmdir $THIS_TEST_DIR;
+ exit 22;
+ fi
fi
- #run_blazer;
echo "Total $CNT tests were successful" | tee -a $TEST_FAIL
diff --git a/sanity/system_light/run.sh~ b/sanity/system_light/run.sh~
deleted file mode 100755
index e7edcb1..0000000
--- a/sanity/system_light/run.sh~
+++ /dev/null
@@ -1,408 +0,0 @@
-#!/bin/sh
-
-_init ()
-{
- ulimit -c unlimited
- set +x
- set -u;
- basedir=$(dirname $0);
- SCRIPTS_PATH=$basedir/scripts;
- #SCRIPTS_PATH="/opt/qa/tools/system_light/scripts"
- CNT=0
- . $basedir/config;
- #. /opt/qa/tools/system_light/config
-
- echo " This script runs the tools and scriprts which are used to test the performance.The tests are run on ther glusterFS mountpoint.They are:
-1.dd
-2.dbench
-3.arequal
-4.posix_compliance
-5.kernel compile
-6.fsx
-7.ltp tests
-8.fileop
-9.openssl build
-10.postmark
-11.ffsb
-12.Reading from large file
-13.Multiple file creation(100000)
-14.glusterfs build
-15.syscallbench
-16.tiobench
-17.locktests
-18.ioblazer";
-}
-
-run_ffsb ()
-{
- echo "Executing ffsb"
- set +x
- cp $BIN_PATH/system_light/profile_everything $THIS_TEST_DIR/profile_everything
- sed -i "s[/mnt/test1[$THIS_TEST_DIR[" profile_everything
- $SCRIPTS_PATH/ffsb_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing data"
- rm -rfv data && echo "Removed"
- echo "Removing meta"
- rm -rfv meta && echo "Removed"
- echo "Removing profile_everything"
- rm $FFSB_FILE && echo "Removed"
- else
- echo "ffsb failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_ltp ()
-{
- echo "Executing ltp tests"
- set +x
- mkdir ltp
- cd ltp
- $SCRIPTS_PATH/ltp_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing directory"
- cd -
- rm -rfv ltp && echo "removed"
- else
- echo "ltp failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_fileop ()
-{
- echo "Executing fileop"
- set +x
- $SCRIPTS_PATH/fileop_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "fileop failed"
- echo $CNT
- fi
-}
-
-run_kernel_compile ()
-{
- echo "Kernel compiling" #Untars the given kernel file and compiles it
- set +x
- $SCRIPTS_PATH/kernel.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing linux-$VERSION.tar.bz2 and linux-$VERSION"
- rm -r linux-$VERSION* && echo "removed"
- else
- echo "kernel compile failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-# echo "Executing bonnie++"
-# set +x
-# $SCRIPTS_PATH/bonnie_test.sh
-# if [ "${?}" -eq 0 ]; then
-# CNT=$((CNT+1))
-# echo $CNT
-# else
-# echo "bonnie failed" | tee -a $TEST_FAIL
-# echo $CNT
-# fi
-
-run_dd ()
-{
- echo "Executing dd"
- set +x
- $SCRIPTS_PATH/dd_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "dd failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_read_large ()
-{
- echo "Reading from large file"
- set +x
- $SCRIPTS_PATH/read_large.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $PWD/$OF"
- rm $PWD/$OF && echo "Removed"
- else
- echo "Large file reading failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_dbench ()
-{
- echo "Executing dbench"
- set +x
- $SCRIPTS_PATH/dbench_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing clients"
- rm -r clients && echo "Removed"
- else
- echo "dbench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_glusterfs_build ()
-{
- echo "glusterfs build"
- set +x;
- $SCRIPTS_PATH/glusterfs_build.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing glusterfs directory"
- rm -r $GLUSTERFS_DIR && echo "Removed"
- else
- echo "glusterfs build failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_posix_compliance ()
-{
- echo "Checking for POSIX compliance"
- set +x
- $SCRIPTS_PATH/posix_compliance.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing posix created directories and files"
- rm -r fstest* && echo "Removed"
- else
- echo "posix failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_openssl_build ()
-{
- echo "Building opnssl"
- set +x
- $SCRIPTS_PATH/open.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $OPENSSL_DIR"
- rm -r openssl* && echo "Removed"
- else
- echo "openssl failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_postmark ()
-{
- echo "Running postmark"
- set +x
- $SCRIPTS_PATH/postmark.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "postmark failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_multiple_files ()
-{
- echo "Multiple files creation(100000),listing,removal"
- set +x
- $SCRIPTS_PATH/multiple_files.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "multiple files failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-# echo "Executing iozone"
-# set +x
-# $SCRIPTS_PATH/iozone_test.sh
-# if [ "${?}" -eq 0 ]; then
-# CNT=$((CNT+1))
-# echo $CNT
-# else
-# echo "iozone failed" | tee -a $TEST_FAIL
-# echo $CNT
-# fi
-
-run_fsx ()
-{
- echo "Executing fsx"
- set +x
- $SCRIPTS_PATH/fsx_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $FSX_FILE,$FSX_FILE.fsxgood and $FSX_FILE.fsxlog"
- rm $FSX_FILE* && echo "Removed"
- else
- echo "fsx failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_arequal ()
-{
- echo "executing arequal"
- set +x
- $SCRIPTS_PATH/arequal_test.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing $ARE_DST"
- rm -r $ARE_DST && echo "Removed"
- else
- echo "arequal failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_syscallbench ()
-{
- echo "Executing syscallbench"
- set +x
- $SCRIPTS_PATH/syscallbench.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "syscallbench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_tiobench ()
-{
- echo "Executing tiobench"
- set +x
- $SCRIPTS_PATH/tiobench.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- else
- echo "tiobench failed" | tee -a $TEST_FAIL
- echo $CNT
- fi
-}
-
-run_locktests ()
-{
- echo "Executing locktests"
- set +x
- locks_dirname=$(dirname $LOCK_BIN)
- cp $locks_dirname/test $LOCK_TEST_FILE
- $SCRIPTS_PATH/locks.sh
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- rm $LOCK_TEST_FILE
- else
- echo "locktests failed" | tee -a $TEST_FAIL
- echo $CNT
- rm $LOCK_TEST_FILE
- fi
-}
-
-run_blazer ()
-{
- echo "Executing ioblazer";
- set +x;
- $SCRIPTS_PATH/blazer.sh;
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1));
- echo $CNT;
- else
- echo "blazer failed | tee -a $TEST_FAIL";
- echo $CNT;
- fi
-}
-
-run_rpc_coverage ()
-{
- echo "Executing rpc coverage tests";
- #set +x;
- set -x;
- $SCRIPTS_PATH/rpc-fops.sh;
- if [ "${?}" -eq 0 ]; then
- CNT=$((CNT+1));
- echo $CNT;
- else
- echo "rpc-coverage failed | tee -a $TEST_FAIL";
- echo $CNT;
- fi
-}
-
-main ()
-{
- echo " Changing to the specified mountpoint";
- cd $THIS_TEST_DIR;
- pwd;
- sleep 1;
-
- run_rpc_coverage;
- # run_posix_compliance;
-# run_ffsb;
-# run_ltp;
-# run_fileop;
- run_kernel_compile;
- # run_dd;
-# run_read_large;
-# run_dbench;
-# run_glusterfs_build;
-# run_openssl_build;
-# run_postmark;
-# run_multiple_files;
-# run_fsx;
-# run_arequal;
-# run_syscallbench;
-# run_tiobench;
-# if [ $TYPE != "nfs" ]; then
-# run_locktests;
-# fi
- #run_blazer;
-
- echo "Total $CNT tests were successful" | tee -a $TEST_FAIL
-
- if [ "$INVOKEDIR" == "$THIS_TEST_DIR" ]; then
- echo "moving to the parent directory"
- cd ..
- echo "Removing $THIS_TEST_DIR"
- rmdir $THIS_TEST_DIR
- if [ "${?}" -ne 0 ]; then
- echo "rmdir failed:Directory not empty"
- fi
- else
- echo "Switching over to the previous working directory"
- cd $INVOKEDIR
- echo "Removing $THIS_TEST_DIR"
- rmdir $THIS_TEST_DIR
- if [ "${?}" -ne 0 ]; then
- echo "rmdir failed:Directory not empty"
- fi
- fi
-}
-
-_init "$@" && main "$@" \ No newline at end of file
diff --git a/sanity/system_light/run_nfs.sh b/sanity/system_light/run_nfs.sh
deleted file mode 100755
index 94d8262..0000000
--- a/sanity/system_light/run_nfs.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-
-ulimit -c unlimited
-set +x
-SCRIPTS_PATH="/opt/qa/tools/system_light/scripts"
-CNT=0
-. /opt/qa/tools/system_light/config
-echo " Changing to the specified mountpoint"
-cd $THIS_TEST_DIR
-pwd
-
-echo " This script runs the tools and scriprts which are used to test the performance.The tests are run on ther glusterFS mountpoint.They are:
-1.dd
-2.dbench
-3.arequal
-4.posix_compliance
-5.kernel compile
-6.fsx
-7.ltp tests
-8.fileop
-9.bonnie
-10.iozone
-11.openssl build
-12.postmark
-13.ffsb
-14.Reading from large file
-15.Multiple file creation(100000)
-16.glusterfs build";
-
-sleep 1
-
-echo "Executing ffsb"
- set +x
- cp $BIN_PATH/system_light/profile_everything $THIS_TEST_DIR/profile_everything
- sed -i "s[/mnt/test1[$THIS_TEST_DIR[" profile_everything
- $SCRIPTS_PATH/ffsb_test.sh
-if [ $? -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing data"
- rm -rfv data && echo "Removed"
- echo "Removing meta"
- rm -rfv meta && echo "Removed"
- echo "Removing profile_everything"
- rm $FFSB_FILE && echo "Removed"
-else
- echo "ffsb failed"
- echo $CNT
-fi
-
-echo "Executing ltp tests"
- set +x
- mkdir ltp
- cd ltp
- $SCRIPTS_PATH/ltp_test.sh
-if [ $? -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing directory"
- cd -
- rm -rfv ltp && echo "removed"
-else
- echo "ltp failed"
- echo $CNT
-fi
-
-echo "Executing fileop"
- set +x
- $SCRIPTS_PATH/fileop_test.sh
-if [ $? -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
-else
- echo "fileop failed"
- echo $CNT
-fi
-
-echo "Kernel compiling" #Untars the given kernel file and compiles it
- set +x
- $SCRIPTS_PATH/kernel.sh
-if [ $? -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
- echo "Removing linux-$VERSION.tar.bz2 and linux-$VERSION"
- rm -r linux-$VERSION* && echo "removed"
-else
- echo "kernel compile failed"
- echo $CNT
-fi
-
-echo "Executing bonnie++"
- set +x
- $SCRIPTS_PATH/bonnie_test.sh
-if [ $? -eq 0 ]; then
- CNT=$((CNT+1))
- echo $CNT
-else
- echo "bonnie failed"
- echo $CNT
-fi
-
diff --git a/sanity/system_light/scripts/#kernel.sh# b/sanity/system_light/scripts/#kernel.sh#
deleted file mode 100755
index 40268a9..0000000
--- a/sanity/system_light/scripts/#kernel.sh#
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-#This script 1st searches in the pwd for the kernel tar file. If its not there then based on the value of the vriable KERNEL_PATH it either searches from the path given or searches in http://www.kernel.org
-
-function main()
-{
- if [ -e "linux-$VERSION.tar.bz2" ]
- then
- echo "start:`date +%T`"
- time $SCRIPTS_PATH/kernel_compile.sh linux-$VERSION.tar.bz2 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
-
- f err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- elif [ -z "$KERNEL_PATH" ]
- then
- time $SCRIPTS_PATH/kernel_compile.sh 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
- err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- else
- time $SCRIPTS_PATH/kernel_compile.sh $KERNEL_PATH 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
- err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- fi;
-}
-
-main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/arequal/arequal.sh b/sanity/system_light/scripts/arequal/arequal.sh
new file mode 100755
index 0000000..1dafdbd
--- /dev/null
+++ b/sanity/system_light/scripts/arequal/arequal.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/arequal_run.sh;
+
+ if [ $? -eq 0 ]; then
+ rm -r $ARE_DST && echo "removed";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@"
diff --git a/sanity/system_light/scripts/arequal_test.sh b/sanity/system_light/scripts/arequal/arequal_run.sh
index 3b66680..ebf40b7 100755
--- a/sanity/system_light/scripts/arequal_test.sh
+++ b/sanity/system_light/scripts/arequal/arequal_run.sh
@@ -4,19 +4,19 @@ function main ()
{
stat $ARE_SRC | grep directory > /dev/null
if [ $? -eq 0 ] ; then
- ARE_SRC=$ARE_SRC/
+ ARE_SRC=$ARE_SRC/
fi
-
- echo "start:`date +%T`"
- time arequal-run.sh $ARE_SRC $ARE_DST 2>>$LOG_FILE 1>>$LOG_FILE
+
+ echo "start:`date +%T`"
+ time arequal-run.sh $ARE_SRC $ARE_DST 2>>$LOG_FILE 1>>$LOG_FILE
#copies the contents of $4 directory to $5 and calculates the checksum of both src and dst directories to check whether the transfer was successful. We need to redirect the standard output also to the logfile to see the output of arequal.
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
- return 11;
+ echo "end:`date +%T`"
+ return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
fi
}
diff --git a/sanity/system_light/scripts/blazer.sh b/sanity/system_light/scripts/blazer.sh
deleted file mode 100755
index 3e59cb0..0000000
--- a/sanity/system_light/scripts/blazer.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-
-
-#ioblazer test which tests the IO functionality, and can generate vm related loads.
-
-function main()
-{
- ioblazer -d $BLAZER_DIR;
-
- # Since opening a file with O_DIRECT in fuse fails check the exit value for failure. If the test fails for the first time assume that
- # the mount point was a fuse mount point and re run the test again with buffered IO enabled.
-
- if [ $? -ne 0 ]; then
- ioblazer -B 1 -d $BLAZER_DIR
- if [ $? -ne 0 ]; then
- return 11;
- else
- return 0;
- fi
- else
- return 0;
- fi
-}
-
-main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/bonnie_test.sh b/sanity/system_light/scripts/bonnie/bonnie.sh
index 70bc2bd..70bc2bd 100755
--- a/sanity/system_light/scripts/bonnie_test.sh
+++ b/sanity/system_light/scripts/bonnie/bonnie.sh
diff --git a/sanity/system_light/scripts/compile_kernel/compile_kernel.sh b/sanity/system_light/scripts/compile_kernel/compile_kernel.sh
new file mode 100755
index 0000000..ed153f2
--- /dev/null
+++ b/sanity/system_light/scripts/compile_kernel/compile_kernel.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/kernel.sh;
+
+ if [ $? -eq 0 ]; then
+ rm -r linux-$VERSION* && echo "removed kernel";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/kernel.sh b/sanity/system_light/scripts/compile_kernel/kernel.sh
index 1af548c..c6c9542 100755
--- a/sanity/system_light/scripts/kernel.sh
+++ b/sanity/system_light/scripts/compile_kernel/kernel.sh
@@ -7,35 +7,35 @@ function main()
SCRIPTS_DIR=$(dirname $0);
if [ -e "linux-$VERSION.tar.bz2" ]
then
- echo "start:`date +%T`"
- time $SCRIPTS_DIR/kernel_compile.sh linux-$VERSION.tar.bz2 2>>$LOG_FILE 1>>$LOG_FILE
+ echo "start:`date +%T`"
+ time $SCRIPTS_DIR/kernel_compile.sh linux-$VERSION.tar.bz2 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
err=$?
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
elif [ -z "$KERNEL_PATH" ]
then
- time $SCRIPTS_DIR/kernel_compile.sh 2>>$LOG_FILE 1>>$LOG_FILE
+ time $SCRIPTS_DIR/kernel_compile.sh 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
err=$?
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
else
- time $SCRIPTS_DIR/kernel_compile.sh $KERNEL_PATH 2>>$LOG_FILE 1>>$LOG_FILE
+ time $SCRIPTS_DIR/kernel_compile.sh $KERNEL_PATH 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
err=$?
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
fi;
diff --git a/sanity/system_light/scripts/kernel_compile.sh b/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
index 646d639..646d639 100755
--- a/sanity/system_light/scripts/kernel_compile.sh
+++ b/sanity/system_light/scripts/compile_kernel/kernel_compile.sh
diff --git a/sanity/system_light/scripts/dbench/dbench.sh b/sanity/system_light/scripts/dbench/dbench.sh
new file mode 100755
index 0000000..2d2633d
--- /dev/null
+++ b/sanity/system_light/scripts/dbench/dbench.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+function main()
+{
+ $TOOLDIR/dbench_run.sh;
+ if [ $? -eq 0 ]; then
+ rm -r clients && echo "removed clients";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/dbench_test.sh b/sanity/system_light/scripts/dbench/dbench_run.sh
index fee116f..6887512 100755
--- a/sanity/system_light/scripts/dbench_test.sh
+++ b/sanity/system_light/scripts/dbench/dbench_run.sh
@@ -2,19 +2,19 @@
function main()
{
-#runs $3 multiple clients on mount point and tests the performance and -t option ($2) tells the time for which it should be run
+#runs $3 multiple clients on mount point and tests the performance and -t option ($2) tells the time for which it should be run
echo "start:`date +%T`"
time dbench -t $TIME -s -S $DBENCH_CLNTS 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
-
+
}
main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/dd/dd.sh b/sanity/system_light/scripts/dd/dd.sh
new file mode 100755
index 0000000..7a1a23e
--- /dev/null
+++ b/sanity/system_light/scripts/dd/dd.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/dd_run.sh;
+ if [ $? -eq 0 ]; then
+ rm -f $PWD/$OF && echo "dd file removed";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/dd_test.sh b/sanity/system_light/scripts/dd/dd_run.sh
index c4df53c..f2857cc 100755
--- a/sanity/system_light/scripts/dd_test.sh
+++ b/sanity/system_light/scripts/dd/dd_run.sh
@@ -2,16 +2,16 @@
function main ()
{
- echo "start:`date +%T`"
+ echo "start:`date +%T`"
time dd if=/dev/zero of=$PWD/$OF bs=$BS_SIZE count=$DD_CNT 2>>$LOG_FILE #copies specified amount of data from the input file to the output file
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
- return 11;
+ echo "end:`date +%T`"
+ return 11;
else
- echo "end:`date +%T`"
- return 0;
+ echo "end:`date +%T`"
+ return 0;
fi
}
diff --git a/sanity/system_light/scripts/ffsb/ffsb.sh b/sanity/system_light/scripts/ffsb/ffsb.sh
new file mode 100755
index 0000000..7e654a0
--- /dev/null
+++ b/sanity/system_light/scripts/ffsb/ffsb.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+function main ()
+{
+ cp $BIN_PATH/system_light/profile_everything $THIS_TEST_DIR/profile_everything
+ sed -i "s[/mnt/test1[$THIS_TEST_DIR[" profile_everything
+ $TOOLDIR/ffsb_run.sh
+ if [ "${?}" -eq 0 ]; then
+ echo "Removing data"
+ rm -rfv data && echo "Removed"
+ echo "Removing meta"
+ rm -rfv meta && echo "Removed"
+ echo "Removing profile_everything"
+ rm $FFSB_FILE && echo "Removed"
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/ffsb/ffsb_run.sh b/sanity/system_light/scripts/ffsb/ffsb_run.sh
new file mode 100755
index 0000000..918b95e
--- /dev/null
+++ b/sanity/system_light/scripts/ffsb/ffsb_run.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+function main ()
+{
+ echo "start:`date +%T`"
+ time ffsb $FFSB_FILE 2>>$LOG_FILE 1>>$LOG_FILE
+
+
+ if [ $? -ne 0 ]; then
+ echo "end:`date +%T`" >>$LOG_FILE
+ return 11;
+ else
+ echo "end:`date +%T`" >>$LOG_FILE
+ return 0;
+ fi
+
+}
+
+main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/ffsb_test.sh b/sanity/system_light/scripts/ffsb_test.sh
deleted file mode 100755
index 6a9e8c2..0000000
--- a/sanity/system_light/scripts/ffsb_test.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-function main ()
-{
- echo "start:`date +%T`"
- time ffsb $FFSB_FILE 2>>$LOG_FILE 1>>$LOG_FILE
-
-
- if [ $? -ne 0 ]; then
- echo "end:`date +%T`" >>$LOG_FILE
- return 11;
- else
- echo "end:`date +%T`" >>$LOG_FILE
- return 0;
- fi
-
-}
-
-main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/fileop_test.sh b/sanity/system_light/scripts/fileop/fileop.sh
index d99992c..18e07e6 100755
--- a/sanity/system_light/scripts/fileop_test.sh
+++ b/sanity/system_light/scripts/fileop/fileop.sh
@@ -8,15 +8,15 @@ function main()
#in this example it creates 2 directories.In each directory 2 subdirectories are created and in each subdirectory 2 files are created.
-
+
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
- return 11;
+ echo "end:`date +%T`"
+ return 11;
else
- echo "end:`date +%T`"
- return 0;
+ echo "end:`date +%T`"
+ return 0;
fi
-
+
}
main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/fs_mark.sh b/sanity/system_light/scripts/fs_mark/fs_mark.sh
index 53404c5..53404c5 100755
--- a/sanity/system_light/scripts/fs_mark.sh
+++ b/sanity/system_light/scripts/fs_mark/fs_mark.sh
diff --git a/sanity/system_light/scripts/fsx/fsx.sh b/sanity/system_light/scripts/fsx/fsx.sh
new file mode 100755
index 0000000..0d1a5e2
--- /dev/null
+++ b/sanity/system_light/scripts/fsx/fsx.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/fsx_run.sh;
+ if [ $? -eq 0 ]; then
+ rm $FSX_FILE* && echo "Removed fsx file"
+ return 0;
+ else
+ return 1;
+}
+
+main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/fsx_test.sh b/sanity/system_light/scripts/fsx/fsx_run.sh
index 8cf5fe8..4807001 100755
--- a/sanity/system_light/scripts/fsx_test.sh
+++ b/sanity/system_light/scripts/fsx/fsx_run.sh
@@ -6,14 +6,14 @@ function main ()
{
cp $FSX_FILE_ORIG $FSX_FILE
- echo "start:`date +%T`"
+ echo "start:`date +%T`"
time fsx -R -W -N $NUM_OPS $FSX_FILE 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
+
+ if [ $? -ne 0 ]; then
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
}
diff --git a/sanity/system_light/scripts/glusterfs_build.sh b/sanity/system_light/scripts/glusterfs_build/build_glusterfs.sh
index d12e191..a07d0ad 100755
--- a/sanity/system_light/scripts/glusterfs_build.sh
+++ b/sanity/system_light/scripts/glusterfs_build/build_glusterfs.sh
@@ -6,7 +6,7 @@ function main ()
{
echo "cloning from the git:`date +%T`" >>$LOG_FILE
- time git clone git://git.gluster.com/glusterfs.git glusterfs.git 2>>$LOG_FILE 1>>$LOG_FILE
+ time git clone git://github.com/gluster/glusterfs.git glusterfs.git 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "Cannot clone the git repository"
tar -xvf $GLUSTERFS_TAR_FILE
@@ -16,7 +16,7 @@ function main ()
cd $GLUSTERFS_DIR
echo "running autogen.sh:`date +%T`"
- time ./autogen.sh 2>>$LOG_FILE 1>>$LOG_FILE
+ time ./autogen.sh 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "autogen failed:`date +%T`";
@@ -24,22 +24,22 @@ function main ()
fi
echo "running configure:`date +%T`"
- time ./configure 2>>$LOG_FILE 1>>$LOG_FILE
+ time ./configure 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "configure failed:`date +%T`";
return 11;
fi
-
+
echo "running make:`date +%T`"
- time make -j 32 2>>$LOG_FILE 1>>$LOG_FILE
+ time make -j 32 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "make failed:`date +%T`";
- return 11;
+ return 11;
else
- echo "all successful:`date +%T`"
+ echo "all successful:`date +%T`"
return 0;
fi
diff --git a/sanity/system_light/scripts/glusterfs_build/glusterfs_build.sh b/sanity/system_light/scripts/glusterfs_build/glusterfs_build.sh
new file mode 100755
index 0000000..4a16874
--- /dev/null
+++ b/sanity/system_light/scripts/glusterfs_build/glusterfs_build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/build_glusterfs.sh;
+ if [ $? -eq 0 ]; then
+ rm -r $GLUSTERFS_DIR && echo "glusterfs directory removed";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/iozone_test.sh b/sanity/system_light/scripts/iozone/iozone.sh
index 870f18f..4c99a87 100755
--- a/sanity/system_light/scripts/iozone_test.sh
+++ b/sanity/system_light/scripts/iozone/iozone.sh
@@ -7,7 +7,8 @@ function main()
{
echo "start:`date +%T`"
#time iozone -i 0 -i 1 -i 2 -i 3 -i 4 -i 5 -i 6 -i 7 -i 8 -i 9 -i 10 -i 11 -i 12 -s $FILE_SIZE -r $RECORD_SIZE 2>&1 1>>$LOG_FILE 1>>/tmp/iozone
- time iozone -i 0 -i 1 -i 2 -i 3 -i 4 -i 5 -i 6 -i 7 -i 8 -i 9 -i 10 -i 11 -i 12 -s 1m -r 22k 2>&1 1>>$LOG_FILE 1>>/tmp/iozone
+ #time iozone -i 0 -i 1 -i 2 -i 3 -i 4 -i 5 -i 6 -i 7 -i 8 -i 9 -i 10 -i 11 -i 12 -s 1m -r 22k 2>&1 1>>$LOG_FILE 1>>/tmp/iozone
+ time iozone -a 2>&1 1>>$LOG_FILE 1>>/tmp/iozone
if [ $? -ne 0 ]; then
echo "end:`date +%T`"
return 11;
diff --git a/sanity/system_light/scripts/kernel.sh~ b/sanity/system_light/scripts/kernel.sh~
deleted file mode 100755
index 863e3b7..0000000
--- a/sanity/system_light/scripts/kernel.sh~
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-#This script 1st searches in the pwd for the kernel tar file. If its not there then based on the value of the vriable KERNEL_PATH it either searches from the path given or searches in http://www.kernel.org
-
-function main()
-{
- if [ -e "linux-$VERSION.tar.bz2" ]
- then
- echo "start:`date +%T`"
- time $SCRIPTS_PATH/kernel_compile.sh linux-$VERSION.tar.bz2 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
- err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- elif [ -z "$KERNEL_PATH" ]
- then
- time $SCRIPTS_PATH/kernel_compile.sh 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
- err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- else
- time $SCRIPTS_PATH/kernel_compile.sh $KERNEL_PATH 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
- err=$?
- echo "end:`date +%T`"
- return 11;
- else
- echo "end:`date +%T`"
- return 0;
- fi
- fi;
-}
-
-main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/locks/locks.sh b/sanity/system_light/scripts/locks/locks.sh
new file mode 100755
index 0000000..8dce136
--- /dev/null
+++ b/sanity/system_light/scripts/locks/locks.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+function main()
+{
+ locks_dirname=$(dirname $LOCK_BIN);
+ cp $locks_dirname/test $LOCK_TEST_FILE;
+
+ $TOOLDIR/locks_run.sh;
+ if [ $? -eq 0 ]; then
+ rm $LOCK_TEST_FILE;
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@"; \ No newline at end of file
diff --git a/sanity/system_light/scripts/locks.sh b/sanity/system_light/scripts/locks/locks_run.sh
index 2c3db0e..cba6ede 100755
--- a/sanity/system_light/scripts/locks.sh
+++ b/sanity/system_light/scripts/locks/locks_run.sh
@@ -1,32 +1,32 @@
#!/bin/bash
# GOAL : This tests try to stress fcntl locking functions. A master process set a lock on a file region (byte range locking).
-# * Some slaves process tries to perform operations on this region, like read, write, set a new lock ... Expected results of this
+# * Some slaves process tries to perform operations on this region, like read, write, set a new lock ... Expected results of this
# * operations are known. If the operation result is the same as the expected one, the test sucess, else it fails.
function main()
{
echo "testing the locking through concurrent processes:`date +%T`"
- time $LOCK_BIN -n $CON_PROC -f $LOCK_TEST_FILE 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LOCK_BIN -n $CON_PROC -f $LOCK_TEST_FILE 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -ne 0 ]; then
echo "locks by processes failed:`date +%T`"
err=11
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
err=0
fi
-
+
echo "DONE"
-
+
echo "testing the locking through concurrent threads:`date +%T`"
- time $LOCK_BIN -n $CON_PROC -f $LOCK_TEST_FILE -T 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LOCK_BIN -n $CON_PROC -f $LOCK_TEST_FILE -T 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -ne 0 ]; then
echo "locks by threads failed:`date +%T`"
return 11;
else
- echo "end threads:`date +%T`"
+ echo "end threads:`date +%T`"
if [ $err -ne 0 ]; then
return 11;
else
diff --git a/sanity/system_light/scripts/ltp/ltp.sh b/sanity/system_light/scripts/ltp/ltp.sh
new file mode 100755
index 0000000..819e689
--- /dev/null
+++ b/sanity/system_light/scripts/ltp/ltp.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+function main ()
+{
+
+ ### test this part later #####
+ #old_PWD=$PWD;
+ ### test the above part later #####
+
+ mkdir ltp;
+ cd ltp;
+
+ $TOOLDIR/ltp_run.sh;
+ if [ $? -eq 0 ]; then
+ rm -rfv ltp && echo "removed ltp directories";
+ return 0;
+ else
+ return 1;
+ fi
+
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/ltp_test.sh b/sanity/system_light/scripts/ltp/ltp_run.sh
index a4242b6..515e421 100755
--- a/sanity/system_light/scripts/ltp_test.sh
+++ b/sanity/system_light/scripts/ltp/ltp_run.sh
@@ -13,7 +13,7 @@ run_fs_perms_simpletest ()
#cp $LTP_DIR/fs_perms/fs_perms.sh .
cp $LTP_DIR/fs_perms/fs_perms .
cp $LTP_DIR/fs_perms/testx .
- time $LTP_DIR/fs_perms/fs_perms_simpletest.sh 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/fs_perms/fs_perms_simpletest.sh 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -27,7 +27,7 @@ run_fs_perms_simpletest ()
run_lftest ()
{
echo "Executing $LTP_DIR/lftest/lftest"
- time $LTP_DIR/lftest/lftest 5000 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/lftest/lftest 5000 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -55,8 +55,8 @@ run_stream1 ()
run_stream2 ()
{
echo "Executing $LTP_DIR/stream/stream02"
- time $LTP_DIR/stream/stream02 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/stream/stream02 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -69,8 +69,8 @@ run_stream2 ()
run_stream3 ()
{
echo "Executing $LTP_DIR/stream/stream03"
- time $LTP_DIR/stream/stream03 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/stream/stream03 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -83,8 +83,8 @@ run_stream3 ()
run_stream4 ()
{
echo "Executing $LTP_DIR/stream/stream04"
- time $LTP_DIR/stream/stream04 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/stream/stream04 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -97,7 +97,7 @@ run_stream4 ()
run_stream5 ()
{
echo "Executing $LTP_DIR/stream/stream05"
- time $LTP_DIR/stream/stream05 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/stream/stream05 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -120,7 +120,7 @@ run_stream ()
run_openfile ()
{
echo "Executing $LTP_DIR/openfile/openfile"
- time $LTP_DIR/openfile/openfile -f 100 -t 100 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/openfile/openfile -f 100 -t 100 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -134,7 +134,7 @@ run_openfile ()
run_inode1 ()
{
echo "Executing $LTP_DIR/inode/inode01"
- time $LTP_DIR/inode/inode01 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/inode/inode01 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -148,7 +148,7 @@ run_inode1 ()
run_inode2 ()
{
echo "Executing $LTP_DIR/inode/inode02"
- time $LTP_DIR/inode/inode02 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/inode/inode02 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -168,8 +168,8 @@ run_inode ()
run_ftest1 ()
{
echo "Executing $LTP_DIR/ftest/ftest01"
- time $LTP_DIR/ftest/ftest01 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/ftest/ftest01 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -182,8 +182,8 @@ run_ftest1 ()
run_ftest2 ()
{
echo "Executing $LTP_DIR/ftest/ftest02"
- time $LTP_DIR/ftest/ftest02 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/ftest/ftest02 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -196,7 +196,7 @@ run_ftest2 ()
run_ftest3 ()
{
echo "Executing $LTP_DIR/ftest/ftest03"
- time $LTP_DIR/ftest/ftest03 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/ftest/ftest03 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -210,7 +210,7 @@ run_ftest3 ()
run_ftest4 ()
{
echo "Executing $LTP_DIR/ftest/ftest04"
- time $LTP_DIR/ftest/ftest04 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/ftest/ftest04 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -224,8 +224,8 @@ run_ftest4 ()
run_ftest5 ()
{
echo "Executing $LTP_DIR/ftest/ftest05"
- time $LTP_DIR/ftest/ftest05 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/ftest/ftest05 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -238,8 +238,8 @@ run_ftest5 ()
run_ftest6 ()
{
echo "Executing $LTP_DIR/ftest/ftest06"
- time $LTP_DIR/ftest/ftest06 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/ftest/ftest06 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -252,8 +252,8 @@ run_ftest6 ()
run_ftest7 ()
{
echo "Executing $LTP_DIR/ftest/ftest07"
- time $LTP_DIR/ftest/ftest07 2>>$LOG_FILE 1>>$LOG_FILE
-
+ time $LTP_DIR/ftest/ftest07 2>>$LOG_FILE 1>>$LOG_FILE
+
if [ $? -eq 0 ]; then
let PASS=$PASS+1
echo $PASS
@@ -266,7 +266,7 @@ run_ftest7 ()
run_ftest8 ()
{
echo "Executing $LTP_DIR/ftest/ftest08"
- time $LTP_DIR/ftest/ftest08 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/ftest/ftest08 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -292,7 +292,7 @@ run_ftest ()
run_fsstress ()
{
echo "Executing $LTP_DIR/fsstress/fsstress"
- time $LTP_DIR/fsstress/fsstress -d $THIS_TEST_DIR -l 22 -n 22 -p 22 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/fsstress/fsstress -d $THIS_TEST_DIR -l 22 -n 22 -p 22 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
@@ -306,7 +306,7 @@ run_fsstress ()
run_fs_inod ()
{
echo "Executing $LTP_DIR/fs_inod/fs_inod"
- time $LTP_DIR/fs_inod/fs_inod $THIS_TEST_DIR 22 22 22 2>>$LOG_FILE 1>>$LOG_FILE
+ time $LTP_DIR/fs_inod/fs_inod $THIS_TEST_DIR 22 22 22 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -eq 0 ]; then
let PASS=$PASS+1
diff --git a/sanity/system_light/scripts/ltp_test.sh~ b/sanity/system_light/scripts/ltp_test.sh~
deleted file mode 100755
index 090b663..0000000
--- a/sanity/system_light/scripts/ltp_test.sh~
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/bin/bash
-
-_init ()
-{
- TOTAL=20;
- PASS=0;
-}
-
-
-run_fs_perms_simpletest ()
-{
- echo "Executing $LTP_DIR/fs_perms/fs_perms_simpletest.sh"
-#cp $LTP_DIR/fs_perms/fs_perms.sh .
- cp $LTP_DIR/fs_perms/fs_perms .
- cp $LTP_DIR/fs_perms/testx .
- time $LTP_DIR/fs_perms/fs_perms_simpletest.sh 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "fs_perms_simpletest failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_lftest ()
-{
- echo "Executing $LTP_DIR/lftest/lftest"
- time $LTP_DIR/lftest/lftest 5000 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "lftest failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream1 ()
-{
- echo "Executing $LTP_DIR/stream/stream01"
- time $LTP_DIR/stream/stream01 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "stream01 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream2 ()
-{
- echo "Executing $LTP_DIR/stream/stream02"
- time $LTP_DIR/stream/stream02 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "stream02 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream2 ()
-{
- echo "Executing $LTP_DIR/stream/stream03"
- time $LTP_DIR/stream/stream03 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "stream03 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream4 ()
-{
- echo "Executing $LTP_DIR/stream/stream04"
- time $LTP_DIR/stream/stream04 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "stream04 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream5 ()
-{
- echo "Executing $LTP_DIR/stream/stream05"
- time $LTP_DIR/stream/stream05 -c 22 -i 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "stream05 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_stream ()
-{
- run_stream1;
- run_stream2;
- run_stream3;
- run_stream4;
- run_stream5;
-}
-
-run_openfile ()
-{
- echo "Executing $LTP_DIR/openfile/openfile"
- time $LTP_DIR/openfile/openfile -f 100 -t 100 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "openfile failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_inode1 ()
-{
- echo "Executing $LTP_DIR/inode/inode01"
- time $LTP_DIR/inode/inode01 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "inode01 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_inode2 ()
-{
- echo "Executing $LTP_DIR/inode/inode02"
- time $LTP_DIR/inode/inode02 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "inode02 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_inode ()
-{
- run_inode1;
- run_inode2;
-}
-
-run_ftest1 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest01"
- time $LTP_DIR/ftest/ftest01 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest01 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest2 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest02"
- time $LTP_DIR/ftest/ftest02 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest02 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest3 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest03"
- time $LTP_DIR/ftest/ftest03 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest03 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest4 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest04"
- time $LTP_DIR/ftest/ftest04 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest04 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest5 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest05"
- time $LTP_DIR/ftest/ftest05 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest05 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest6 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest06"
- time $LTP_DIR/ftest/ftest06 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest06 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest7 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest07"
- time $LTP_DIR/ftest/ftest07 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest07 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest8 ()
-{
- echo "Executing $LTP_DIR/ftest/ftest08"
- time $LTP_DIR/ftest/ftest08 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "ftest08 failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_ftest ()
-{
- run_ftest1;
- run_ftest2;
- run_ftest3;
- run_ftest4;
- run_ftest5;
- run_ftest6;
- run_ftest7;
- run_ftest8;
-}
-
-run_fsstress ()
-{
- echo "Executing $LTP_DIR/fsstress/fsstress"
- time $LTP_DIR/fsstress/fsstress -d $THIS_TEST_DIR -l 22 -n 22 -p 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "fsstress failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-run_fs_inod ()
-{
- echo "Executing $LTP_DIR/fs_inod/fs_inod"
- time $LTP_DIR/fs_inod/fs_inod $THIS_TEST_DIR 22 22 22 2>>$LOG_FILE 1>>$LOG_FILE
-
- if [ $? -eq 0 ]; then
- let PASS=$PASS+1
- echo $PASS
- else
- echo "fs_inod failed:$(date +%T)"
- echo $PASS
- fi
-}
-
-main ()
-{
- echo "start ltp tests:$(date +%T)";
- run_fs_perms_simpletest;
- run_lftest;
- run_stream;
- run_openfile;
- run_inode;
- run_ftest;
- run_fsstress;
- run_fs_inod;
- echo "end ltp tests: $(date +%T)";
- echo "total $PASS tests were successful out of $TOTAL tests"
-}
-
-_init && main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/multiple_files.sh b/sanity/system_light/scripts/multiple_files/multiple_files.sh
index 8f36b5f..94b859e 100755
--- a/sanity/system_light/scripts/multiple_files.sh
+++ b/sanity/system_light/scripts/multiple_files/multiple_files.sh
@@ -6,16 +6,16 @@ function main ()
{
mkdir test
cd test
-
+
echo "start:`date +%T`"
for i in `seq 1 $NUM_OF_FILES` ; do
dd if=/dev/zero of=file$i bs=10K count=1 1>/dev/null 2>/dev/null
- done
+ done
echo "end:`date +%T`"
echo "Creation of $NUM_OF_FILES done"
-
- TOTAL_FILES=$(ls | wc -l)
+
+ TOTAL_FILES=$(ls | wc -l)
if [ $TOTAL_FILES -ne $NUM_OF_FILES ]; then
echo "Total files created is not $NUM_OF_FILES"
@@ -23,9 +23,9 @@ function main ()
else
err=0
fi
-
+
echo "Removing all the files"
-
+
for i in `seq 1 $NUM_OF_FILES` ; do
rm file$i
done
diff --git a/sanity/system_light/scripts/openssl/openssl.sh b/sanity/system_light/scripts/openssl/openssl.sh
new file mode 100755
index 0000000..5289945
--- /dev/null
+++ b/sanity/system_light/scripts/openssl/openssl.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+function main()
+{
+ $TOOLDIR/openssl_run.sh;
+ if [ $? -eq 0 ]; then
+ rm -rf openssl* && echo "removed openssl directories and files";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@";
diff --git a/sanity/system_light/scripts/open.sh b/sanity/system_light/scripts/openssl/openssl_run.sh
index 366c3a7..6ec8893 100755
--- a/sanity/system_light/scripts/open.sh
+++ b/sanity/system_light/scripts/openssl/openssl_run.sh
@@ -6,35 +6,35 @@ function main()
{
echo "untarring the openssl tarball"
echo "start:`date +%T`"
- time tar -xvf $OPENSSL_TAR_FILE 2>>$LOG_FILE 1>>$LOG_FILE
+ time tar -xvf $OPENSSL_TAR_FILE 2>>$LOG_FILE 1>>$LOG_FILE
cd $OPENSSL_DIR
if [ -z "$PREFIX" -a -z "$OPENSSLDIR" ]; then
echo "executing ./config:`date +%T`"
- time ./config 2>>$LOG_FILE 1>>$LOG_FILE
+ time ./config 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "./config failed:`date +%T`"
return 11;
- fi
+ fi
else
echo "executing ./config with prefix:`date +%T`"
- time ./config --prefix=$PREFIX --openssldir=$OPENSSLDIR 2>>$LOG_FILE 1>>$LOG_FILE
+ time ./config --prefix=$PREFIX --openssldir=$OPENSSLDIR 2>>$LOG_FILE 1>>$LOG_FILE
if [ $? -ne 0 ]; then
echo "config prefix failed:`date +%T`"
return 11;
fi
fi
-
+
echo "executing make:`date +%T`"
- time make 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
+ time make 2>>$LOG_FILE 1>>$LOG_FILE
+ if [ $? -ne 0 ]; then
echo "make failed:`date +%T`"
return 11
fi
-
+
echo "executing make test:`date +%T`"
- time make test 2>>$LOG_FILE 1>>$LOG_FILE
- if [ $? -ne 0 ]; then
+ time make test 2>>$LOG_FILE 1>>$LOG_FILE
+ if [ $? -ne 0 ]; then
echo "make test failed:`date +%T`"
return 11;
else
diff --git a/sanity/system_light/scripts/posix_compliance.sh b/sanity/system_light/scripts/posix_compliance.sh
deleted file mode 100755
index 69c8dcd..0000000
--- a/sanity/system_light/scripts/posix_compliance.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#! /bin/bash
-
-(time prove -r $DIR/tests "$@" | tee -a /tmp/posix
-
-grep FAILED /tmp/posix 2> /dev/null) 2>>$LOG_FILE 1>>$LOG_FILE
-
diff --git a/sanity/system_light/scripts/posix_compliance/posix_compliance.sh b/sanity/system_light/scripts/posix_compliance/posix_compliance.sh
new file mode 100755
index 0000000..203c04b
--- /dev/null
+++ b/sanity/system_light/scripts/posix_compliance/posix_compliance.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/posix_compliance_run.sh;
+ if [ $? -eq 0 ]; then
+ rm -rf fstest_* && echo "removed posix compliance directories";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/posix_compliance/posix_compliance_run.sh b/sanity/system_light/scripts/posix_compliance/posix_compliance_run.sh
new file mode 100755
index 0000000..c1301ff
--- /dev/null
+++ b/sanity/system_light/scripts/posix_compliance/posix_compliance_run.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+function main ()
+{
+ echo "start: `date +%T`";
+ time prove -r $DIR/tests "$@" | tee -a /tmp/posix 2>/dev/null 1>/dev/null;
+ cat /tmp/posix && sleep 2;
+ grep FAILED /tmp/posix 2>>$LOG_FILE 1>>$LOG_FILE
+
+ if [ $? -ne 0 ]; then
+ echo "end: `date +%T`";
+ return 0;
+ else
+ echo "end: `date +%T`";
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/postmark.sh b/sanity/system_light/scripts/postmark/postmark.sh
index 51ce440..51ce440 100755
--- a/sanity/system_light/scripts/postmark.sh
+++ b/sanity/system_light/scripts/postmark/postmark.sh
diff --git a/sanity/system_light/scripts/read_large/read_large.sh b/sanity/system_light/scripts/read_large/read_large.sh
new file mode 100755
index 0000000..98d40ce
--- /dev/null
+++ b/sanity/system_light/scripts/read_large/read_large.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function main ()
+{
+ $TOOLDIR/read_large_run.sh;
+
+ if [ $? -eq 0 ]; then
+ rm $PWD/$OF && echo "Removed large file";
+ return 0;
+ else
+ return 1;
+ fi
+}
+
+main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/read_large.sh b/sanity/system_light/scripts/read_large/read_large_run.sh
index 7a315a0..457581f 100755
--- a/sanity/system_light/scripts/read_large.sh
+++ b/sanity/system_light/scripts/read_large/read_large_run.sh
@@ -2,6 +2,8 @@
function main()
{
+ dd if=/dev/zero of=$PWD/$OF bs=$BS_SIZE count=$DD_CNT;
+
echo "start:`date +%T`"
time cat $LARGE_FILE_SOURCE > $LARGE_FILE_DEST 2>>$LOG_FILE 1>>$LOG_FILE
diff --git a/sanity/system_light/scripts/rpc-fops.sh~ b/sanity/system_light/scripts/rpc-fops.sh~
deleted file mode 100644
index 07d2b89..0000000
--- a/sanity/system_light/scripts/rpc-fops.sh~
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-function main ()
-{
- set -x;
- SCRIPTS_DIR=$(dirname $0);
-
- echo "start: $(date +%T)";
- #time $SCRIPTS_PATH/rpc-coverage.sh $THIS_TEST_DIR 2>>$LOG_FILE 1>>$LOG_FILE;
- time $SCRIPTS_DIR/rpc-coverage.sh $THIS_TEST_DIR 2>>$LOG_FILE 1>>$LOG_FILE;
- if [ $? -ne 0 ]; then
- echo "end: $(date +%T)";
- return 22;
- else
- echo "end: $(date +%T)";
- return 0;
- fi
-}
-
-main "$@" \ No newline at end of file
diff --git a/sanity/system_light/scripts/rpc-coverage.sh b/sanity/system_light/scripts/rpc/rpc-coverage.sh
index ebb92a2..ebb92a2 100755
--- a/sanity/system_light/scripts/rpc-coverage.sh
+++ b/sanity/system_light/scripts/rpc/rpc-coverage.sh
diff --git a/sanity/system_light/scripts/rpc-fops.sh b/sanity/system_light/scripts/rpc/rpc.sh
index 07ad9d6..07ad9d6 100755
--- a/sanity/system_light/scripts/rpc-fops.sh
+++ b/sanity/system_light/scripts/rpc/rpc.sh
diff --git a/sanity/system_light/scripts/syscallbench.sh b/sanity/system_light/scripts/syscallbench/syscallbench.sh
index c257e41..ac49b23 100755
--- a/sanity/system_light/scripts/syscallbench.sh
+++ b/sanity/system_light/scripts/syscallbench/syscallbench.sh
@@ -1,7 +1,7 @@
#!/bin/bash
function update_tools()
-{
+{
cd $TOOL_DIR
echo "In $TOOL_DIR"
git pull
@@ -25,7 +25,7 @@ function main()
echo "start:`date +%T`"
syscall_test;
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
fi
}
diff --git a/sanity/system_light/scripts/tiobench.sh b/sanity/system_light/scripts/tiobench/tiobench.sh
index 593bf6a..1a86bf3 100755
--- a/sanity/system_light/scripts/tiobench.sh
+++ b/sanity/system_light/scripts/tiobench/tiobench.sh
@@ -4,12 +4,12 @@ function main ()
{
echo "start:`date +%T`"
time $TIO_BIN -d $THIS_TEST_DIR -W -S -c 2>>$LOG_FILE 1>>$LOG_FILE
-
+
if [ $? -ne 0 ]; then
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 11;
else
- echo "end:`date +%T`"
+ echo "end:`date +%T`"
return 0;
fi
}