From: John Spray Date: Thu, 12 Jun 2014 13:44:04 +0000 (+0100) Subject: qa: extend cephfs_journal_tool_smoke X-Git-Tag: v0.83~86^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d63cf24a42298c7685b5ee38dcda68694104d77;p=ceph.git qa: extend cephfs_journal_tool_smoke To provide coverage for the 'import' command resulting in the same contents as before an export/import cycle. Signed-off-by: John Spray --- diff --git a/qa/workunits/suites/cephfs_journal_tool_smoke.sh b/qa/workunits/suites/cephfs_journal_tool_smoke.sh index 91ec952f4d4..fddcf2e2d9e 100755 --- a/qa/workunits/suites/cephfs_journal_tool_smoke.sh +++ b/qa/workunits/suites/cephfs_journal_tool_smoke.sh @@ -12,6 +12,31 @@ if [ -d $BINARY_OUTPUT ] ; then rm -rf $BINARY_OUTPUT fi +# Check that the import/export stuff really works as expected +# first because it's used as the reset method between +# following checks. +echo "Testing that export/import cycle preserves state" +HEADER_STATE=`$BIN header get` +EVENT_LIST=`$BIN event get list 2>&1` +$BIN journal export $JOURNAL_FILE +$BIN journal import $JOURNAL_FILE +NEW_HEADER_STATE=`$BIN header get` +NEW_EVENT_LIST=`$BIN event get list 2>&1` + +if [ ! "$HEADER_STATE" = "$NEW_HEADER_STATE" ] ; then + echo "Import failed to preserve header state" + echo $HEADER_STATE + echo $NEW_HEADER_STATE + exit -1 +fi + +if [ ! "$EVENT_LIST" = "$NEW_EVENT_LIST" ] ; then + echo "Import failed to preserve event state" + echo $EVENT_LIST + echo $NEW_EVENT_LIST + exit -1 +fi + echo "Testing 'journal' commands..." # Simplest thing: print the vital statistics of the journal