[Ocfs2-tools-devel] [PATCH 1/3] Enhancement for mkfs-test to check incompatible features:check for sparse file support

tristan.ye tristan.ye at oracle.com
Wed Aug 20 18:55:38 PDT 2008


Add new testcases in mkfs-test:check sparse file support for
mkfs.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---

Index: ocfs2-test/programs/mkfs-tests/mkfs-test.sh
===================================================================
--- ocfs2-test/programs/mkfs-tests/mkfs-test.sh	(revision 183)
+++ ocfs2-test/programs/mkfs-tests/mkfs-test.sh	(working copy)
@@ -407,6 +407,29 @@
 do_fsck ${OUT}
 testnum=$[$testnum+1]
 
+### Test default support for sparse file'
+TAG=mkfs_test_${testnum}
+OUT=${outdir}/${TAG}.log
+echo "Test ${testnum}: Default option for sparse file support"
+label="Oracle_Home"
+echo -n "mkfs ..... "
+${MKFS} -x -F -b 4K -C 4K -N 2 -L ${label} ${device} 262144 >>${OUT}
2>&1
+echo "OK"
+echo -n "verify ..... "
+${DEBUGFS} -R "stats" ${device} >>${OUT} 2>&1
+${DEBUGFS} -R "stats" ${device}|${GREP} -i "Feature Incompat"|${GREP}
-q "Sparse"
+RC=$?
+if [ "${RC}" != "0" ]; then
+    echo "ERROR: Did not find Sparse Flag on superblock " >> ${OUT}
+    echo "" >> ${OUT}
+    echo "FAILED. Errors in ${OUT}"
+else
+    echo "OK"
+fi
+do_fsck ${OUT}
+testnum=$[$testnum+1]
+
+
 ### Test bitmap_cpg change
 TAG=mkfs_test_${testnum}
 OUT=${outdir}/${TAG}.log




More information about the Ocfs2-tools-devel mailing list