X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flustre-rsync-test.sh;h=b16979ec34870cdc7083a9ec70fb3eb70af9b0e2;hb=608cce73d51;hp=b32bc7113ae6e3d2634dc76899ddd32644fd8502;hpb=5cc2da46349bc38075d6a99e65a7efff2812ebc2;p=fs%2Flustre-release.git diff --git a/lustre/tests/lustre-rsync-test.sh b/lustre/tests/lustre-rsync-test.sh index b32bc71..b16979e 100644 --- a/lustre/tests/lustre-rsync-test.sh +++ b/lustre/tests/lustre-rsync-test.sh @@ -1,38 +1,30 @@ #!/bin/bash -# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*- -# vim:shiftwidth=4:softtabstop=4:tabstop=4: # # Run select tests by setting ONLY, or as arguments to the script. # Skip specific tests by setting EXCEPT. # -# Run test by setting NOSETUP=true when ltest has setup env for us set -e -SRCDIR=`dirname $0` -export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin - ONLY=${ONLY:-"$*"} -# bug number for skipped test: -ALWAYS_EXCEPT="$LRSYNC_EXCEPT" -# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! - -[ "$SLOW" = "no" ] && EXCEPT_SLOW="" - -[ "$ALWAYS_EXCEPT$EXCEPT" ] && - echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT`" KILL=/bin/kill - -TMP=${TMP:-/tmp} LREPL_LOG=$TMP/lustre_rsync.log ORIG_PWD=${PWD} -LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} +LUSTRE=${LUSTRE:-$(dirname $0)/..} . $LUSTRE/tests/test-framework.sh init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging +ALWAYS_EXCEPT="$LRSYNC_EXCEPT " +# bug number for skipped test: LU-4256 +ALWAYS_EXCEPT+=" 2b" +# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! + +build_test_filter + +[ -n "$FILESET" ] && skip "Not functional for FILESET set" + check_and_setup_lustre DIR=${DIR:-$MOUNT} @@ -46,8 +38,6 @@ else error "No generic nobody group" fi -build_test_filter - export LRSYNC=${LRSYNC:-"$LUSTRE/utils/lustre_rsync"} [ ! -f "$LRSYNC" ] && export LRSYNC=$(which lustre_rsync) export LRSYNC="$LRSYNC -v -c no -d 2" @@ -77,7 +67,8 @@ init_src() { rm -rf $TGT2/$tdir $TGT2/d*.lustre_rsync-test 2> /dev/null rm -rf ${DIR}/$tdir $DIR/d*.lustre_rsync-test ${DIR}/tgt 2> /dev/null rm -f $LREPL_LOG - mkdir -p ${DIR}/$tdir || error "Failed to create target: " $DIR/$tdir + + mkdir_on_mdt0 $DIR/$tdir || error "Failed to create target: " $DIR/$tdir mkdir -p ${TGT}/$tdir || error "Failed to create target: " $TGT/$tdir mkdir -p ${TGT2}/$tdir || error "Failed to create target: " $TGT2/$tdir } @@ -239,7 +230,7 @@ test_1a() { # LU-5005 init_changelog # Directory create - mkdir $DIR/root-dir + mkdir_on_mdt0 $DIR/root-dir # File create touch $DIR/root-file @@ -250,7 +241,7 @@ test_1a() { # LU-5005 # File and directory delete touch $DIR/root-file4 - mkdir $DIR/root-dir1 + mkdir_on_mdt0 $DIR/root-dir1 rm $DIR/root-file4 rm -rf $DIR/root-dir1 @@ -453,19 +444,16 @@ run_test 3c "Replicate files created by createmany/unlinkmany" # Test 4 - Replicate files created by iozone test_4() { - which iozone > /dev/null 2>&1 - if [ $? -ne 0 ]; then - skip "iozone not found. Skipping test" - return - fi + which iozone > /dev/null 2>&1 + [ $? -ne 0 ] && skip "iozone not found" - init_src - init_changelog + init_src + init_changelog - END_RUN_FILE=${DIR}/$tdir/run LOAD_PID_FILE=${DIR}/$tdir/pid \ - MOUNT=${DIR}/$tdir run_iozone.sh & - sleep 30 - child_pid=$(pgrep iozone) + END_RUN_FILE=${DIR}/$tdir/run LOAD_PID_FILE=${DIR}/$tdir/pid \ + MOUNT=${DIR}/$tdir run_iozone.sh & + sleep 30 + child_pid=$(pgrep iozone) stop_procs $child_pid local LRSYNC_LOG=$(generate_logname "lrsync_log")