From: Andreas Dilger Date: Wed, 23 Oct 2013 04:03:52 +0000 (-0600) Subject: LU-1538 tests: delete test files from /tmp after use X-Git-Tag: 2.5.56~13 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8ce48257490f20ec7f11929a42ab3891139a9d8c;p=fs%2Flustre-release.git LU-1538 tests: delete test files from /tmp after use Delete files created for tests in /tmp after testing has finished. Signed-off-by: Andreas Dilger Change-Id: I8c3fb62f844cb50d82eba81f274d86c73e3d2e08 Reviewed-on: http://review.whamcloud.com/8615 Tested-by: Jenkins Reviewed-by: Jian Yu Reviewed-by: Emoly Liu Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh index 892178d..7213bb2 100644 --- a/lustre/tests/cfg/local.sh +++ b/lustre/tests/cfg/local.sh @@ -1,10 +1,10 @@ FSNAME=${FSNAME:-lustre} # facet hosts -mds_HOST=${mds_HOST:-`hostname`} +mds_HOST=${mds_HOST:-$(hostname)} mdsfailover_HOST=${mdsfailover_HOST} mgs_HOST=${mgs_HOST:-$mds_HOST} -ost_HOST=${ost_HOST:-`hostname`} +ost_HOST=${ost_HOST:-$(hostname)} ostfailover_HOST=${ostfailover_HOST} CLIENTS="" @@ -53,7 +53,7 @@ OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-} # OSTDEV1="/dev/sdb1" NETTYPE=${NETTYPE:-tcp} -MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`} +MGSNID=${MGSNID:-$(h2$NETTYPE $mgs_HOST)} # # Back end file system type(s) of facets can be specified with these @@ -91,6 +91,8 @@ DEBUG_SIZE=${DEBUG_SIZE:-$_debug_mb} ENABLE_QUOTA=${ENABLE_QUOTA:-""} QUOTA_TYPE="ug3" QUOTA_USERS=${QUOTA_USERS:-"quota_usr quota_2usr sanityusr sanityusr1"} +# "error: conf_param: No such device" issue in every test suite logs +# sanity-quota test_32 hash_lqs_cur_bits is not set properly LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"} #client diff --git a/lustre/tests/cfg/ncli.sh b/lustre/tests/cfg/ncli.sh index d9afd5d..59ee009 100644 --- a/lustre/tests/cfg/ncli.sh +++ b/lustre/tests/cfg/ncli.sh @@ -1,13 +1,16 @@ . $LUSTRE/tests/cfg/local.sh -CLIENT1=${CLIENT1:-`hostname`} +# For multiple clients testing, we need use the cfg/ncli.sh config file, and +# only need specify the "RCLIENTS" variable. The "CLIENTS" and "CLIENTCOUNT" +# variables are defined in init_clients_lists(), called from cfg/ncli.sh. +CLIENT1=${CLIENT1:-$(hostname)} SINGLECLIENT=$CLIENT1 RCLIENTS=${RCLIENTS:-""} init_clients_lists -[ -n "$RCLIENTS" -a "$PDSH" = "no_dsh" ] && \ - error "tests for remote clients $RCLIENTS needs pdsh != do_dsh " || true +[ -n "$RCLIENTS" -a "$PDSH" = "no_dsh" ] && + error "tests for remote clients $RCLIENTS needs pdsh != do_dsh " || true [ -n "$FUNCTIONS" ] && . $FUNCTIONS || true @@ -17,8 +20,7 @@ export PATH=/opt/iozone/bin:$PATH LOADS=${LOADS:-"dd tar dbench iozone"} for i in $LOADS; do - [ -f $LUSTRE/tests/run_${i}.sh ] || \ - error "incorrect load: $i" + [ -f $LUSTRE/tests/run_${i}.sh ] || error "incorrect load: $i" done CLIENT_LOADS=($LOADS) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index ee148e0..4bc7301 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -264,6 +264,7 @@ test_16() { sleep $TIMEOUT do_facet client "cmp $TMP/$tfile $DIR/$tfile" || return 2 start_read_ahead + rm -f $TMP/$tfile } run_test 16 "timeout bulk put, don't evict client (2732)" @@ -332,7 +333,7 @@ test_18a() { rc=0 pgcache_empty || rc=2 $LCTL --device $osc2dev activate - rm -f $f + rm -f $f $TMP/$tfile return $rc } run_test 18a "manual ost invalidate clears page cache immediately" @@ -365,7 +366,7 @@ test_18b() { # cache after the client reconnects? rc=0 pgcache_empty || rc=2 - rm -f $f + rm -f $f $TMP/$tfile return $rc } run_test 18b "eviction and reconnect clears page cache (2766)" @@ -404,7 +405,7 @@ test_18c() { # cache after the client reconnects? rc=0 pgcache_empty || rc=2 - rm -f $f + rm -f $f $TMP/$tfile return $rc } run_test 18c "Dropped connect reply after eviction handing (14755)" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index b0220e2..f580097 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -11959,6 +11959,7 @@ test_900() { run_test 900 "umount should not race with any mgc requeue thread" complete $SECONDS +[ -f $EXT2_DEV ] && rm $EXT2_DEV || true check_and_cleanup_lustre if [ "$I_MOUNTED" != "yes" ]; then lctl set_param debug="$OLDDEBUG" 2> /dev/null || true diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 8b130e3..b6222a7d 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -2627,5 +2627,6 @@ log "cleanup: ======================================================" [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2 complete $SECONDS +rm -f $SAMPLE_FILE check_and_cleanup_lustre exit_status diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index b4a5ade..0292bc2 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -3249,6 +3249,12 @@ mkfs_opts() { opts+=${L_GETIDENTITY:+" --param=mdt.identity_upcall=$L_GETIDENTITY"} if [ $fstype == ldiskfs ]; then + # Check for wide striping + if [ $OSTCOUNT -gt 160 ]; then + MDSJOURNALSIZE=${MDSJOURNALSIZE:-4096} + fs_mkfs_opts+="-O large_xattr" + fi + fs_mkfs_opts+=${MDSJOURNALSIZE:+" -J size=$MDSJOURNALSIZE"} if [ ! -z $EJOURNAL ]; then fs_mkfs_opts+=${MDSJOURNALSIZE:+" device=$EJOURNAL"}