<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffcc" text="#000066">
<tt>Tristan,<br>
<br>
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.<br>
<br>
Other than that, it looks good.<br>
</tt>
<pre class="moz-signature" cols="72">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.”
</pre>
<br>
<br>
Tristan Ye wrote:
<blockquote
cite="mid:1220860748-9919-1-git-send-email-tristan.ye@oracle.com"
type="cite">
<pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:tristan.ye@oracle.com"><tristan.ye@oracle.com></a>
---
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
</pre>
</blockquote>
</body>
</html>