Whamcloud - gitweb
LU-1538 tests: delete test files from /tmp after use 15/8615/3
authorAndreas Dilger <andreas.dilger@intel.com>
Wed, 23 Oct 2013 04:03:52 +0000 (22:03 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 22 Feb 2014 08:06:34 +0000 (08:06 +0000)
Delete files created for tests in /tmp after testing has finished.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8c3fb62f844cb50d82eba81f274d86c73e3d2e08
Reviewed-on: http://review.whamcloud.com/8615
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/cfg/local.sh
lustre/tests/cfg/ncli.sh
lustre/tests/recovery-small.sh
lustre/tests/sanity.sh
lustre/tests/sanityn.sh
lustre/tests/test-framework.sh

index 892178d..7213bb2 100644 (file)
@@ -1,10 +1,10 @@
 FSNAME=${FSNAME:-lustre}
 
 # facet hosts
 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}
 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=""
 
 ostfailover_HOST=${ostfailover_HOST}
 CLIENTS=""
 
@@ -53,7 +53,7 @@ OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-}
 # OSTDEV1="/dev/sdb1"
 
 NETTYPE=${NETTYPE:-tcp}
 # 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
 
 #
 # 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"}
 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
 LQUOTAOPTS=${LQUOTAOPTS:-"hash_lqs_cur_bits=3"}
 
 #client
index d9afd5d..59ee009 100644 (file)
@@ -1,13 +1,16 @@
 . $LUSTRE/tests/cfg/local.sh
 
 . $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
 
 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
 
 
 [ -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
 
 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)
 
 done
 CLIENT_LOADS=($LOADS)
 
index ee148e0..4bc7301 100755 (executable)
@@ -264,6 +264,7 @@ test_16() {
        sleep $TIMEOUT
        do_facet client "cmp $TMP/$tfile $DIR/$tfile" || return 2
        start_read_ahead
        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)"
 
 }
 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
     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"
     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
     # 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)"
     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
     # 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)"
     return $rc
 }
 run_test 18c "Dropped connect reply after eviction handing (14755)"
index b0220e2..f580097 100644 (file)
@@ -11959,6 +11959,7 @@ test_900() {
 run_test 900 "umount should not race with any mgc requeue thread"
 
 complete $SECONDS
 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
 check_and_cleanup_lustre
 if [ "$I_MOUNTED" != "yes" ]; then
        lctl set_param debug="$OLDDEBUG" 2> /dev/null || true
index 8b130e3..b6222a7 100644 (file)
@@ -2627,5 +2627,6 @@ log "cleanup: ======================================================"
 [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2
 
 complete $SECONDS
 [ "$(mount | grep $MOUNT2)" ] && umount $MOUNT2
 
 complete $SECONDS
+rm -f $SAMPLE_FILE
 check_and_cleanup_lustre
 exit_status
 check_and_cleanup_lustre
 exit_status
index b4a5ade..0292bc2 100644 (file)
@@ -3249,6 +3249,12 @@ mkfs_opts() {
                opts+=${L_GETIDENTITY:+" --param=mdt.identity_upcall=$L_GETIDENTITY"}
 
                if [ $fstype == ldiskfs ]; then
                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"}
                        fs_mkfs_opts+=${MDSJOURNALSIZE:+" -J size=$MDSJOURNALSIZE"}
                        if [ ! -z $EJOURNAL ]; then
                                fs_mkfs_opts+=${MDSJOURNALSIZE:+" device=$EJOURNAL"}