From 6e45c6d3ae4c46a0312bbb95b7e9ff09761f037d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 24 Oct 2014 00:23:14 -0700 Subject: [PATCH] LU-5473 tests: print space usage in sanity test_51b 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 Change-Id: I21b072fbcb05dea3fd7803bf3353de11ffbcab07 Reviewed-on: http://review.whamcloud.com/12185 Tested-by: Jenkins Reviewed-by: Nathaniel Clark Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/sanity.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 958e7b4..238e756 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -60,9 +60,11 @@ init_logging [ "$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 @@ -3976,22 +3978,30 @@ test_51b() { 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) - [[ $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)) && - 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)) - [[ $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 || + { + $LFS df + $LFS df -i echo "failed" > $BASE/fnum + error "failed to create $NUMTEST subdirs in MDT$mdtidx:$BASE" + } } run_test 51b "exceed 64k subdirectory nlink limit" -- 1.8.3.1