[Ocfs2-tools-devel] [PATCH 1/3] Ocfs2-tests: Add testcases for mkfs-tests to verify xattr, inline-data and sparse support for mkfs.ocfs2.

Marcos E. Matsunaga Marcos.Matsunaga at oracle.com
Mon Sep 8 05:26:59 PDT 2008


Tristan,

Check the latest mkfs-test.sh. I have added a check on the ${OUT} and
remove it if exists. That's because if the script fails, the script test
will not work properly when re-run.

Other than that, it looks good.

Regards,

Marcos Eduardo Matsunaga

Oracle USA
Linux Engineering

“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”



Tristan Ye wrote:
> Create new testcases for mkfs-tests,to verfiy if all implemented features(like inline-data,xattr and sparse)
> were supported by mkfs.ocfs2 well.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
>  programs/mkfs-tests/mkfs-test.sh |   70 ++++++++++++++++++++++++++++++++++++++
>  1 files changed, 70 insertions(+), 0 deletions(-)
>
> diff --git a/programs/mkfs-tests/mkfs-test.sh b/programs/mkfs-tests/mkfs-test.sh
> index 5b53ab4..f5d8f61 100755
> --- a/programs/mkfs-tests/mkfs-test.sh
> +++ b/programs/mkfs-tests/mkfs-test.sh
> @@ -432,6 +432,76 @@ fi
>  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
> +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
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20080908/824604ee/attachment-0001.html 


More information about the Ocfs2-tools-devel mailing list