[Ocfs2-test-devel] [PATCH 1/1] Enhancement for mkfs-test:add inlinedata and xattr check for mkfs

TaoMa tao.ma at oracle.com
Wed Aug 20 03:20:11 PDT 2008


tristan.ye wrote:
> Add new testcases in mkfs-test:check inlinedata and xattr 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,53 @@
>  do_fsck ${OUT}
>  testnum=$[$testnum+1]
>  
> +### Test option '--fs-features=inline-data'
> +TAG=mkfs_test_${testnum}
> +OUT=${outdir}/${TAG}.log
> +echo "Test ${testnum}: --fs-features=inline-data"
> +label="Oracle_Home"
> +echo -n "mkfs ..... "
> +${MKFS} --fs-features=inline-data -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 "InlineData"
> +RC=$?
> +if [ "${RC}" != "0" ]; then
> +    echo "ERROR: Did not find InlineData Flag on superblock " >> ${OUT}
> +    echo "" >> ${OUT}
> +    echo "FAILED. Errors in ${OUT}"
> +else
> +    echo "OK"
> +fi
> +do_fsck ${OUT}
> +testnum=$[$testnum+1]
> +
> +
> +### Test option '--fs-features=xattr'
> +TAG=mkfs_test_${testnum}
> +OUT=${outdir}/${TAG}.log
> +echo "Test ${testnum}: --fs-features=xattr"
> +label="Oracle_Home"
> +echo -n "mkfs ..... "
> +${MKFS} --fs-features=xattr -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 "Xattr"
> +RC=$?
> +if [ "${RC}" != "0" ]; then
> +    echo "ERROR: Did not find Xattr Flag on superblock " >> ${OUT}
> +    echo "" >> ${OUT}
> +    echo "FAILED. Errors in ${OUT}"
> +else
> +    echo "OK"
> +fi
>   
Could you please also add the check for "sparse" here since xattr bases 
on sparse and "sparse" should be added automatically by mkfs.

btw, please send patch for ocfs2-test to ocfs2-tools-devel since we 
don't use ocfs2-test-devel now.
Regards,
Tao



More information about the Ocfs2-test-devel mailing list