[Ocfs2-test-devel] [PATCH 1/1] Ocfs2-test: Add a testcase for inline-data&xattr combination test.

Tristan Ye tristan.ye at oracle.com
Mon Mar 9 04:08:40 PDT 2009


It's a really interesting case, cmd 'dd bs=N count=1' and 'dd bs=1 count=N'
let our ocfs2 inline-data codes behave differently when handling inline-data
and inline-xattr, with such an additional testcase,our tests will be more likely
to expose the potential bug of inline-data&inline-xattr.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 programs/xattr_tests/xattr-single-run.sh |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/programs/xattr_tests/xattr-single-run.sh b/programs/xattr_tests/xattr-single-run.sh
index 0ab7df5..dc8e2f9 100755
--- a/programs/xattr_tests/xattr-single-run.sh
+++ b/programs/xattr_tests/xattr-single-run.sh
@@ -478,6 +478,20 @@ f_combin_test()
 	${SETXATTR} -n "user.small" -v "SMALL" ${TEST_FILE}
 	exit_or_not $?
 
+	${DD_BIN} if=/dev/zero of=${TEST_FILE} bs=$((${MAX_INLINE_DATA}-${MAX_INLINE_XATTR}+1))  count=1 2>>${DETAIL_LOG_FILE} >/dev/null
+
+	sync
+	${DEBUGFS_BIN} -R "stat ${DEBUG_TEST_FILE}" ${OCFS2_DEVICE}|grep -qi InlineData && {
+		echo "Inline data should not invade a reserved inline-xattr space.">>${DETAIL_LOG_FILE}
+		return 1
+	}
+
+	${RM} -rf ${TEST_FILE}
+	${TOUCH_BIN} ${TEST_FILE}
+
+	${SETXATTR} -n "user.small" -v "SMALL" ${TEST_FILE}
+	exit_or_not $?
+
 	${SETXATTR} -x "user.small" ${TEST_FILE}
 	exit_or_not $?
 
-- 
1.5.5




More information about the Ocfs2-test-devel mailing list