Whamcloud - gitweb
LU-5473 tests: print space usage in sanity test_51b 85/12185/7
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 24 Oct 2014 07:23:14 +0000 (00:23 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 17 Nov 2014 17:54:05 +0000 (17:54 +0000)
In sanity.sh test_51b print out the space usage before and after
the test so that the failure can be debugged.

Skip test_51b and test_51ba for ZFS when running regular review
tests, since there isn't a limit of 60000 subdirectories (ZFS
nlink is a 64-bit number), and they take a long time to run in
a VM (20 minutes combined).

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=51 \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientdistro=el6 ossdistro=el6 mdsdistro=el6 \
mdtcount=1 mdssizegb=2 ostcount=2 ostsizegb=8 \
testlist=sanity

Test-Parameters: alwaysuploadlogs \
envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=51 \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientdistro=el6 ossdistro=el6 mdsdistro=el6 \
mdtcount=1 mdssizegb=2 ostcount=2 ostsizegb=8 nettypes=o2ib \
testlist=sanity

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I21b072fbcb05dea3fd7803bf3353de11ffbcab07
Reviewed-on: http://review.whamcloud.com/12185
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity.sh

index 958e7b4..238e756 100644 (file)
@@ -60,9 +60,11 @@ init_logging
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 64b 68 71 77f 78 115 124b 230d"
 
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 64b 68 71 77f 78 115 124b 230d"
 
-[ $(facet_fstype $SINGLEMDS) = "zfs" ] &&
-# bug number for skipped test:        LU-1593 LU-2833 LU-1957 LU-2805
-       ALWAYS_EXCEPT="$ALWAYS_EXCEPT 34h     48a     180     184c"
+if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
+       # bug number for skipped test: LU-1593 LU-2833 LU-1957 LU-2805
+       ALWAYS_EXCEPT="$ALWAYS_EXCEPT  34h     48a     180     184c"
+       [ "$SLOW" = "no" ] && EXCEPT_SLOW="$EXCEPT_SLOW 51b 51ba"
+fi
 
 FAIL_ON_ERROR=false
 
 
 FAIL_ON_ERROR=false
 
@@ -3976,22 +3978,30 @@ test_51b() {
 
        test_mkdir -p -c1 $BASE
 
 
        test_mkdir -p -c1 $BASE
 
+       $LFS df
+       $LFS df -i
        local mdtidx=$(printf "%04x" $($LFS getstripe -M $BASE))
        local numfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.filesfree)
        local mdtidx=$(printf "%04x" $($LFS getstripe -M $BASE))
        local numfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.filesfree)
-       [[ $numfree -lt 21000 ]] && skip "not enough free inodes ($numfree)" &&
+       [[ $numfree -lt 21000 ]] &&
+               skip "not enough free inodes ($numfree) on MDT$mdtidx" &&
                return
 
        [[ $numfree -lt $NUMTEST ]] && NUMTEST=$(($numfree - 50)) &&
                return
 
        [[ $numfree -lt $NUMTEST ]] && NUMTEST=$(($numfree - 50)) &&
-               echo "reduced count to $NUMTEST due to inodes"
+               echo "reduced count to $NUMTEST due to inodes on MDT$mdtidx"
 
        # need to check free space for the directories as well
        local blkfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.kbytesavail)
        numfree=$((blkfree / 4))
 
        # need to check free space for the directories as well
        local blkfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.kbytesavail)
        numfree=$((blkfree / 4))
-       [[ $numfree -lt $NUMTEST ]] && NUMTEST=$(($numfree - 50)) &&
-               echo "reduced count to $NUMTEST due to blocks"
+       [[ $numfree -lt $NUMTEST ]] && NUMTEST=$((numfree - 50)) &&
+               echo "reduced count to $NUMTEST due to blocks on MDT$mdtidx"
 
        createmany -d $BASE/d $NUMTEST && echo $NUMTEST > $BASE/fnum ||
 
        createmany -d $BASE/d $NUMTEST && echo $NUMTEST > $BASE/fnum ||
+       {
+               $LFS df
+               $LFS df -i
                echo "failed" > $BASE/fnum
                echo "failed" > $BASE/fnum
+               error "failed to create $NUMTEST subdirs in MDT$mdtidx:$BASE"
+       }
 }
 run_test 51b "exceed 64k subdirectory nlink limit"
 
 }
 run_test 51b "exceed 64k subdirectory nlink limit"