ocfs2-test: misc improvements and trivial fixes
cover ocfs2-test: misc improvements and trivial fixes
- Misc trivial fixes:
[PATCH 01/17] ocfs2 test: correct the check on testcase if supported [PATCH 02/17] Single Run: kernel building is little broken now [PATCH 03/17] Trivial: better not to depend on where we issue testing [PATCH 04/17] Trivial: fix a typo mistake
[PATCH 05/17] Trivial: fix checking empty return value [PATCH 06/17] multi_mmap: make log messages go to right place [PATCH 07/17] lvb_torture: failed when pcmk is used as cluster stack [PATCH 08/17] multiple node: pass cross_delete the right log file
- This patches add two more parameters: blocksize and clustersize when we kick off a testing, which shortens the run time of a testing round. It will keep the old behaviors if they are not specified.
[PATCH 09/17] Single run: make blocksize and clustersize as [PATCH 10/17] Multiple run: make blocksize and clustersize as [PATCH 11/17] discontig bg: make blocksize and clustersize as
- This patch reflects the mkfs.ocfs2 changes that "--cluster-stack" and "--cluster-name" were added.
[PATCH 12/17] Add two cluster-aware parameters: cluster stack and cluster name
- More misc trival fixes:
[PATCH 13/17] Save punch_hole details into logfile for debugging [PATCH 14/17] Fix openmpi warning by specifying proper slot number [PATCH 15/17] Handle the case when a symbolic link device is given [PATCH 16/17] inline data: fix build error
[PATCH 17/17] discontig bg: give single and multiple node test
Comments and questions are, as always, welcome.
Thanks,
Eric
PATCH 1/17 ocfs2 test: correct the check on testcase if supported
--- programs/python_common/multiple_run.sh | 2 +- programs/python_common/single_run-WIP.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
programs/python_common/multiple_run.sh +1 -1
@@ -201,7 +201,7 @@ f_setup() fi SUPPORTED_TESTCASES="all xattr inline reflink write_append_truncate multi_mmap create_racer flock_unit cross_delete open_delete lvb_torture" - for cas in ${TESTCASES}; do + for cas in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do echo ${SUPPORTED_TESTCASES} | grep -sqw $cas if [ $? -ne 0 ]; then echo "testcase [${cas}] not supported."
programs/python_common/single_run-WIP.sh +1 -1
@@ -997,7 +997,7 @@ fi SUPPORTED_TESTCASES="all create_and_open directaio fillverifyholes renamewriterace aiostress\ filesizelimits mmaptruncate buildkernel splice sendfile mmap reserve_space inline xattr\ reflink mkfs tunefs backup_super filecheck" -for cas in ${TESTCASES}; do +for cas in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do echo ${SUPPORTED_TESTCASES} | grep -sqw $cas if [ $? -ne 0 ]; then echo "testcase [${cas}] not supported."
Signature · 1 line
2.6.6
PATCH 1/17 ocfs2 test: correct the check on testcase if supported
Quoted 1 line · Eric Ren
Signed-off-by Eric Ren <[email protected]>
Quoted 32 lines
--- programs/python_common/multiple_run.sh | 2 +- programs/python_common/single_run-WIP.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)programs/python_common/multiple_run.sh +1
-1@@ -201,7 +201,7 @@ f_setup() fi SUPPORTED_TESTCASES="all xattr inline reflink write_append_truncate multi_mmap create_racer flock_unit cross_delete open_delete lvb_torture" - for cas in ${TESTCASES}; do + for cas in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do echo ${SUPPORTED_TESTCASES} | grep -sqw $cas if [ $? -ne 0 ]; then echo "testcase [${cas}] not supported."programs/python_common/single_run-WIP.sh +1
-1@@ -997,7 +997,7 @@ fi SUPPORTED_TESTCASES="all create_and_open directaio fillverifyholes renamewriterace aiostress\ filesizelimits mmaptruncate buildkernel splice sendfile mmap reserve_space inline xattr\ reflink mkfs tunefs backup_super filecheck" -for cas in ${TESTCASES}; do +for cas in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do echo ${SUPPORTED_TESTCASES} | grep -sqw $cas if [ $? -ne 0 ]; then echo "testcase [${cas}] not supported."
PATCH 2/17 Single Run: kernel building is little broken now
In reply to Eric RenOnly check kernel source if we specify "buildkernel" test case. The original kernel source web-link cannot be reached, so give a new link instead but the md5sum check is missing now.
--- programs/python_common/single_run-WIP.sh | 56 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-)
programs/python_common/single_run-WIP.sh +28 -28
@@ -20,9 +20,9 @@ WGET=`which wget` WHOAMI=`which whoami` SED=`which sed` -DWNLD_PATH="http://oss.oracle.com/~smushran/ocfs2-test" -KERNEL_TARBALL="linux-kernel.tar.gz" -KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum" +DWNLD_PATH="https://cdn.kernel.org/pub/linux/kernel/v3.x/" +KERNEL_TARBALL="linux-3.2.80.tar.xz" +#KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum" USERID=`${WHOAMI}` DEBUGFS_BIN="${SUDO} `which debugfs.ocfs2`"
@@ -85,7 +85,7 @@ get_bits() # get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK get_kernel_source() { - if [ "$#" -lt "4" ]; then + if [ "$#" -lt "3" ]; then ${ECHO} "Error in get_kernel_source()" exit 1 fi
@@ -93,18 +93,18 @@ get_kernel_source() logdir=$1 dwnld_path=$2 kernel_tarball=$3 - kernel_tarball_check=$4 + #kernel_tarball_check=$4 cd ${logdir} outlog=get_kernel_source.log - ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} - if [ $? -ne 0 ]; then - ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" - cd - - exit 1 - fi +# ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" +# cd - +# exit 1 +# fi ${WGET} -a ${outlog} ${dwnld_path}/${kernel_tarball} if [ $? -ne 0 ]; then
@@ -113,13 +113,13 @@ get_kernel_source() exit 1 fi - ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 - if [ $? -ne 0 ]; then - ${ECHO} "ERROR ${kernel_tarball_check} check failed" - cd - - exit 1 - fi - cd - +# ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR ${kernel_tarball_check} check failed" +# cd - +# exit 1 +# fi +# cd - } # do_format() ${BLOCKSIZE} ${CLUSTERSIZE} ${FEATURES} ${DEVICE}
@@ -1012,16 +1012,6 @@ LOGFILE=${LOGDIR}/single_run.log do_mkdir ${LOGDIR} -if [ -z ${KERNELSRC} ]; then - get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK - KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} -fi - -if [ ! -f ${KERNELSRC} ]; then - ${ECHO} "No kernel source" - usage -fi - STARTRUN=$(date +%s) log_message "*** Start Single Node test ***"
@@ -1058,6 +1048,16 @@ for tc in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do fi if [ "$tc"X = "buildkernel"X -o "$tc"X = "all"X ];then + if [ -z ${KERNELSRC} ]; then + get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL #$KERNEL_TARBALL_CHECK + KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} + fi + + if [ ! -f ${KERNELSRC} ]; then + ${ECHO} "No kernel source" + usage + fi + run_buildkernel ${LOGDIR} ${DEVICE} ${MOUNTPOINT} ${KERNELSRC} fi
Signature · 1 line
2.6.6
PATCH 2/17 Single Run: kernel building is little broken now
Quoted 15 lines · Eric Ren
Only check kernel source if we specify "buildkernel" test case. The original kernel source web-link cannot be reached, so give a new link instead but the md5sum check is missing now.
Signed-off-by Eric Ren <[email protected]>--- programs/python_common/single_run-WIP.sh | 56 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-)programs/python_common/single_run-WIP.sh +0
-0
programs/python_common/single_run-WIP.sh WGET=`which wget` · line 25
Quoted 9 lines
programs/python_common/single_run-WIP.sh +3
-3@@ -20,9 +20,9 @@ WGET=`which wget` WHOAMI=`which whoami` SED=`which sed` -DWNLD_PATH="http://oss.oracle.com/~smushran/ocfs2-test" -KERNEL_TARBALL="linux-kernel.tar.gz" -KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum" +DWNLD_PATH="https://cdn.kernel.org/pub/linux/kernel/v3.x/" +KERNEL_TARBALL="linux-3.2.80.tar.xz" +#KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum"
Can we compute the md5sum manually and put it here?
Thanks,
Junxiao.
Quoted 94 lines
programs/python_common/single_run-WIP.sh +25
-25USERID=`${WHOAMI}` DEBUGFS_BIN="${SUDO} `which debugfs.ocfs2`"@@ -85,7 +85,7 @@ get_bits() # get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK get_kernel_source() { - if [ "$#" -lt "4" ]; then + if [ "$#" -lt "3" ]; then ${ECHO} "Error in get_kernel_source()" exit 1 fi@@ -93,18 +93,18 @@ get_kernel_source() logdir=$1 dwnld_path=$2 kernel_tarball=$3 - kernel_tarball_check=$4 + #kernel_tarball_check=$4 cd ${logdir} outlog=get_kernel_source.log - ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} - if [ $? -ne 0 ]; then - ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" - cd - - exit 1 - fi +# ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" +# cd - +# exit 1 +# fi ${WGET} -a ${outlog} ${dwnld_path}/${kernel_tarball} if [ $? -ne 0 ]; then@@ -113,13 +113,13 @@ get_kernel_source() exit 1 fi - ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 - if [ $? -ne 0 ]; then - ${ECHO} "ERROR ${kernel_tarball_check} check failed" - cd - - exit 1 - fi - cd - +# ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR ${kernel_tarball_check} check failed" +# cd - +# exit 1 +# fi +# cd - } # do_format() ${BLOCKSIZE} ${CLUSTERSIZE} ${FEATURES} ${DEVICE}@@ -1012,16 +1012,6 @@ LOGFILE=${LOGDIR}/single_run.log do_mkdir ${LOGDIR} -if [ -z ${KERNELSRC} ]; then - get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK - KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} -fi - -if [ ! -f ${KERNELSRC} ]; then - ${ECHO} "No kernel source" - usage -fi - STARTRUN=$(date +%s) log_message "*** Start Single Node test ***"@@ -1058,6 +1048,16 @@ for tc in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do fi if [ "$tc"X = "buildkernel"X -o "$tc"X = "all"X ];then + if [ -z ${KERNELSRC} ]; then + get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL #$KERNEL_TARBALL_CHECK + KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} + fi + + if [ ! -f ${KERNELSRC} ]; then + ${ECHO} "No kernel source" + usage + fi + run_buildkernel ${LOGDIR} ${DEVICE} ${MOUNTPOINT} ${KERNELSRC} fi
PATCH 2/17 Single Run: kernel building is little broken now
Hi Junxiao,
Quoted 19 lines · Junxiao Bi
Quoted 18 lines · Eric Ren
Only check kernel source if we specify "buildkernel" test case. The original kernel source web-link cannot be reached, so give a new link instead but the md5sum check is missing now.
Signed-off-by Eric Ren <[email protected]>--- programs/python_common/single_run-WIP.sh | 56 ++++++++++++++++---------------- 1 file changed, 28 insertions(+), 28 deletions(-)programs/python_common/single_run-WIP.sh +0
-0@@ -20,9 +20,9 @@ WGET=`which wget` WHOAMI=`which whoami` SED=`which sed`
Quoted 7 lines
programs/python_common/single_run-WIP.sh WGET=`which wget` · line 25
Quoted 6 lines
programs/python_common/single_run-WIP.sh +3
-3-DWNLD_PATH="http://oss.oracle.com/~smushran/ocfs2-test" -KERNEL_TARBALL="linux-kernel.tar.gz" -KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum" +DWNLD_PATH="https://cdn.kernel.org/pub/linux/kernel/v3.x/" +KERNEL_TARBALL="linux-3.2.80.tar.xz" +#KERNEL_TARBALL_CHECK="${KERNEL_TARBALL}.md5sum"Can we compute the md5sum manually and put it here?
OK.
Thanks for your review.
Thanks,
Eric
Quoted 99 lines
Thanks,
Junxiao.Quoted 94 lines
programs/python_common/single_run-WIP.sh +25
-25USERID=`${WHOAMI}` DEBUGFS_BIN="${SUDO} `which debugfs.ocfs2`"@@ -85,7 +85,7 @@ get_bits() # get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK get_kernel_source() { - if [ "$#" -lt "4" ]; then + if [ "$#" -lt "3" ]; then ${ECHO} "Error in get_kernel_source()" exit 1 fi@@ -93,18 +93,18 @@ get_kernel_source() logdir=$1 dwnld_path=$2 kernel_tarball=$3 - kernel_tarball_check=$4 + #kernel_tarball_check=$4 cd ${logdir} outlog=get_kernel_source.log - ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} - if [ $? -ne 0 ]; then - ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" - cd - - exit 1 - fi +# ${WGET} -o ${outlog} ${dwnld_path}/${kernel_tarball_check} +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR downloading ${dwnld_path}/${kernel_tarball_check}" +# cd - +# exit 1 +# fi ${WGET} -a ${outlog} ${dwnld_path}/${kernel_tarball} if [ $? -ne 0 ]; then@@ -113,13 +113,13 @@ get_kernel_source() exit 1 fi - ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 - if [ $? -ne 0 ]; then - ${ECHO} "ERROR ${kernel_tarball_check} check failed" - cd - - exit 1 - fi - cd - +# ${MD5SUM} -c ${kernel_tarball_check} >>${outlog} 2>&1 +# if [ $? -ne 0 ]; then +# ${ECHO} "ERROR ${kernel_tarball_check} check failed" +# cd - +# exit 1 +# fi +# cd - } # do_format() ${BLOCKSIZE} ${CLUSTERSIZE} ${FEATURES} ${DEVICE}@@ -1012,16 +1012,6 @@ LOGFILE=${LOGDIR}/single_run.log do_mkdir ${LOGDIR} -if [ -z ${KERNELSRC} ]; then - get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL $KERNEL_TARBALL_CHECK - KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} -fi - -if [ ! -f ${KERNELSRC} ]; then - ${ECHO} "No kernel source" - usage -fi - STARTRUN=$(date +%s) log_message "*** Start Single Node test ***"@@ -1058,6 +1048,16 @@ for tc in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do fi if [ "$tc"X = "buildkernel"X -o "$tc"X = "all"X ];then + if [ -z ${KERNELSRC} ]; then + get_kernel_source $LOGDIR $DWNLD_PATH $KERNEL_TARBALL #$KERNEL_TARBALL_CHECK + KERNELSRC=${LOGDIR}/${KERNEL_TARBALL} + fi + + if [ ! -f ${KERNELSRC} ]; then + ${ECHO} "No kernel source" + usage + fi + run_buildkernel ${LOGDIR} ${DEVICE} ${MOUNTPOINT} ${KERNELSRC} fi
PATCH 3/17 Trivial: better not to depend on where we issue testing
In reply to Eric RenIf we issue testing outsides directory where executives are, error likes the below may occur:
"./config.sh No such file or directory".
So let's depend on PATH environment rather that.
--- programs/dirop_fileop_racer/racer.sh | 48 +++++++++++----------- programs/dx_dirs_tests/index_dir_run.sh | 2 +- programs/dx_dirs_tests/multi_index_dir_run.sh | 2 +- programs/inline-data/multi-inline-run.sh | 2 +- programs/inline-data/single-inline-run.sh | 2 +- .../inode_alloc_perf_tests/inode_alloc_perf.sh | 2 +- .../multi_inode_alloc_perf.sh | 2 +- .../multi_inode_alloc_perf_runner.sh | 2 +- .../iozone/iozone3_263/src/current/Generate_Graphs | 26 ++++++------ programs/logwriter/enospc.sh | 2 +- programs/logwriter/rename_write_race.sh | 2 +- programs/python_common/o2tf.sh | 2 +- programs/python_common/single_run-WIP.sh | 4 +- programs/python_common/single_run.sh | 2 +- .../tunefs-test/remove-slot/corrupt_remove_slot.sh | 2 +- programs/xattr_tests/xattr-multi-run.sh | 2 +- programs/xattr_tests/xattr-single-run.sh | 2 +- 17 files changed, 53 insertions(+), 53 deletions(-)
programs/dirop_fileop_racer/racer.sh +24 -24
@@ -37,37 +37,37 @@ DIR="race" # [ -e $DIR ] || mkdir $DIR -./file_create.sh $DIR $MAX_FILES & -./file_create.sh $DIR $MAX_FILES & -./file_create.sh $DIR $MAX_FILES & +file_create.sh $DIR $MAX_FILES & +file_create.sh $DIR $MAX_FILES & +file_create.sh $DIR $MAX_FILES & -./dir_create.sh $DIR $MAX_FILES & -./dir_create.sh $DIR $MAX_FILES & -./dir_create.sh $DIR $MAX_FILES & +dir_create.sh $DIR $MAX_FILES & +dir_create.sh $DIR $MAX_FILES & +dir_create.sh $DIR $MAX_FILES & -./file_rename.sh $DIR $MAX_FILES & -./file_rename.sh $DIR $MAX_FILES & -./file_rename.sh $DIR $MAX_FILES & +file_rename.sh $DIR $MAX_FILES & +file_rename.sh $DIR $MAX_FILES & +file_rename.sh $DIR $MAX_FILES & -./file_link.sh $DIR $MAX_FILES & -./file_link.sh $DIR $MAX_FILES & -./file_link.sh $DIR $MAX_FILES & +file_link.sh $DIR $MAX_FILES & +file_link.sh $DIR $MAX_FILES & +file_link.sh $DIR $MAX_FILES & -./file_symlink.sh $DIR $MAX_FILES & -./file_symlink.sh $DIR $MAX_FILES & -./file_symlink.sh $DIR $MAX_FILES & +file_symlink.sh $DIR $MAX_FILES & +file_symlink.sh $DIR $MAX_FILES & +file_symlink.sh $DIR $MAX_FILES & -./file_concat.sh $DIR $MAX_FILES & -./file_concat.sh $DIR $MAX_FILES & -./file_concat.sh $DIR $MAX_FILES & +file_concat.sh $DIR $MAX_FILES & +file_concat.sh $DIR $MAX_FILES & +file_concat.sh $DIR $MAX_FILES & -./file_list.sh $DIR & -./file_list.sh $DIR & -./file_list.sh $DIR & +file_list.sh $DIR & +file_list.sh $DIR & +file_list.sh $DIR & -./file_rm.sh $DIR $MAX_FILES & -./file_rm.sh $DIR $MAX_FILES & -./file_rm.sh $DIR $MAX_FILES & +file_rm.sh $DIR $MAX_FILES & +file_rm.sh $DIR $MAX_FILES & +file_rm.sh $DIR $MAX_FILES & echo "CTRL-C to exit" trap "
programs/dx_dirs_tests/index_dir_run.sh +1 -1
@@ -43,7 +43,7 @@ ################################################################################ # Global Variables ################################################################################ -. ./o2tf.sh +. `dirname ${0}`/o2tf.sh BLOCKSIZE= CLUSTERSIZE=
programs/dx_dirs_tests/multi_index_dir_run.sh +1 -1
@@ -41,7 +41,7 @@ ################################################################################ # Global Variables ################################################################################ -. ./o2tf.sh +. `dirname ${0}`/o2tf.sh BLOCKSIZE= CLUSTERSIZE=
programs/inline-data/multi-inline-run.sh +1 -1
@@ -19,7 +19,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh #MPIRUN="`which mpirun`"
programs/inline-data/single-inline-run.sh +1 -1
@@ -19,7 +19,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh USERNAME=`id -un` GROUPNAME=`id -gn`
programs/inode_alloc_perf_tests/inode_alloc_perf.sh +1 -1
@@ -33,7 +33,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh SUDO="`which sudo` -u root" RM_BIN="`which rm`"
programs/inode_alloc_perf_tests/multi_inode_alloc_perf.sh +1 -1
@@ -33,7 +33,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh #BINDIR=./ SUDO="`which sudo` -u root"
programs/inode_alloc_perf_tests/multi_inode_alloc_perf_runner.sh +1 -1
@@ -31,7 +31,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh SUDO="`which sudo` -u root" RM_BIN="`which rm`"
programs/iozone/iozone3_263/src/current/Generate_Graphs +13 -13
@@ -12,19 +12,19 @@ # Generate data base for all of the operation types. -./gengnuplot.sh $1 write -./gengnuplot.sh $1 rewrite -./gengnuplot.sh $1 read -./gengnuplot.sh $1 reread -./gengnuplot.sh $1 randread -./gengnuplot.sh $1 randwrite -./gengnuplot.sh $1 bkwdread -./gengnuplot.sh $1 recrewrite -./gengnuplot.sh $1 strideread -./gengnuplot.sh $1 fwrite -./gengnuplot.sh $1 frewrite -./gengnuplot.sh $1 fread -./gengnuplot.sh $1 freread +gengnuplot.sh $1 write +gengnuplot.sh $1 rewrite +gengnuplot.sh $1 read +gengnuplot.sh $1 reread +gengnuplot.sh $1 randread +gengnuplot.sh $1 randwrite +gengnuplot.sh $1 bkwdread +gengnuplot.sh $1 recrewrite +gengnuplot.sh $1 strideread +gengnuplot.sh $1 fwrite +gengnuplot.sh $1 frewrite +gengnuplot.sh $1 fread +gengnuplot.sh $1 freread # Produce graphs and postscript results. gnuplot gnu3d.dem
programs/logwriter/enospc.sh +1 -1
@@ -4,7 +4,7 @@ # if [ `dirname ${0}` == '.' ]; then if [ -f config.sh ]; then - . ./config.sh; + . `dirname ${0}`/config.sh fi; else if [ -f `dirname ${0}`/config.sh ]; then
programs/logwriter/rename_write_race.sh +1 -1
@@ -32,7 +32,7 @@ exit 1; } if [ `dirname ${0}` == '.' ]; then if [ -f config.sh ]; then - . ./config.sh; + . `dirname ${0}`/config.sh fi; else if [ -f `dirname ${0}`/config.sh ]; then
programs/python_common/o2tf.sh +1 -1
@@ -25,7 +25,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh MKFS_BIN="`which sudo` -u root `which mkfs.ocfs2`" FSCK_BIN="`which sudo` -u root `which fsck.ocfs2`"
programs/python_common/single_run-WIP.sh +2 -2
@@ -858,14 +858,14 @@ run_reflink_test() #ordered mount option log_start "reflink_test" "ordered" - ./reflink_test_run.sh -o ${logdir} -d ${device} ${mountpoint} || { + reflink_test_run.sh -o ${logdir} -d ${device} ${mountpoint} || { RC=$? log_end ${RC} } #writeback mount option #log_start "reflink_test" "writeback" - #./reflink_test_run.sh -W -o ${logdir} -d ${device} ${mountpoint} + #reflink_test_run.sh -W -o ${logdir} -d ${device} ${mountpoint} RC=$? log_end ${RC} }
programs/python_common/single_run.sh +1 -1
@@ -207,7 +207,7 @@ LogRC $?; # MAIN # # -. ./config.sh +. `dirname ${0}`/config.sh # if [ $# -ne 2 ]; then Usage;
programs/tunefs-test/remove-slot/corrupt_remove_slot.sh +1 -1
@@ -128,7 +128,7 @@ function patch_tunefs() cd $CORRUPT_SRC patch -p1 < $pwd/corrupt_remove_slot.patch exit_if_bad $? 0 "Can't patch the src directory." - ./autogen.sh + autogen.sh make if [ ! -x "$CORRUPT_SRC/tunefs.ocfs2/tunefs.ocfs2" ];then echo "Can't build the specified tunefs.ocfs2."
programs/xattr_tests/xattr-multi-run.sh +1 -1
@@ -36,7 +36,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh RM="`which rm`" MKDIR="`which mkdir`"
programs/xattr_tests/xattr-single-run.sh +1 -1
@@ -35,7 +35,7 @@ PATH=$PATH:/sbin # Add /sbin to the path for ocfs2 tools export PATH=$PATH:. -. ./config.sh +. `dirname ${0}`/config.sh GETXATTR="`which sudo` -u root `which getfattr`" SETXATTR="`which sudo` -u root `which setfattr`"
Signature · 1 line
2.6.6
PATCH 4/17 Trivial: fix a typo mistake
In reply to Eric Ren--- programs/mkfs-tests/mkfs-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
programs/mkfs-tests/mkfs-test.sh +1 -1
@@ -431,7 +431,7 @@ fi; echo "Test ${testnum}: -L mylabel" |tee -a ${LOGFILE} label="my_label_is_very_very_very_long_to_the_point_of_being_useless" echo -n "mkfs ..... " |tee -a ${LOGFILE} -${MKFS} -x -F -b 4K -C 4K -N 1 -L ${label} ${device} 262144 >{OUt} 2>&1 +${MKFS} -x -F -b 4K -C 4K -N 1 -L ${label} ${device} 262144 >${OUT} 2>&1 echo "OK" |tee -a ${LOGFILE} echo -n "verify ..... " |tee -a ${LOGFILE} ${DEBUGFS} -R "stats" ${device} >${OUT} 2>&1
Signature · 1 line
2.6.6
PATCH 5/17 Trivial: fix checking empty return value
In reply to Eric RenWe now get the below error even if "reserve space" testcase succeeds:
"Error in log_end()"
This is because we passed Nil to log_end.
--- programs/python_common/single_run-WIP.sh | 1 + 1 file changed, 1 insertion(+)
programs/python_common/single_run-WIP.sh +1 -0
@@ -781,6 +781,7 @@ run_reserve_space() done do_umount ${mountpoint} + RC=$? log_end ${RC} done
Signature · 1 line
2.6.6
PATCH 6/17 multi_mmap: make log messages go to right place
In reply to Eric RenThe option "--logfile" is missing now. Thus, log
messages go into "o2t.log", which is a apparent
mistake.
--- programs/python_common/multiple_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
programs/python_common/multiple_run.sh +1 -1
@@ -339,7 +339,7 @@ run_multi_mmap_test() local testfile=${workplace}/multi_mmap_test_file run_common_testcase "multi_mmap" "sparse,unwritten,inline-data" \ -"${BINDIR}/run_multi_mmap.py -i 20000 -I ${INTERFACE} -n ${NODE_LIST} -c -b 6000 --hole -f ${testfile}" +"${BINDIR}/run_multi_mmap.py -i 20000 -I ${INTERFACE} -l ${logfile} -n ${NODE_LIST} -c -b 6000 --hole -f ${testfile}" } run_create_racer_test()
Signature · 1 line
2.6.6
PATCH 7/17 lvb_torture: failed when pcmk is used as cluster stack
In reply to Eric RenThis test case failed with "pcmk" stack. Output errors like:
"rank 1: /dlm/ has no write permission." "rank 1: o2dlm_initialize failed: -1485330936".
--- programs/lvb_torture/lvb_torture.c | 110 ++++++++++++++++++++++++++++++++- programs/python_common/multiple_run.sh | 12 +++- 2 files changed, 117 insertions(+), 5 deletions(-)
programs/lvb_torture/lvb_torture.c +107 -3
@@ -180,6 +180,101 @@ static void run_test(struct o2dlm_ctxt *dlm, char *lockid) } } +/* +* Copied from run_test(), this is a ugly but straightforward workaround. +* "fsdlm" is used when using pcmk as cluster stack, which only supports +* 32-bits lvb so far. +*/ +static void run_test_fsdlm (struct o2dlm_ctxt *dlm,char *lockid) +{ +unsigned long long iter =0 ; +unsigned long long expected, to_write =0 ; +int ret; +unsigned int read, written; +errcode_t err; +enum o2dlm_lock_level level; +__u32 lvb; + +while (iter < max_iter && !caught_sig) { + expected = iter; + +if ((iter % num_procs) == rank) + level =O2DLM_LEVEL_EXMODE ; +else + level =O2DLM_LEVEL_PRMODE ; + +if (level ==O2DLM_LEVEL_PRMODE ) { + ret =MPI_Barrier (MPI_COMM_WORLD ); +if (ret !=MPI_SUCCESS ) +rprintf (rank,"read MPI_Barrier failed: %d\n" , ret); + err =o2dlm_lock (dlm, lockid,0 , level); +if (err) +rprintf (rank,"o2dlm_lock failed: %d\n" , err); + + expected++; + }else { + err =o2dlm_lock (dlm, lockid,0 , level); +if (err) +rprintf (rank,"o2dlm_lock failed: %d\n" , err); + + ret =MPI_Barrier (MPI_COMM_WORLD ); +if (ret !=MPI_SUCCESS ) +rprintf (rank,"read MPI_Barrier failed: %d\n" , ret); + to_write = iter +1 ; + } + + err =o2dlm_read_lvb (dlm, lockid, (char *)&lvb,sizeof (lvb), + &read); +if (err) +rprintf (rank,"o2dlm_read_lvb failed: %d\n" , err); + + lvb =be32_to_cpu (lvb); + +if (level ==O2DLM_LEVEL_PRMODE ) +printf ("%s: read iter: %llu, lvb: %llu exp: %llu\n" , + hostname, (unsigned long long )iter, + (unsigned long long )lvb, + (unsigned long long )expected); +else +printf ("%s: write iter: %llu, lvb: %llu wri: %llu\n" , + hostname, (unsigned long long )iter, + (unsigned long long )lvb, + (unsigned long long )to_write); + +fflush (stdout); + +if (lvb != expected) { +printf ("Test failed! %s: rank %d, read lvb %llu, expected %llu\n" , + hostname, rank, (unsigned long long ) lvb, + (unsigned long long ) expected); +MPI_Abort (MPI_COMM_WORLD ,1 ); + } + +if (level ==O2DLM_LEVEL_EXMODE ) { + lvb =cpu_to_be32 (to_write); + + err =o2dlm_write_lvb (dlm, lockid, (char *)&lvb, +sizeof (lvb), &written); +if (err) +rprintf (rank,"o2dlm_write_lvb failed: %d\n" , err); +if (written !=sizeof (lvb)) +rprintf (rank,"o2dlm_write_lvb() wrote %d, we asked for %d\n" , written,sizeof (lvb)); + } + + err =o2dlm_unlock (dlm, lockid); +if (err) +rprintf (rank,"o2dlm_unlock failed: %d\n" , err); + +/* This second barrier is not necessary and can be +* commented out to ramp the test up */ + ret =MPI_Barrier (MPI_COMM_WORLD ); +if (ret !=MPI_SUCCESS ) +rprintf (rank,"unlock MPI_Barrier failed: %d\n" , ret); + + iter++; + } +} +static void clear_lock (struct o2dlm_ctxt *dlm,char *lockid) {char empty[O2DLM_LOCK_ID_MAX_LEN ];
@@ -363,8 +458,7 @@ int main(int argc, char *argv[])printf ("%s: rank: %d, nodes: %d, dlm: %s, dom: %s, lock: %s, iter: %llu\n" , hostname, rank, num_procs, dlmfs_path, domain, lockid, (unsigned long long ) max_iter); - -if (access (dlmfs_path,W_OK ) <0 ) { +if (strcmp (dlmfs_path,"NULL" ) !=0 &&access (dlmfs_path,W_OK ) <0 ) {sleep (2 );rprintf (rank,"%s has no write permission.\n" , dlmfs_path);return EACCES ;
@@ -380,6 +474,13 @@ int main(int argc, char *argv[])rprintf (rank,"start_heartbeat failed\n" ); } +/* +* "pcmk" is used as cluster stack if "NULL" +* is passed here +*/ +if (strcmp (dlmfs_path,"NULL" ) ==0 ) + dlmfs_path =NULL ; + error =o2dlm_initialize (dlmfs_path, domain, &dlm);if (error)rprintf (rank,"o2dlm_initialize failed: %d\n" , error);
@@ -391,7 +492,10 @@ int main(int argc, char *argv[])if (ret !=MPI_SUCCESS )rprintf (rank,"prep MPI_Barrier failed: %d\n" , ret); -run_test (dlm, lockid); +if (dlmfs_path) +run_test (dlm, lockid); +else +run_test_fsdlm (dlm, lockid); error =o2dlm_destroy (dlm);if (error)
programs/python_common/multiple_run.sh +10 -2
@@ -31,6 +31,7 @@ DD=`which dd` GREP=`which grep` AWK=`which awk` ECHO="`which echo` -e" +O2CLUSTER="`which o2cluster`" SUDO="`which sudo` -u root" IFCONFIG_BIN="`which ifconfig`"
@@ -398,6 +399,7 @@ run_lvb_torture_test() local logfile=${logdir}/lvb_torture_${DATE}.log local workplace=${MOUNT_POINT} local testfile=${workplace}/lvb_torture_test_file + local dlmfs_path="/dlm" ${MKDIR_BIN} -p ${logdir} ${CHMOD_BIN} -R 777 ${logdir}
@@ -427,9 +429,15 @@ ${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS} local UUID="`${DEBUGFS_BIN} -R stats ${DEVICE} |grep UUID|cut -d: -f 2`" local LOCK="`${DEBUGFS_BIN} -R 'encode lvb_torture_test_file' ${DEVICE}`" - LogMsg "Run lvb_torture, CMD: ${BINDIR}/run_lvb_torture.py -d /dlm/ -i 60000 \ + #dlmfs_path should be "NULL" if cluster stack is "pcmk" + local stack="`${SUDO} ${O2CLUSTER} -r | ${AWK} -F',' '{printf $1}'`" + if [ "$stack" = "pcmk" ];then + dlmfs_path="NULL" + fi + + LogMsg "Run lvb_torture, CMD: ${BINDIR}/run_lvb_torture.py -d ${dlmfs_path} -i 60000 \ -H ${DEVICE} -l ${logfile} -n ${NODE_LIST} "${UUID}" "${LOCK}"" - ${SUDO} ${BINDIR}/run_lvb_torture.py -d /dlm/ -c 60000 -i ${INTERFACE} -l \ + ${SUDO} ${BINDIR}/run_lvb_torture.py -d ${dlmfs_path} -c 60000 -i ${INTERFACE} -l \ ${logfile} -n ${NODE_LIST} "${UUID}" "${LOCK}" >> ${LOGFILE} 2>&1 LogRC $?
Signature · 1 line
2.6.6
PATCH 8/17 multiple node: pass cross_delete the right log file
In reply to Eric RenPass cross_delete the right log file. However, openmpi should log into config.LOGFILE, because other remote nodes only have this common log file.
--- programs/cross_delete/cross_delete.py | 4 ++-- programs/python_common/multiple_run.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
programs/cross_delete/cross_delete.py +2 -2
@@ -305,7 +305,7 @@ o2tf.OpenMPIInit(DEBUGON, ','.join(nodelist), logfile, 'ssh') cmdline = os.path.join(config.BINDIR, 'crdel_gen_files.py') ret = o2tf.openmpi_run( DEBUGON, nproc, str('%s -s %s -l %s -t %s' % \ (cmdline, stagedir, - options.logfile, + config.LOGFILE, tarfile) ), ','.join(nodelist), 'ssh',
@@ -324,7 +324,7 @@ o2tf.OpenMPIInit(DEBUGON, ','.join(nodelist), logfile, 'ssh') else: cmdline = os.path.join(config.BINDIR, 'crdel_del_files.py') ret = o2tf.openmpi_run( DEBUGON, nproc, str('%s -s %s -l %s ' % \ - (cmdline, stagedir, options.logfile) ), + (cmdline, stagedir, config.LOGFILE) ), ','.join(nodelist), 'ssh', options.interface,
programs/python_common/multiple_run.sh +1 -1
@@ -318,7 +318,7 @@ run_cross_delete_test() local workplace=${MOUNT_POINT}/cross_delete_test run_common_testcase "cross_delete" "sparse,unwritten,inline-data" \ -"${BINDIR}/cross_delete.py -c 1 -i ${INTERFACE} -d ${workplace} -n ${NODE_LIST} -t ${KERNELSRC}" +"${BINDIR}/cross_delete.py -c 1 -l ${logfile} -i ${INTERFACE} -d ${workplace} -n ${NODE_LIST} -t ${KERNELSRC}" } run_write_append_truncate_test()
Signature · 1 line
2.6.6
PATCH 9/17 Single run: make blocksize and clustersize as parameters
In reply to Eric RenIt takes too long to get the result of a round testing. This can shorten a lot time by eliminating 2-layer loops with blocksize and clustersize. Now blocksize defaults to 4096, while clustersize to 32768 if not specified.
--- programs/backup_super/test_backup_super.sh | 29 +++- programs/inline-data/single-inline-run.sh | 24 ++- programs/mkfs-tests/mkfs-test.sh | 27 +++- programs/python_common/single_run-WIP.sh | 247 +++++++++++++++++++++-------- programs/reflink_tests/reflink_test_run.sh | 26 ++- programs/tunefs-test/tunefs-test.sh | 28 +++- programs/xattr_tests/xattr-single-run.sh | 26 ++- 7 files changed, 308 insertions(+), 99 deletions(-)
programs/backup_super/test_backup_super.sh +25 -4
@@ -49,6 +49,9 @@ LOGFILE="" FIRST_BACKUP_OFF=1073741824 #1G MAX_NUM=6 +blocksize= +clustersize= + # # usage Display help information and exit. #
@@ -65,11 +68,13 @@ function usage() --with-mkfs=PROGRAM use the PROGRAM as fswreck --with-debugfs=PROGRAM use the PROGRAM as mkfs.ocfs2 --with-tunefs=PROGRAM use the PROGRAM as tunefs.ocfs2 + --block-size=blocksize block size + --cluster-size=clustersize cluster size Examples: - $script --with-debugfs=../debugfs.ocfs2/debugfs.ocfs2 /dev/sde2 - $script --with-mkfs=/sbin/mkfs.ocfs2 --log-dir=/tmp /dev/sde2 + $script --with-debugfs=../debugfs.ocfs2/debugfs.ocfs2 --block-size=4096 --clustersize=32768??/dev/sde2 + $script --with-mkfs=/sbin/mkfs.ocfs2 --log-dir=/tmp --block-size=4096 --clustersize=32768 /dev/sde2 EOF }
@@ -376,10 +381,20 @@ function volume_small_test() ################################## function normal_test() { - for blocksize in 512 4096 + if [ "$blocksize" != "NONE" ];then + bslist="$blocksize" + else + bslist="512 4096" + fi + if [ "$clustersize" != "NONE" ];then + cslist="$clustersize" + else + cslist="4096 32768 1048576" + fi + for blocksize in $(echo "$bslist") do for clustersize in \ - 4096 32768 1048576 + $(echo "$cslist") do vol_byte_size=$FIRST_BACKUP_OFF
@@ -462,6 +477,12 @@ do "--with-tunefs="*) TUNEFS_BIN="${1#--with-tunefs=}" ;; + "--block-size="*) + blocksize="${1#--block-size=}" + ;; + "--cluster-size="*) + clustersize="${1#--cluster-size=}" + ;; *) DEVICE="$1" ;;
programs/inline-data/single-inline-run.sh +19 -5
@@ -105,8 +105,10 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-o output] <-d <device>> <mountpoint path>" + echo "usage: `basename ${0}` [-o output] <-b blocksize> <-c clustersize> <-d <device>> <mountpoint path>" echo " -o output directory for the logs" + echo " -b blocksize" + echo " -c clustersize" echo " -d device name used for ocfs2 volume" echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -120,10 +122,12 @@ f_getoptions() exit 1 fi - while getopts "o:hd:" options; do + while getopts "o:hd:b:c:" options; do case $options in o ) LOG_OUT_DIR="$OPTARG";; d ) OCFS2_DEVICE="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -132,7 +136,6 @@ f_getoptions() done shift $(($OPTIND -1)) MOUNT_POINT=${1} - } f_setup()
@@ -373,9 +376,20 @@ trap ' : ' SIGTERM f_setup $* -for BLOCKSIZE in 512 1024 4096 +if [ "$BLOCKSIZE" != "NONE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 4096" +fi +if [ "$CLUSTERSIZE" != "NONE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + +for BLOCKSIZE in $(echo "$bslist") do - for CLUSTERSIZE in 4096 32768 1048576 + for CLUSTERSIZE in $(echo "$cslist") do echo "++++++++++Single node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE} echo "++++++++++Single node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DATA_LOG_FILE}
programs/mkfs-tests/mkfs-test.sh +22 -5
@@ -1,12 +1,14 @@ #!/bin/sh # -# mkfs_test -o <outdir> -d <device> +# mkfs_test -o <outdir> -d <device> -b <blocksize> -c <clustersize> # usage() { - echo "usage: ${MKFS_TEST} -o <outdir> -d <device> -m <mountpoint>" + echo "usage: ${MKFS_TEST} -o <outdir> -d <device> -m <mountpoint> -b <blocksize> -c <clustersize>" echo " -o output directory for the logs" echo " -d device" echo " -m mountpoint" + echo " -b blocksize" + echo " -c clustersize" exit 1 }
@@ -255,13 +257,17 @@ bindir=`basename ${0}` outdir=`basename ${bindir}` device= mntdir= +blocksize= +clustersize= OPTIND=1 -while getopts "d:i:o:m:c" args +while getopts "d:i:o:m:c:b:" args do case "$args" in o) outdir="$OPTARG";; d) device="$OPTARG";; m) mntdir="$OPTARG";; + b) blocksize="$OPTARG";; + c) clustersize="$OPTARG";; esac done LOGFILE=${outdir}/mkfs-test.log
@@ -296,11 +302,22 @@ numblks=1048576 testnum=1 +if [ "$blocksize" != "NONE" ];then + bslist="$blocksize" +else + bslist="512 1024 2048 4096" +fi + +if [ "$clustersize" != "NONE" ];then + cslist="$clustersize" +else + cslist="4096 8192 16384 32768 65536 131072 262144 524288 1048576" +fi ### Test all combinations of blocksizes and clustersizes -for blks in 512 1024 2048 4096 +for blks in $(echo "$bslist") do - for clusts in 4096 8192 16384 32768 65536 131072 262144 524288 1048576 + for clusts in $(echo "$cslist") do TAG=mkfs_test_${testnum} OUT=${outdir}/${TAG}.log
programs/python_common/single_run-WIP.sh +180 -67
593 lines not on this page · raw message
programs/reflink_tests/reflink_test_run.sh +20 -6
@@ -98,13 +98,15 @@ set -o pipefail function f_usage() { echo "usage: `basename ${0}` [-D <-a remote_listener_addr_in_IPV4> <-p port>] \ -[-v verify_log] [-W] [-A] [-o logdir] <-d device> <mountpoint path>" +[-v verify_log] [-W] [-A] [-o logdir] <-d device> <-b blocksize> <-c clustersize> <mountpoint path>" echo " -o output directory for the logs" echo " -d block device name used for ocfs2 volume" echo " -W enable data=writeback mode" echo " -A enable asynchronous io testing mode" echo " -D enable destructive test,it will crash the testing node,\ be cautious, you need to specify listener addr and port then" + echo " -b block size" + echo " -c cluster size" echo " <mountpoint path> specify the testing mounting point." exit 1;
@@ -117,7 +119,7 @@ function f_getoptions() exit 1 fi - while getopts "o:WDAhd:a:p:v:" options; do + while getopts "o:WDAhd:a:p:v:b:c:" options; do case $options in o ) LOG_DIR="$OPTARG";; d ) DEVICE="$OPTARG";;
@@ -127,6 +129,8 @@ function f_getoptions() a ) LISTENER_ADDR="$OPTARG";; p ) LISTENER_PORT="$OPTARG";; v ) VERI_LOG="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; h ) f_usage;; * ) f_usage;; esac
@@ -729,16 +733,26 @@ trap 'echo -ne "\n\n">>${RUN_LOG_FILE};echo "Interrupted by Ctrl+C,Cleanuping\ f_check $* +if [ "$BLOCKSIZE" != "NONE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 4096" +fi + +if [ "$CLUSTERSIZE" != "NONE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + START_TIME=${SECONDS} f_LogRunMsg ${RUN_LOG_FILE} "=====================Reflink tests start: `date`\ =====================\n" f_LogMsg ${LOG_FILE} "=====================Reflink tests start: `date`\ =====================" -#for BLOCKSIZE in 512 1024 4096;do -# for CLUSTERSIZE in 4096 32768 1048576;do -for BLOCKSIZE in 4096;do - for CLUSTERSIZE in 1048576;do +for BLOCKSIZE in $(echo "$bslist");do + for CLUSTERSIZE in $(echo "$cslist");do f_LogRunMsg ${RUN_LOG_FILE} "<- Running test with ${BLOCKSIZE} \ bs and ${CLUSTERSIZE} cs ->\n" f_LogMsg ${LOG_FILE} "<- Running test with ${BLOCKSIZE} bs \
programs/tunefs-test/tunefs-test.sh +22 -6
@@ -40,8 +40,8 @@ BLOCKDEV="`which sudo` -u root `which blockdev`" DEVICE="" MOUNT_POINT="" -BLOCKSIZE=4k -CLUSTERSIZE=8k +BLOCKSIZE= +CLUSTERSIZE= LABEL1=ocfs2test LABEL2=ocfs2test1
@@ -66,10 +66,12 @@ FS_FEATURES= # function usage() { - echo "usage: ${TUNEFS_TEST} -o <outdir> -d <device> -m <mountpoint>" + echo "usage: ${TUNEFS_TEST} -o <outdir> -d <device> -m <mountpoint> -b <blocksize> -c <clustersize>" echo " -o output directory for the logs" echo " -d device" echo " -m mountpoint" + echo " -b blocksize" + echo " -c clustersize" exit 1 } #
@@ -512,8 +514,20 @@ Enable_Disable_Inline_Data() O_BLOCKSIZE=${BLOCKSIZE} O_CLUSTERSIZE=${CLUSTERSIZE} - for BLOCKSIZE in 512 1k 4k;do - for CLUSTERSIZE in 32k;do + if [ "$BLOCKSIZE" != "NONE" ];then + bslist="$BLOCKSIZE" + else + bslist="512 1k 4k" + fi + + if [ "$CLUSTERSIZE" != "NONE" ];then + cslist="$CLUSTERSIZE" + else + cslist="32k" + fi + + for BLOCKSIZE in $(echo "$bslist");do + for CLUSTERSIZE in $(echo "$cslist");do #set none inline-data support for volume LogMsg "tunefs_test : Enable/Disable Inline-data"
@@ -647,12 +661,14 @@ TUNEFS_TEST=`basename $0` bindir=`basename ${0}` LOG_DIR=`basename ${bindir}` -while getopts "d:o:m:" args +while getopts "d:o:m:b:c:" args do case "$args" in o) LOG_DIR="$OPTARG";; d) DEVICE="$OPTARG";; m) MOUNT_POINT="$OPTARG";; + b) BLOCKSIZE="$OPTARG";; + c) CLUSTERSIZE="$OPTARG";; esac done
programs/xattr_tests/xattr-single-run.sh +20 -6
@@ -144,10 +144,12 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-c] [-o output_log_dir] <-d <device>> <mountpoint path>" + echo "usage: `basename ${0}` [-c] [-o output_log_dir] <-d <device>> <-b <block size>> <-C <cluster size>> <mountpoint path>" echo " -c enable the combination test for inline-data and inline-xattr." echo " -o output directory for the logs" echo " -d specify the device which has been formated as an ocfs2 volume." + echo " -b block size." + echo " -C cluster size." echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -160,11 +162,13 @@ f_getoptions() exit 1 fi - while getopts "cho:d:" options; do + while getopts "cho:d:b:C:" options; do case $options in c ) COMBIN_TEST="1";; o ) LOG_OUT_DIR="$OPTARG";; d ) OCFS2_DEVICE="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + C ) CLUSTERSIZE="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -1064,15 +1068,25 @@ trap ' : ' SIGTERM f_setup $* +if [ "$BLOCKSIZE" != "NONE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 2048 4096" +fi + +if [ "$CLUSTERSIZE" != "NONE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + START_TIME=${SECONDS} echo "=====================Single node xattr testing starts: `date`=====================" |tee -a ${RUN_LOG_FILE} echo "=====================Single node xattr testing starts: `date`=====================" >> ${DETAIL_LOG_FILE} -#for BLOCKSIZE in 512 1024 2048 4096 -for BLOCKSIZE in 512 4096 +for BLOCKSIZE in $(echo "$bslist") do -# for CLUSTERSIZE in 4096 32768 1048576 - for CLUSTERSIZE in 4096 1048576 + for CLUSTERSIZE in $(echo "$cslist") do echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE} echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DETAIL_LOG_FILE}
Signature · 1 line
2.6.6
PATCH 10/17 Multiple run: make blocksize and clustersize as parameters
In reply to Eric RenIt takes too long to get the result of a round testing. This can shorten a lot time by eliminating 2-layer loops with blocksize and clustersize. Now blocksize defaults to 4096, while clustersize to 32768 if not specified.
--- programs/inline-data/multi-inline-run.sh | 24 ++++++++++++++++---- programs/python_common/multiple_run.sh | 28 +++++++++++++++++++----- programs/reflink_tests/multi_reflink_test_run.sh | 28 ++++++++++++++++++------ programs/xattr_tests/xattr-multi-run.sh | 24 ++++++++++++++++---- 4 files changed, 83 insertions(+), 21 deletions(-)
programs/inline-data/multi-inline-run.sh +20 -4
@@ -126,12 +126,14 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <mountpoint path>" + echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <-b blocksize> -c <clustersize> <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited." echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com." echo " -o output directory for the logs" echo " -d device name used for ocfs2 volume" + echo " -b block size" + echo " -c cluster size" echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -144,13 +146,15 @@ f_getoptions() exit 1 fi - while getopts "o:hd:r:a:f:" options; do + while getopts "o:hd:r:a:f:b:c:" options; do case $options in a ) MPI_ACCESS_METHOD="$OPTARG";; r ) MPI_RANKS="$OPTARG";; f ) MPI_HOSTS="$OPTARG";; o ) LOG_OUT_DIR="$OPTARG";; d ) OCFS2_DEVICE="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -327,9 +331,21 @@ trap ' : ' SIGTERM f_setup $* -for BLOCKSIZE in 512 1024 4096 +if [ -n "$BLOCKSIZE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 4096" +fi + +if [ -n "CLUSTERSIZE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + +for BLOCKSIZE in $(echo "$bslist") do - for CLUSTERSIZE in 4096 32768 1048576 + for CLUSTERSIZE in $(echo "$cslist") do echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE} echo "++++++++++Multiple node inline-data test with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${DATA_LOG_FILE}
programs/python_common/multiple_run.sh +22 -6
@@ -72,10 +72,12 @@ set -o pipefail ################################################################################ f_usage() { - echo "usage: `basename ${0}` <-k kerneltarball> <-n nodes> [-i nic] \ + echo "usage: `basename ${0}` <-k kerneltarball> [-b blocksize] [-c clustersize] <-n nodes> [-i nic] \ [-a access_method] [-o logdir] <-d device> [-t testcases] <mountpoint path>" echo " -k kerneltarball should be path of tarball for kernel src." echo " -n nodelist,should be comma separated." + echo " -b blocksize." + echo " -c clustersize." echo " -o output directory for the logs" echo " -i network interface name to be used for MPI messaging." echo " -a access method for mpi execution,should be ssh or rsh"
@@ -97,13 +99,15 @@ f_getoptions() exit 1 fi - while getopts "n:d:i:a:o:k:t:h:" options; do + while getopts "n:d:i:a:o:b:c:k:t:h:" options; do case $options in n ) NODE_LIST="$OPTARG";; d ) DEVICE="$OPTARG";; i ) INTERFACE="$OPTARG";; a ) ACCESS_METHOD="$OPTARG";; o ) LOG_DIR="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; k ) KERNELSRC="$OPTARG";; t ) TESTCASES="$OPTARG";; h ) f_usage
@@ -359,7 +363,7 @@ run_xattr_test() LogRunMsg "xattr-test" ${BINDIR}/xattr-multi-run.sh -r 4 -f ${NODE_LIST} -a ssh -o ${logdir} \ --d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 +-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -369,7 +373,7 @@ run_inline_test() LogRunMsg "inline-test" ${BINDIR}/multi-inline-run.sh -r 2 -f ${NODE_LIST} -a ssh -o ${logdir} \ --d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 +-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -479,6 +483,18 @@ trap ' : ' SIGTERM f_setup $* +if [ -n "$BLOCKSIZE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 4096" +fi + +if [ -n "$CLUSTERSIZE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + STARTRUN=$(date +%s) ${ECHO} "`date` - Starting Multiple Nodes Regress test" > ${LOGFILE}
@@ -498,8 +514,8 @@ for tc in `${ECHO} ${TESTCASES} | ${SED} "s:,: :g"`; do run_reflink_test fi - for BLOCKSIZE in 512 1024 4096;do - for CLUSTERSIZE in 4096 32768 1048576;do + for BLOCKSIZE in $(echo "$bslist");do + for CLUSTERSIZE in $(echo "$cslist");do ${ECHO} "Tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"" | \ ${TEE_BIN} -a ${LOGFILE} if [ "$tc"X = "write_append_truncate"X -o "$tc"X = "all"X ]; then
programs/reflink_tests/multi_reflink_test_run.sh +21 -7
@@ -90,12 +90,14 @@ set -o pipefail function f_usage() { echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> \ -[-a access method] [-o logdir] <-d <device>> [-W] [-A] <mountpoint path>" +[-a access method] [-o logdir] <-d <device>> <-b block size> <-c cluster size> [-W] [-A] <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for mpi execution,should be ssh or rsh" echo " -f MPI hosts list,separated by comma" echo " -o output directory for the logs" echo " -d specify the device" + echo " -b block size" + echo " -c cluster size" echo " -i Network Interface name to be used for MPI messaging." echo " -W enable data=writeback mode" echo " -A enable asynchronous io testing mode"
@@ -110,7 +112,7 @@ function f_getoptions() exit 1 fi - while getopts "o:d:i:r:f:WAha:" options; do + while getopts "o:d:i:r:f:WAha:b:c:" options; do case $options in r ) MPI_RANKS="$OPTARG";; f ) MPI_HOSTS="$OPTARG";;
@@ -118,6 +120,8 @@ function f_getoptions() d ) DEVICE="$OPTARG";; a ) MPI_ACCESS_METHOD="$OPTARG";; i ) INTERFACE="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; W ) MOUNT_OPTS="data=writeback";; A ) AIO_OPT=" -A ";; h ) f_usage
@@ -174,7 +178,7 @@ ${MOUNT_POINT}`" f_usage; } MPI_BTL_IF_ARG="-mca btl_tcp_if_include ${INTERFACE}" - fi; + fi MPI_RANKS=${MPI_RANKS:-$DEFAULT_RANKS} LOG_DIR=${LOG_DIR:-$DEFAULT_LOG_DIR}
@@ -372,16 +376,26 @@ trap 'echo -ne "\n\n">>${RUN_LOG_FILE};echo "Interrupted by Ctrl+C,Cleanuping\ f_setup $* +if [ -n "$BLOCKSIZE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 1024 2048 4096" +fi + +if [ -n "$CLUSTERSIZE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 32768 1048576" +fi + START_TIME=${SECONDS} f_LogRunMsg ${RUN_LOG_FILE} "=====================Multi-nodes refcount tests \ start: `date`=====================\n" f_LogMsg ${LOG_FILE} "=====================Multi-nodes refcount tests \ start: `date`=====================" -#for BLOCKSIZE in 512 1024 2048 4096;do -# for CLUSTERSIZE in 4096 32768 1048576;do -for BLOCKSIZE in 4096;do - for CLUSTERSIZE in 1048576;do +for BLOCKSIZE in $(echo "$bslist");do + for CLUSTERSIZE in $(echo "$cslist");do f_LogRunMsg ${RUN_LOG_FILE} "<- Running test with ${BLOCKSIZE} \ bs and ${CLUSTERSIZE} cs ->\n" f_LogMsg ${LOG_FILE} "<- Running test with ${BLOCKSIZE} \
programs/xattr_tests/xattr-multi-run.sh +20 -4
@@ -145,13 +145,15 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <mountpoint path>" + echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <-b blocksize> <-c clustersize> <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited." echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com." echo " -o output directory for the logs" echo " -i Network Interface name to be used for MPI messaging." echo " -d specify the device which has been formated as an ocfs2 volume." + echo " -b block size." + echo " -c cluster size." echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -163,7 +165,7 @@ f_getoptions() exit 1 fi - while getopts "o:d:r:f:a:h:i:" options; do + while getopts "o:d:r:f:a:h:i:b:c:" options; do case $options in r ) MPI_RANKS="$OPTARG";; f ) MPI_HOSTS="$OPTARG";;
@@ -171,6 +173,8 @@ f_getoptions() d ) OCFS2_DEVICE="$OPTARG";; a ) MPI_ACCESS_METHOD="$OPTARG";; i ) INTERFACE="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -467,13 +471,25 @@ trap ' : ' SIGTERM f_setup $* +if [ -n "$BLOCKSIZE" ];then + bslist="$BLOCKSIZE" +else + bslist="512 4096" +fi + +if [ -n "$CLUSTERSIZE" ];then + cslist="$CLUSTERSIZE" +else + cslist="4096 1048576" +fi + START_TIME=${SECONDS} echo "=====================Multiple nodes xattr testing starts: `date`=====================" |tee -a ${RUN_LOG_FILE} echo "=====================Multiple nodes xattr testing starts: `date`=====================" >> ${LOG_FILE} -for BLOCKSIZE in 512 4096 +for BLOCKSIZE in $(echo "$bslist") do - for CLUSTERSIZE in 4096 1048576 + for CLUSTERSIZE in $(echo "$cslist") do echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++" |tee -a ${RUN_LOG_FILE} echo "++++++++++xattr tests with \"-b ${BLOCKSIZE} -C ${CLUSTERSIZE}\"++++++++++">>${LOG_FILE}
Signature · 1 line
2.6.6
PATCH 11/17 discontig bg: make blocksize and clustersize as parameters
In reply to Eric RenAdd "-b blocksize" and "-c clustersize" as optional parameters. It will keep the original behavior if we don't specify their values.
--- programs/discontig_bg_test/discontig_runner.sh | 51 +++++++++++++++++--------- 1 file changed, 33 insertions(+), 18 deletions(-)
programs/discontig_bg_test/discontig_runner.sh +33 -18
@@ -64,7 +64,8 @@ MPI_BTL_IF_ARG= ################################################################################ function f_usage() { - echo "usage: `basename ${0}` <-d device> [-o logdir] [-m multi_hosts] [-a access_method] <mount point>" + echo "usage: `basename ${0}` <-d device> [-o logdir] [-m multi_hosts] [-a access_method] \ +[-b block_size] [-c cluster_size] <mount point>" exit 1; }
@@ -76,13 +77,15 @@ function f_getoptions() exit 1 fi - while getopts "hd:o:m:a:" options; do + while getopts "hd:o:m:a:b:c:" options; do case $options in d ) DEVICE="$OPTARG";; o ) LOG_DIR="$OPTARG";; a ) MPI_ACCESS_METHOD="$OPTARG";; m ) MULTI_TEST=1 MPI_HOSTS="$OPTARG";; + b ) BLOCKSIZE="$OPTARG";; + c ) CLUSTERSIZE="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -209,7 +212,7 @@ function f_inodes_test() local filename= f_LogMsg ${LOG_FILE} "Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 200 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 200 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -292,7 +295,7 @@ function f_inodes_test() f_exit_or_not ${RET} f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 4096 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 4096 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -420,7 +423,7 @@ function f_extents_test() local inc= f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r 2048 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r 2048 -b ${BLOCKSIZE}-c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -552,7 +555,7 @@ function f_extents_test() function f_inline_test() { f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 1024 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 1024 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -622,7 +625,7 @@ function f_inline_test() function f_xattr_test() { f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r 10240 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r 10240 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -705,7 +708,7 @@ function f_refcount_test() local inc= f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -883,7 +886,7 @@ function f_refcount_test() function f_dxdir_test() { f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extents -r 2048 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extents -r 2048 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -965,7 +968,7 @@ function f_multi_inodes_test() { f_LogMsg ${LOG_FILE} "Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 800 -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 800 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1014,8 +1017,8 @@ function f_multi_extents_test() local filename= f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1070,8 +1073,8 @@ function f_multi_xattr_test() local remain_space=1024 f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1136,8 +1139,8 @@ function f_multi_refcount_test() local remain_space=1024 f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b $BLOCKSIZE -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1255,13 +1258,25 @@ trap 'echo -ne "\n\n">>${RUN_LOG_FILE};echo "Interrupted by Ctrl+C,Cleanuping\ f_setup $* +if [ -z ${BLOCKSIZE} ];then + bslist="512 4096" +else + bslist=${BLOCKSIZE} +fi + +if [ -z ${CLUSTERSIZE} ];then + cslist="4096 8192" +else + cslist=${CLUSTERSIZE} +fi + f_LogRunMsg ${RUN_LOG_FILE} "=====================Discontiguous block group test starts: `date`\ =====================\n" f_LogMsg ${LOG_FILE} "=====================Discontiguous block groups tests start: `date`\ =====================" -for BLOCKSIZE in 512 4096;do - for CLUSTERSIZE in 4096 8192;do +for BLOCKSIZE in $(echo "$bslist");do + for CLUSTERSIZE in $(echo "$cslist");do f_LogRunMsg ${RUN_LOG_FILE} "<- Running test with ${BLOCKSIZE} \ bs and ${CLUSTERSIZE} cs ->\n" f_LogMsg ${LOG_FILE} "<- Running test with ${BLOCKSIZE} bs \
Signature · 1 line
2.6.6
PATCH 12/17 Add two cluster-aware parameters: cluster stack and cluster name
In reply to Eric RenWith pacemaker as cluster stack, single node test always fail on mkfs in some testcases. On suse OS, we use pcmk plugin as default cluster stack. But in single node test, some testcases format ocfs2 volume as local filesystem. In such case, o2cb plugin is used. If the next testcase want to format the volume with multiple slots, it will fail because mkfs.ocfs2 cannot shift from o2cb to pcmk automatically.
This patch should be merged into suse branch, without affecting other OS release only using o2cb.
--- programs/backup_super/test_backup_super.sh | 27 ++++++-- .../discontig_bg_test/activate_discontig_bg.sh | 12 ++-- programs/discontig_bg_test/discontig_runner.sh | 36 ++++++----- programs/inline-data/multi-inline-run.sh | 13 ++-- programs/inline-data/single-inline-run.sh | 10 ++- programs/mkfs-tests/mkfs-test.sh | 46 ++++++++----- programs/python_common/multiple_run.sh | 22 ++++--- programs/python_common/o2tf.sh | 16 ++++- programs/python_common/single_run-WIP.sh | 75 ++++++++++++++-------- programs/reflink_tests/multi_reflink_test_run.sh | 12 +++- programs/reflink_tests/reflink_test_run.sh | 8 ++- programs/tunefs-test/tunefs-test.sh | 11 ++-- programs/xattr_tests/xattr-multi-run.sh | 15 ++++- programs/xattr_tests/xattr-single-run.sh | 13 ++-- 14 files changed, 215 insertions(+), 101 deletions(-)
programs/backup_super/test_backup_super.sh +20 -7
@@ -169,7 +169,8 @@ function test_mkfs() msg1="debugfs should be sucess" blkcount=`expr $vol_byte_size / $blocksize` - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount #first check whether mkfs is success echo "ls //"|${DEBUGFS_BIN} ${DEVICE}|grep global_bitmap exit_if_bad $? 0 $msg $LINENO
@@ -186,7 +187,8 @@ function test_mkfs() ${DD_BIN} if=/dev/zero of=$DEVICE bs=4096 count=3 clear_backup_blocks - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount #first check whether mkfs is success echo "ls //"|${DEBUGFS_BIN} ${DEVICE}|grep global_bitmap exit_if_bad $? 0 $msg1 $LINENO
@@ -217,7 +219,8 @@ function test_fsck() ${DD_BIN} if=/dev/zero of=$DEVICE bs=4096 count=3 clear_backup_blocks - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount #corrupt the superblock ${DD_BIN} if=/dev/zero of=${DEVICE} bs=$blocksize count=3 ${FSCK_BIN} -fy ${DEVICE} #This should failed.
@@ -247,7 +250,8 @@ function test_tunefs_resize() clear_backup_blocks #mkfs a volume with no backup superblock - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount local bpc=`expr $clustersize / $blocksize` local blkcount=`expr $blkcount + $bpc`
@@ -283,7 +287,8 @@ function test_tunefs_add_backup() clear_backup_blocks #mkfs a volume with no backup superblock supported - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M --no-backup-super ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M --no-backup-super \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount #We can't open the volume by backup superblock now echo "ls //"|${DEBUGFS_BIN} ${DEVICE} -s 1|grep global_bitmap
@@ -327,7 +332,8 @@ function test_tunefs_refresh() local old_vol_name="old_ocfs2" local new_vol_name="new_ocfs2" - echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M -L $old_vol_name ${DEVICE} $blkcount + echo "y" |${MKFS_BIN} -b $blocksize -C $clustersize -N 4 -J size=64M -L $old_vol_name \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} ${DEVICE} $blkcount check_vol $old_vol_name #change the volume name
@@ -365,7 +371,8 @@ function volume_small_test() # Since tunefs will return 0, we need to grep # the output of stderr and find what we want. - echo "y" |${MKFS_BIN} -b 1K -C 4K ${DEVICE} -N 4 --no-backup-super $tmp_block_count + echo "y" |${MKFS_BIN} -b 1K -C 4K ${DEVICE} -N 4 --no-backup-super $tmp_block_count \ + --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} err=`${TUNEFS_BIN} --backup-super ${DEVICE} 2>&1` echo $err|grep "too small to contain backup superblocks" exit_if_bad $? 0 "tunefs.ocfs2" $LINENO
@@ -465,6 +472,12 @@ do "--log-dir="*) LOG_DIR="${1#--log-dir=}" ;; + "--cluster-stack="*) + CLUSTER_STACK="${1#--cluster-stack=}" + ;; + "--cluster-name="*) + CLUSTER_NAME="${1#--cluster-name=}" + ;; "--with-fsck="*) FSCK_BIN="${1#--with-fsck=}" ;;
programs/discontig_bg_test/activate_discontig_bg.sh +8 -4
@@ -21,6 +21,8 @@ fi DEVICE= MOUNT_POINT= +CLUSTER_STACK= +CLUSTER_NAME= WORK_PLACE= WORK_PLACE_DIRENT=ocfs2-activate-discontig-bg-dir TUNEFS_BIN="`which sudo` -u root `which tunefs.ocfs2`"
@@ -69,7 +71,7 @@ function f_usage() { echo "usage: `basename ${0}` [-t type] [-r resv_size] [-b blocksize] \ [-c clustersize] [-l label] [-m mpi_hosts] [-a access_method] <-d device> \ -[-o logdir] <mount point> " +[-o logdir] <-s cluster stack> <-n cluster name> <mount point>" exit 1; }
@@ -80,8 +82,8 @@ function f_getoptions() f_usage; exit 1 fi - - while getopts "hd:o:b:c:t:r:l:m:a:" options; do + + while getopts "hd:o:b:c:t:r:l:m:a:s:n:" options; do case $options in d ) DEVICE="$OPTARG";; o ) LOG_DIR="$OPTARG";;
@@ -93,6 +95,8 @@ function f_getoptions() a ) MPI_ACCESS_METHOD="$OPTARG";; m ) MULTI_TEST=1 MPI_HOSTS="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -325,7 +329,7 @@ function f_activate_discontig() f_LogRunMsg ${RUN_LOG_FILE} "[*] Mkfs device ${DEVICE}:" f_mkfs ${LOG_FILE} ${BLOCKSIZE} ${CLUSTERSIZE} ${LABELNAME} ${SLOTS} \ -${DEVICE} "refcount,xattr,metaecc,discontig-bg" ${JOURNALSIZE} ${ORIG_VOLUME_SIZE_BK} +${DEVICE} "refcount,xattr,metaecc,discontig-bg" ${JOURNALSIZE} ${ORIG_VOLUME_SIZE_BK} ${CLUSTER_STACK} ${CLUSTER_NAME} RET=$? f_echo_status ${RET}| tee -a ${RUN_LOG_FILE} f_exit_or_not ${RET}
programs/discontig_bg_test/discontig_runner.sh +20 -16
@@ -19,6 +19,8 @@ fi DEVICE= MOUNT_POINT= +CLUSTER_STACK= +CLUSTER_NAME= WORK_PLACE= WORK_PLACE_DIRENT=ocfs2-discontig-bg-test DISCONTIG_ACTIVATE_BIN="${BINDIR}/activate_discontig_bg.sh"
@@ -65,7 +67,7 @@ MPI_BTL_IF_ARG= function f_usage() { echo "usage: `basename ${0}` <-d device> [-o logdir] [-m multi_hosts] [-a access_method] \ -[-b block_size] [-c cluster_size] <mount point>" +[-b block_size] [-c cluster_size] <-s cluster stack> <-n cluster name> <mount point>" exit 1; }
@@ -77,7 +79,7 @@ function f_getoptions() exit 1 fi - while getopts "hd:o:m:a:b:c:" options; do + while getopts "hd:o:m:a:b:c:s:n:" options; do case $options in d ) DEVICE="$OPTARG";; o ) LOG_DIR="$OPTARG";;
@@ -86,6 +88,8 @@ function f_getoptions() MPI_HOSTS="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; c ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -212,7 +216,7 @@ function f_inodes_test() local filename= f_LogMsg ${LOG_FILE} "Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 200 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 200 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -295,7 +299,7 @@ function f_inodes_test() f_exit_or_not ${RET} f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 4096 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 4096 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -423,7 +427,7 @@ function f_extents_test() local inc= f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r 2048 -b ${BLOCKSIZE}-c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r 2048 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -555,7 +559,7 @@ function f_extents_test() function f_inline_test() { f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 1024 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 1024 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -625,7 +629,7 @@ function f_inline_test() function f_xattr_test() { f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r 10240 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r 10240 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -708,7 +712,7 @@ function f_refcount_test() local inc= f_LogMsg ${LOG_FILE} "[*] Activate extent discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -886,7 +890,7 @@ function f_refcount_test() function f_dxdir_test() { f_LogMsg ${LOG_FILE} "[*] Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t extents -r 2048 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t extents -r 2048 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -968,7 +972,7 @@ function f_multi_inodes_test() { f_LogMsg ${LOG_FILE} "Activate inode discontig-bg on ${DEVICE}" - ${DISCONTIG_ACTIVATE_BIN} -t inode -r 800 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + ${DISCONTIG_ACTIVATE_BIN} -t inode -r 800 -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1017,8 +1021,8 @@ function f_multi_extents_test() local filename= f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1073,8 +1077,8 @@ function f_multi_xattr_test() local remain_space=1024 f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
@@ -1139,8 +1143,8 @@ function f_multi_refcount_test() local remain_space=1024 f_LogMsg ${LOG_FILE} "Activate extents discontig-bg on ${DEVICE}" - f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT}" - ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 + f_LogMsg ${LOG_FILE} "CMD: ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT}" + ${DISCONTIG_ACTIVATE_BIN} -t extent -r ${remain_space} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -d ${DEVICE} -o ${LOG_DIR} -l ${LABELNAME} -m ${MPI_HOSTS} -a ${MPI_ACCESS_METHOD} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >>${LOG_FILE} 2>&1 RET=$? f_exit_or_not ${RET}
programs/inline-data/multi-inline-run.sh +9 -4
@@ -50,6 +50,8 @@ DATA_LOG_FILE= DIRS_LOG_FILE= RUN_LOG_FILE= MOUNT_POINT= +CLUSTER_STACK= +CLUSTER_NAME= OCFS2_DEVICE= OCFS2_UUID=
@@ -126,7 +128,7 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <-b blocksize> -c <clustersize> <mountpoint path>" + echo "usage: `basename ${0}` [-r MPI_ranks] <-f MPI_hosts> [-a access_method] [-o output] <-d <device>> <-b blocksize> -c <clustersize> <-s <cluster-stack>> <-n <cluster-name>> <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited." echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com."
@@ -134,9 +136,10 @@ f_usage() echo " -d device name used for ocfs2 volume" echo " -b block size" echo " -c cluster size" + echo " -s cluster stack" + echo " -n cluster name" echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1; - } f_getoptions()
@@ -146,7 +149,7 @@ f_getoptions() exit 1 fi - while getopts "o:hd:r:a:f:b:c:" options; do + while getopts "o:hd:r:a:f:b:c:s:n:" options; do case $options in a ) MPI_ACCESS_METHOD="$OPTARG";; r ) MPI_RANKS="$OPTARG";;
@@ -155,6 +158,8 @@ f_getoptions() d ) OCFS2_DEVICE="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; c ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -212,7 +217,7 @@ f_do_mkfs_and_mount() { echo -n "Mkfsing device(-b ${BLOCKSIZE} -C ${CLUSTERSIZE}): "|tee -a ${RUN_LOG_FILE} - echo y|${MKFS_BIN} --fs-features=inline-data -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 4 -L ocfs2-inline-test ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 + echo y|${MKFS_BIN} --fs-features=inline-data -b ${BLOCKSIZE} -C ${CLUSTERSIZE} --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} -N 4 -L ocfs2-inline-test ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 RET=$? echo_status ${RET} |tee -a ${RUN_LOG_FILE}
programs/inline-data/single-inline-run.sh +7 -3
@@ -105,11 +105,13 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-o output] <-b blocksize> <-c clustersize> <-d <device>> <mountpoint path>" + echo "usage: `basename ${0}` [-o output] <-b blocksize> <-c clustersize> <-d <device>> <-s <cluster stack>> <-n <cluster name>> <mountpoint path>" echo " -o output directory for the logs" echo " -b blocksize" echo " -c clustersize" echo " -d device name used for ocfs2 volume" + echo " -s cluster stack" + echo " -n cluster name" echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -122,12 +124,14 @@ f_getoptions() exit 1 fi - while getopts "o:hd:b:c:" options; do + while getopts "o:hd:b:c:s:n:" options; do case $options in o ) LOG_OUT_DIR="$OPTARG";; d ) OCFS2_DEVICE="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; c ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -174,7 +178,7 @@ f_do_mkfs_and_mount() { echo -n "Mkfsing device:"|tee -a ${RUN_LOG_FILE} - echo y|${MKFS_BIN} --fs-features=inline-data -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 4 ${OCFS2_DEVICE} ${BLOCKNUMS} >>${RUN_LOG_FILE} 2>&1 + echo y|${MKFS_BIN} --fs-features=inline-data --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 4 ${OCFS2_DEVICE} ${BLOCKNUMS} >>${RUN_LOG_FILE} 2>&1 RET=$? echo_status ${RET} |tee -a ${RUN_LOG_FILE} exit_or_not ${RET}
programs/mkfs-tests/mkfs-test.sh +31 -15
137 lines not on this page · raw message
programs/python_common/multiple_run.sh +14 -8
@@ -43,6 +43,8 @@ REMOTE_UMOUNT_BIN="${BINDIR}/remote_umount.py" NODE_LIST= DEVICE= MOUNT_POINT= +CLUSTER_STACK= +CLUSTER_NAME= KERNELSRC= ACCESS_METHOD="ssh"
@@ -73,7 +75,7 @@ set -o pipefail f_usage() { echo "usage: `basename ${0}` <-k kerneltarball> [-b blocksize] [-c clustersize] <-n nodes> [-i nic] \ -[-a access_method] [-o logdir] <-d device> [-t testcases] <mountpoint path>" +[-a access_method] [-o logdir] <-d device> [-t testcases] [-s stack name] [-C cluster name] <mountpoint path>" echo " -k kerneltarball should be path of tarball for kernel src." echo " -n nodelist,should be comma separated." echo " -b blocksize."
@@ -83,6 +85,8 @@ f_usage() echo " -a access method for mpi execution,should be ssh or rsh" echo " -d device name used for ocfs2 volume." echo " -t sepcify testcases to run." + echo " -s cluster stack." + echo " -C cluster name." echo " <mountpoint path> path of mountpoint where test will be performed." echo echo "Eaxamples:"
@@ -99,7 +103,7 @@ f_getoptions() exit 1 fi - while getopts "n:d:i:a:o:b:c:k:t:h:" options; do + while getopts "n:d:i:a:o:k:b:c:t:s:C:h:" options; do case $options in n ) NODE_LIST="$OPTARG";; d ) DEVICE="$OPTARG";;
@@ -110,6 +114,8 @@ f_getoptions() c ) CLUSTERSIZE="$OPTARG";; k ) KERNELSRC="$OPTARG";; t ) TESTCASES="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + C ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -280,7 +286,7 @@ run_common_testcase() LogMsg "Mkfs device ${DEVICE}:" f_mkfs ${LOGFILE} ${BLOCKSIZE} ${CLUSTERSIZE} ${LABELNAME} ${SLOTS} \ -${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS} +${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS} ${CLUSTER_STACK} ${CLUSTER_NAME} RET=$? f_exit_or_not ${RET}
@@ -363,7 +369,7 @@ run_xattr_test() LogRunMsg "xattr-test" ${BINDIR}/xattr-multi-run.sh -r 4 -f ${NODE_LIST} -a ssh -o ${logdir} \ --d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 +-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -373,7 +379,7 @@ run_inline_test() LogRunMsg "inline-test" ${BINDIR}/multi-inline-run.sh -r 2 -f ${NODE_LIST} -a ssh -o ${logdir} \ --d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 +-d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -384,14 +390,14 @@ run_reflink_test() LogRunMsg "reflink-test" LogMsg "reflink 'data=ordered' mode test" ${BINDIR}/multi_reflink_test_run.sh -r 4 -f ${NODE_LIST} -a ssh -o \ -${logdir} -d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 || { +${logdir} -d ${DEVICE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 || { RET=$? LogRC $RET return $RET } # LogMsg "reflink 'data=writeback' mode test" # ${BINDIR}/multi_reflink_test_run.sh -r 4 -f ${NODE_LIST} -a ssh -o \ -#${logdir} -W -d ${DEVICE} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 +#${logdir} -W -d ${DEVICE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -415,7 +421,7 @@ run_lvb_torture_test() LogMsg "Mkfs device ${DEVICE}:" f_mkfs ${LOGFILE} ${BLOCKSIZE} ${CLUSTERSIZE} ${LABELNAME} ${SLOTS} \ -${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS} +${DEVICE} ${FEATURES} ${JOURNALSIZE} ${BLOCKS} ${CLUSTER_STACK} ${CLUSTER_NAME} RET=$? f_exit_or_not ${RET}
programs/python_common/o2tf.sh +13 -3
@@ -145,12 +145,18 @@ function f_mkfs() #${7} specify fs features #${8} specify journal size #${9} specify volume size + #${10} specify cluster stack + #${11} specify cluster name local slot_opts="" + local cluster_stack="" + local cluster_name="" if [ "${5}" == "0" ];then slot_opts="-M local" else slot_opts="-N ${5}" + cluster_stack="--cluster-stack=${10}" #cluster stack + cluster_name="--cluster-name=${11}" #cluster name fi local journal_opts=""
@@ -170,12 +176,16 @@ function f_mkfs() local L=${4} #volume name local D=${6} #device name local O=${7} #fs featuers + local S=${10} #cluster stack + local N=${11} #cluster name - shift 9 + shift 11 R=${1} #Reserved options - f_LogMsg ${logfile} "${MKFS_BIN} --fs-features=${O} -b ${B} -C ${C} -L ${L} ${slot_opts} ${journal_opts} ${R} ${D} ${blocks}" - echo "y"|${MKFS_BIN} --fs-features=${O} -b ${B} -C ${C} -L ${L} ${slot_opts} ${journal_opts} ${R} ${D} ${blocks}>>${logfile} 2>&1 + f_LogMsg ${logfile} "${MKFS_BIN} --fs-features=${O} ${cluster_stack} ${cluster_name} \ +-b ${B} -C ${C} -L ${L} ${slot_opts} ${journal_opts} ${R} ${D} ${blocks}" + echo "y"|${MKFS_BIN} --fs-features=${O} ${cluster_stack} ${cluster_name} \ +-b ${B} -C ${C} -L ${L} ${slot_opts} ${journal_opts} ${R} ${D} ${blocks}>>${logfile} 2>&1 RET=$? if [ "${RET}" != "0" ];then
programs/python_common/single_run-WIP.sh +50 -25
226 lines not on this page · raw message
programs/reflink_tests/multi_reflink_test_run.sh +9 -3
@@ -70,6 +70,8 @@ LOG_FILE= MOUNT_OPTS= AIO_OPT= +CLUSTER_STACK= +CLUSTER_NAME= DEFAULT_RANKS=4 MPI_RANKS=
@@ -90,7 +92,7 @@ set -o pipefail function f_usage() { echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> \ -[-a access method] [-o logdir] <-d <device>> <-b block size> <-c cluster size> [-W] [-A] <mountpoint path>" +[-a access method] [-o logdir] <-d <device>> <-b block size> <-c cluster size> <-s <cluster stack>> <-n <cluster name>> [-W] [-A] <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for mpi execution,should be ssh or rsh" echo " -f MPI hosts list,separated by comma"
@@ -101,6 +103,8 @@ function f_usage() echo " -i Network Interface name to be used for MPI messaging." echo " -W enable data=writeback mode" echo " -A enable asynchronous io testing mode" + echo " -s cluster stack" + echo " -n cluster name" echo " <mountpoint path> specify the mounting point." exit 1;
@@ -112,7 +116,7 @@ function f_getoptions() exit 1 fi - while getopts "o:d:i:r:f:WAha:b:c:" options; do + while getopts "o:d:i:r:f:WAha:b:c:s:n:" options; do case $options in r ) MPI_RANKS="$OPTARG";; f ) MPI_HOSTS="$OPTARG";;
@@ -124,6 +128,8 @@ function f_getoptions() c ) CLUSTERSIZE="$OPTARG";; W ) MOUNT_OPTS="data=writeback";; A ) AIO_OPT=" -A ";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -195,7 +201,7 @@ function f_runtest() { f_LogRunMsg ${RUN_LOG_FILE} "[*] Mkfs device ${DEVICE}:" f_mkfs ${LOG_FILE} ${BLOCKSIZE} ${CLUSTERSIZE} ${LABELNAME} ${SLOTS} \ -${DEVICE} "refcount,xattr" ${JOURNALSIZE} ${BLOCKS} +${DEVICE} "refcount,xattr" ${JOURNALSIZE} ${BLOCKS} ${CLUSTER_STACK} ${CLUSTER_NAME} RET=$? f_echo_status ${RET}| tee -a ${RUN_LOG_FILE} f_exit_or_not ${RET}
programs/reflink_tests/reflink_test_run.sh +6 -2
@@ -101,6 +101,8 @@ function f_usage() [-v verify_log] [-W] [-A] [-o logdir] <-d device> <-b blocksize> <-c clustersize> <mountpoint path>" echo " -o output directory for the logs" echo " -d block device name used for ocfs2 volume" + echo " -s cluster stack" + echo " -n cluster name" echo " -W enable data=writeback mode" echo " -A enable asynchronous io testing mode" echo " -D enable destructive test,it will crash the testing node,\
@@ -119,7 +121,7 @@ function f_getoptions() exit 1 fi - while getopts "o:WDAhd:a:p:v:b:c:" options; do + while getopts "o:WDAhd:a:p:v:b:c:s:n:" options; do case $options in o ) LOG_DIR="$OPTARG";; d ) DEVICE="$OPTARG";;
@@ -131,6 +133,8 @@ function f_getoptions() v ) VERI_LOG="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; c ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage;; * ) f_usage;; esac
@@ -422,7 +426,7 @@ ${WORK_PLACE} -v ${VERI_LOG} >>${LOG_FILE} 2>&1 f_LogRunMsg ${RUN_LOG_FILE} "[*] Mkfs device ${DEVICE}:" f_mkfs ${LOG_FILE} ${BLOCKSIZE} ${CLUSTERSIZE} ${LABELNAME} ${SLOTS} \ -${DEVICE} "refcount,xattr" ${JOURNALSIZE} ${BLOCKS} +${DEVICE} "refcount,xattr" ${JOURNALSIZE} ${BLOCKS} ${CLUSTER_STACK} ${CLUSTER_NAME} RET=$? f_echo_status ${RET}| tee -a ${RUN_LOG_FILE} f_exit_or_not ${RET}
programs/tunefs-test/tunefs-test.sh +7 -4
@@ -167,8 +167,8 @@ function test_summary() Set_Volume_For_Test() { LogMsg "tunefs_test : Initializing volume for test" - echo "y"| ${MKFS_BIN} ${FS_FEATURES} -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -L ${LABEL1} -N ${NNODES1} \ - -J size=${JOURNAL1} ${2} ${DEVICE} ${1} 2>&1 >> ${MKFSLOG} + echo "y"| ${MKFS_BIN} ${FS_FEATURES} --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} \ +-b ${BLOCKSIZE} -C ${CLUSTERSIZE} -L ${LABEL1} -N ${NNODES1} -J size=${JOURNAL1} ${2} ${DEVICE} ${1} 2>&1 >> ${MKFSLOG} Check_Volume; } #
@@ -237,7 +237,8 @@ Test_Query() (( ++NUM_OF_TESTS )) # Set_Volume_For_Test ${BLKCNT1} --fs-feature-level=default echo "y"| ${MKFS_BIN} -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -L ${LABEL1} -N ${NNODES1} \ - -J size=${JOURNAL1} --fs-feature-level=default ${DEVICE} ${BLKCNT1} 2>&1 >> ${MKFSLOG} +-J size=${JOURNAL1} --fs-feature-level=default --cluster-stack=${CLUSTER_STACK} \ +--cluster-name=${CLUSTER_NAME} ${DEVICE} ${BLKCNT1} 2>&1 >> ${MKFSLOG} CURRENT_TEST="Test Query"; QRY1="Blks=%B\nClus=%T\nSlot=%N\nRoot=%R\nSysd=%Y\nFclg=%P\n"; QRY2="Labl=%V\nUuid=%U\n";
@@ -661,7 +662,7 @@ TUNEFS_TEST=`basename $0` bindir=`basename ${0}` LOG_DIR=`basename ${bindir}` -while getopts "d:o:m:b:c:" args +while getopts "d:o:m:b:c:s:n:" args do case "$args" in o) LOG_DIR="$OPTARG";;
@@ -669,6 +670,8 @@ do m) MOUNT_POINT="$OPTARG";; b) BLOCKSIZE="$OPTARG";; c) CLUSTERSIZE="$OPTARG";; + s) CLUSTER_STACK="$OPTARG";; + n) CLUSTER_NAME="$OPTARG";; esac done
programs/xattr_tests/xattr-multi-run.sh +12 -3
@@ -69,6 +69,8 @@ LOG_OUT_DIR= LOG_FILE= RUN_LOG_FILE= MOUNT_POINT= +CLUSTER_STACK= +CLUSTER_NAME= OCFS2_DEVICE= SLOTS=
@@ -145,7 +147,7 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <-b blocksize> <-c clustersize> <mountpoint path>" + echo "usage: `basename ${0}` [-r MPI_Ranks] <-f MPI_Hosts> [-a access method] [-o output] [-i interface] <-d <device>> <-b blocksize> <-c clustersize> <-s cluster-stack> <-n cluster-name> <mountpoint path>" echo " -r size of MPI rank" echo " -a access method for process propagation,should be ssh or rsh,set ssh as a default method when omited." echo " -f MPI hosts list,separated by comma,e.g -f node1.us.oracle.com,node2.us.oracle.com."
@@ -154,10 +156,13 @@ f_usage() echo " -d specify the device which has been formated as an ocfs2 volume." echo " -b block size." echo " -c cluster size." + echo " -s cluster stack." + echo " -n cluster name." echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1; } + f_getoptions() { if [ $# -eq 0 ]; then
@@ -165,7 +170,7 @@ f_getoptions() exit 1 fi - while getopts "o:d:r:f:a:h:i:b:c:" options; do + while getopts "o:d:r:f:a:h:i:b:c:s:n:" options; do case $options in r ) MPI_RANKS="$OPTARG";; f ) MPI_HOSTS="$OPTARG";;
@@ -175,12 +180,16 @@ f_getoptions() i ) INTERFACE="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; c ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; + h ) f_usage exit 1;; * ) f_usage exit 1;; esac done + shift $(($OPTIND -1)) MOUNT_POINT=${1} }
@@ -256,7 +265,7 @@ f_do_mkfs_and_mount() { echo -n "Mkfsing device(-b ${BLOCKSIZE} -C ${CLUSTERSIZE}): "|tee -a ${RUN_LOG_FILE} - echo y|${MKFS_BIN} --fs-features=xattr -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N ${SLOTS} -L ${LABEL} ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 + echo y|${MKFS_BIN} --fs-features=xattr -b ${BLOCKSIZE} -C ${CLUSTERSIZE} --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} -N ${SLOTS} -L ${LABEL} ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 RET=$? echo_status ${RET} |tee -a ${RUN_LOG_FILE}
programs/xattr_tests/xattr-single-run.sh +9 -4
@@ -144,12 +144,15 @@ exit_or_not() ################################################################################ f_usage() { - echo "usage: `basename ${0}` [-c] [-o output_log_dir] <-d <device>> <-b <block size>> <-C <cluster size>> <mountpoint path>" + echo "usage: `basename ${0}` [-c] [-o output_log_dir] <-d <device>> <-b <block size>> \ +<-s <stack name>> <-c <cluster name>> <-C <cluster size>> <mountpoint path>" echo " -c enable the combination test for inline-data and inline-xattr." echo " -o output directory for the logs" echo " -d specify the device which has been formated as an ocfs2 volume." echo " -b block size." echo " -C cluster size." + echo " -s cluster stack." + echo " -n cluster name." echo " <mountpoint path> path of mountpoint where the ocfs2 volume will be mounted on." exit 1;
@@ -162,13 +165,15 @@ f_getoptions() exit 1 fi - while getopts "cho:d:b:C:" options; do + while getopts "cho:d:b:C:s:n:" options; do case $options in c ) COMBIN_TEST="1";; o ) LOG_OUT_DIR="$OPTARG";; d ) OCFS2_DEVICE="$OPTARG";; b ) BLOCKSIZE="$OPTARG";; C ) CLUSTERSIZE="$OPTARG";; + s ) CLUSTER_STACK="$OPTARG";; + n ) CLUSTER_NAME="$OPTARG";; h ) f_usage exit 1;; * ) f_usage
@@ -226,9 +231,9 @@ f_do_mkfs_and_mount() echo -n "Mkfsing device:"|tee -a ${RUN_LOG_FILE} if [ -z "${COMBIN_TEST}" ];then - echo y|${MKFS_BIN} --fs-features=xattr -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 1 ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 + echo y|${MKFS_BIN} --fs-features=xattr --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 1 ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 else - echo y|${MKFS_BIN} --fs-features=xattr,inline-data -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 1 ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 + echo y|${MKFS_BIN} --fs-features=xattr,inline-data --cluster-stack=${CLUSTER_STACK} --cluster-name=${CLUSTER_NAME} -b ${BLOCKSIZE} -C ${CLUSTERSIZE} -N 1 ${OCFS2_DEVICE} ${BLOCKNUMS}>>${RUN_LOG_FILE} 2>&1 fi RET=$? echo_status ${RET} |tee -a ${RUN_LOG_FILE}
Signature · 1 line
2.6.6
PATCH 13/17 Save punch_hole details into logfile for debugging convenience
In reply to Eric Ren--- programs/discontig_bg_test/discontig_runner.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
programs/discontig_bg_test/discontig_runner.sh +8 -5
@@ -41,6 +41,7 @@ DEFAULT_LOG_DIR=${O2TDIR}/log LOG_DIR= RUN_LOG_FILE= LOG_FILE= +PUNCH_LOG_FILE= BLOCKSIZE= CLUSTERSIZE=
@@ -162,6 +163,8 @@ function f_setup() %M-%S`-discontig-bg-run.log" LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ %M-%S`-discontig-bg.log" + PUNCH_LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ +%M-%S`-punch-hole.log" }
@@ -529,7 +532,7 @@ function f_extents_test() recs_in_blk=$(((${BLOCKSIZE}-64)/16)) while :;do if [ "$((${RANDOM}%2))" -eq "0" ];then - ${PUNCH_HOLE_BIN} -f ${filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>/dev/null 2>&1 || { + ${PUNCH_HOLE_BIN} -f ${filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>${PUNCH_LOG_FILE} 2>&1 || { f_LogMsg ${LOG_FILE} "Punch hole at offset:${offset} failed." return 1 }
@@ -798,13 +801,13 @@ function f_refcount_test() fi while :;do if [ "$((${RANDOM}%2))" -eq "0" ];then - ${PUNCH_HOLE_BIN} -f ${orig_filename} -s ${offset} -l ${CLUSTERSIZE} >>/dev/null 2>&1 || { + ${PUNCH_HOLE_BIN} -f ${orig_filename} -s ${offset} -l ${CLUSTERSIZE} >>${PUNCH_LOG_FILE} 2>&1 || { f_LogMsg ${LOG_FILE} "Punch hole at offset:${offset} failed on ${orig_filename}." return 1 } fi if [ "$((${RANDOM}%2))" -eq "1" ];then - ${PUNCH_HOLE_BIN} -f ${ref_filename} -s ${offset} -l ${CLUSTERSIZE} >>/dev/null 2>&1 || { + ${PUNCH_HOLE_BIN} -f ${ref_filename} -s ${offset} -l ${CLUSTERSIZE} >>${PUNCH_LOG_FILE} 2>&1 || { f_LogMsg ${LOG_FILE} "Punch hole at offset:${offset} failed on ${ref_filename}." return 1 }
@@ -822,14 +825,14 @@ function f_refcount_test() recs_in_blk=$(((${BLOCKSIZE}-64)/16)) while :;do if [ "$((${RANDOM}%2))" -eq "0" ];then - ${PUNCH_HOLE_BIN} -f ${orig_filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>/dev/null 2>&1 || { + ${PUNCH_HOLE_BIN} -f ${orig_filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>${PUNCH_LOG_FILE} 2>&1 || { f_LogMsg ${LOG_FILE} "Punch hole at offset:${offset} failed on ${orig_filename}." return 1 } fi if [ "$((${RANDOM}%2))" -eq "1" ];then - ${PUNCH_HOLE_BIN} -f ${ref_filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>/dev/null 2>&1 || { + ${PUNCH_HOLE_BIN} -f ${ref_filename} -s ${offset} -l $((${CLUSTERSIZE}*${recs_in_blk})) >>${PUNCH_LOG_FILE} 2>&1 || { f_LogMsg ${LOG_FILE} "Punch hole at offset:${offset} failed on ${ref_filename}." return 1 }
Signature · 1 line
2.6.6
PATCH 14/17 Fix openmpi warning by specifying proper slot number
In reply to Eric RenThe warning message as below:
"
There are not enough slots available in the system to satisfy the 4 slots
that were requested by the application:
./xattr-multi-test
Either request fewer slots for your application, or make more slots available
for use.
"
outputs when specifying a rank number for openmpi more than "mkfs" slots.
--- programs/python_common/multiple_run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
programs/python_common/multiple_run.sh +3 -3
@@ -368,7 +368,7 @@ run_xattr_test() local logdir=${LOG_DIR}/multi-xattr-test LogRunMsg "xattr-test" - ${BINDIR}/xattr-multi-run.sh -r 4 -f ${NODE_LIST} -a ssh -o ${logdir} \ + ${BINDIR}/xattr-multi-run.sh -r ${SLOTS} -f ${NODE_LIST} -a ssh -o ${logdir} \ -d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -378,7 +378,7 @@ run_inline_test() local logdir=${LOG_DIR}/multi-inline-test LogRunMsg "inline-test" - ${BINDIR}/multi-inline-run.sh -r 2 -f ${NODE_LIST} -a ssh -o ${logdir} \ + ${BINDIR}/multi-inline-run.sh -r ${SLOTS} -f ${NODE_LIST} -a ssh -o ${logdir} \ -d ${DEVICE} -b ${BLOCKSIZE} -c ${CLUSTERSIZE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 LogRC $? }
@@ -389,7 +389,7 @@ run_reflink_test() LogRunMsg "reflink-test" LogMsg "reflink 'data=ordered' mode test" - ${BINDIR}/multi_reflink_test_run.sh -r 4 -f ${NODE_LIST} -a ssh -o \ + ${BINDIR}/multi_reflink_test_run.sh -r ${SLOTS} -f ${NODE_LIST} -a ssh -o \ ${logdir} -d ${DEVICE} -s ${CLUSTER_STACK} -n ${CLUSTER_NAME} ${MOUNT_POINT} >> ${LOGFILE} 2>&1 || { RET=$? LogRC $RET
Signature · 1 line
2.6.6
PATCH 15/17 Handle the case when a symbolic link device is given
In reply to Eric RenIt's a usual case that the shared disk is given in symbolic name, like iscsi disk "/dev/disk/by-path/disk". So work out the typical device name in such case.
--- programs/discontig_bg_test/discontig_runner.sh | 5 +++++ programs/python_common/multiple_run.sh | 13 +++++++++++++ programs/python_common/single_run-WIP.sh | 6 ++++++ 3 files changed, 24 insertions(+)
programs/discontig_bg_test/discontig_runner.sh +5 -0
@@ -126,6 +126,11 @@ function f_setup() if [ -z "${DEVICE}" ];then f_usage fi + + # if a symbollink is given, work out the typical device name, like /dev/sda + if [ -L ${DEVICE} ];then + DEVICE=`readlink -f ${DEVICE}` + fi if [ -z "${MOUNT_POINT}" ];then f_usage
programs/python_common/multiple_run.sh +13 -0
@@ -135,6 +135,19 @@ f_setup() f_getoptions $* + if [ -z ${DEVICE} ] ; then + ${ECHO} "ERROR: No device" + f_usage + elif [ ! -b ${DEVICE} ] ; then + ${ECHO} "ERROR: Invalid device ${DEVICE}" + exit 1 + fi + + # if a symbollink is given, work out the typical device name, like /dev/sda + if [ -L ${DEVICE} ];then + DEVICE=`readlink -f ${DEVICE}` + fi + if [ -z "${MOUNT_POINT}" ];then f_usage fi
programs/python_common/single_run-WIP.sh +6 -0
@@ -1095,6 +1095,7 @@ do ?) usage;; esac done + if [ -z ${DEVICE} ] ; then ${ECHO} "ERROR: No device" usage
@@ -1103,6 +1104,11 @@ elif [ ! -b ${DEVICE} ] ; then exit 1 fi +# if a symbollink is given, work out the typical device name, like /dev/sda +if [ -L ${DEVICE} ];then + DEVICE=`readlink -f ${DEVICE}` +fi + if [ -z ${MOUNTPOINT} ] ; then ${ECHO} "ERROR: No mountpoint" usage
Signature · 1 line
2.6.6
PATCH 16/17 inline data: fix build error
In reply to Eric Ren--- programs/defrag-test/frager.c | 2 +- programs/directio_test/directio_test.c | 2 +- programs/discontig_bg_test/spawn_inodes.c | 2 +- programs/dx_dirs_tests/index_dir.c | 2 +- programs/inline-data/inline-data.c | 2 +- programs/inline-data/inline-dirs.c | 2 +- programs/reflink_tests/reflink_test.c | 2 +- programs/xattr_tests/xattr-test.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
programs/defrag-test/frager.c +1 -1
@@ -86,7 +86,7 @@ static int usage(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/directio_test/directio_test.c +1 -1
@@ -214,7 +214,7 @@ static int teardown(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/discontig_bg_test/spawn_inodes.c +1 -1
@@ -64,7 +64,7 @@ static int usage(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/dx_dirs_tests/index_dir.c +1 -1
@@ -926,7 +926,7 @@ void random_test(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/inline-data/inline-data.c +1 -1
@@ -256,7 +256,7 @@ static int teardown(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/inline-data/inline-dirs.c +1 -1
@@ -357,7 +357,7 @@ static void run_large_dir_tests(void)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/reflink_tests/reflink_test.c +1 -1
@@ -965,7 +965,7 @@ static int stress_test()static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );
programs/xattr_tests/xattr-test.c +1 -1
@@ -301,7 +301,7 @@ static void judge_sys_return(int ret, const char *sys_func)static void sigchld_handler () {pid_t pid; -union wait status; +int status;while (1 ) { pid =wait3 (&status,WNOHANG ,NULL );if (pid <=0 )
Signature · 1 line
2.6.6
PATCH 17/17 discontig bg: give single and multiple node test different log file name
In reply to Eric Ren--- programs/discontig_bg_test/discontig_runner.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
programs/discontig_bg_test/discontig_runner.sh +7 -2
@@ -164,8 +164,13 @@ function f_setup() LOG_DIR=${LOG_DIR:-$DEFAULT_LOG_DIR} ${MKDIR_BIN} -p ${LOG_DIR} || exit 1 - RUN_LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ -%M-%S`-discontig-bg-run.log" + if [ -n "${MULTI_TEST}" ];then + RUN_LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ +%M-%S`-discontig-bg-multiple-run.log" + else + RUN_LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ +%M-%S`-discontig-bg-single-run.log" + fi LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\ %M-%S`-discontig-bg.log" PUNCH_LOG_FILE="`dirname ${LOG_DIR}`/`basename ${LOG_DIR}`/`date +%F-%H-\
Signature · 1 line
2.6.6
cover ocfs2-test: misc improvements and trivial fixes
In reply to Eric RenHi all,
I will push this patches into "suse" branch at Mark's github repo, considering no review accepted for more than 2 weeks.
According to Mark's advice, patch can be merged only when it has a review;-)
Thanks,
Eric
Quoted 37 lines · Eric Ren
- Misc trivial fixes:
[PATCH 01/17] ocfs2 test: correct the check on testcase if supported [PATCH 02/17] Single Run: kernel building is little broken now [PATCH 03/17] Trivial: better not to depend on where we issue testing [PATCH 04/17] Trivial: fix a typo mistake
[PATCH 05/17] Trivial: fix checking empty return value [PATCH 06/17]multi_mmap: make log messages go to right place [PATCH 07/17]lvb_torture: failed when pcmk is used as cluster stack [PATCH 08/17] multiple node: passcross_deletethe right log file- This patches add two more parameters: blocksize and clustersize when we kick off a testing, which shortens the run time of a testing round. It will keep the old behaviors if they are not specified.
[PATCH 09/17] Single run: make blocksize and clustersize as [PATCH 10/17] Multiple run: make blocksize and clustersize as [PATCH 11/17] discontig bg: make blocksize and clustersize as
- This patch reflects the mkfs.ocfs2 changes that "--cluster-stack" and "--cluster-name" were added.
[PATCH 12/17] Add two cluster-aware parameters: cluster stack and cluster name
- More misc trival fixes:
[PATCH 13/17] Save
punch_holedetails into logfile for debugging [PATCH 14/17] Fix openmpi warning by specifying proper slot number [PATCH 15/17] Handle the case when a symbolic link device is given [PATCH 16/17] inline data: fix build error
[PATCH 17/17] discontig bg: give single and multiple node testComments and questions are, as always, welcome.
Thanks,
Eric