[Ocfs2-test-devel] [PATCH 3/3] ocfs2-test: tunefs-test.sh Fixed syntax & adapted to new debugfs.ocfs2 output.
Marcos E. Matsunaga
Marcos.Matsunaga at oracle.com
Fri May 29 13:45:26 PDT 2009
Those lines are related to stat <file> and the output on that is really
InlineData. The syntax is different for stats and stat <file>.
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.”
Sunil Mushran wrote:
> This looks incomplete. You have missed lines: 634, 602 and 573.
>
>
> Marcos Matsunaga wrote:
>> Other than the syntax error, the new output of the debugfs.ocfs2
>> required
>> a change to the script to prevent false error reported. It also need to
>> have a change to the way some flags were compared as there were not that
>> many flags when this script was first written. It now checks for the
>> existence of "backup-super" instead of the flag "1" as before.
>> It also looks for "inline-data" instead of "InlineData".
>>
>> Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga at oracle.com>
>> ---
>> programs/tunefs-test/tunefs-test.sh | 10 +++++-----
>> 1 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/programs/tunefs-test/tunefs-test.sh
>> b/programs/tunefs-test/tunefs-test.sh
>> index bfe154b..4033b94 100755
>> --- a/programs/tunefs-test/tunefs-test.sh
>> +++ b/programs/tunefs-test/tunefs-test.sh
>> @@ -438,7 +438,7 @@ Change_Mount_Type()
>> Check_Volume;
>> SB_MTYPE=`${DEBUGFS_BIN} -n -R "stats" ${DEVICE}|${GREP}
>> Incompat:| \
>> ${GAWK} '{print \$3; exit}'`;
>> - if [ ${SB_MTYPE} -ne 8 || ${SB_MTYPE} -ne 24]; then
>> + if [ ${SB_MTYPE} -ne 8 || ${SB_MTYPE} -ne 24 ]; then
>> test_fail;
>> LogMsg "tunefs_test : Mount Type change failed. Superblock \c"
>> LogMsg "Feature Incompat (${SB_MTYPE})";
>> @@ -458,7 +458,7 @@ Add_Backup_Super()
>> echo "y"|${TUNEFS_BIN} --backup-super ${DEVICE} 2>&1 >>
>> ${TUNEFSLOG};
>> Check_Volume;
>> SB_BSUPER=`${DEBUGFS_BIN} -n -R "stats" ${DEVICE}|${GREP}
>> Compat:| \
>> - ${GAWK} '{print \$3; exit}'`;
>> + ${GREP} backup-super|wc -l`;
>> if [ ${SB_BSUPER} -ne 1 ]; then
>> test_fail;
>> LogMsg "tunefs_test : Change to backup super failed.
>> Superblock \c"
>> @@ -559,7 +559,7 @@ Enable_Disable_Inline_Data()
>> #Check if we set none-inline-data for volume
>> (( ++NUM_OF_TESTS ))
>> CURRENT_TEST="Set None-inline-data support
>> for volume by mkfs.ocfs2";
>> - ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "InlineData"
>> + ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "inline-data"
>> RC=$?
>> if [ "$RC" -eq "0" ];then
>> test_fail
>> @@ -590,7 +590,7 @@ Enable_Disable_Inline_Data()
>> FS_FEATURES="--fs-features=inline-data"
>> echo "y"|${TUNEFS_BIN} ${FS_FEATURES}
>> ${DEVICE} 2>&1 >> ${TUNEFSLOG}
>> Check_Volume
>> - ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "InlineData"
>> + ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "inline-data"
>> RC=$?
>> if [ "$RC" -eq "0" ];then
>> ${MOUNT_BIN} -t ocfs2 ${DEVICE}
>> ${MOUNT_POINT}
>> @@ -622,7 +622,7 @@ Enable_Disable_Inline_Data()
>> FS_FEATURES="--fs-features=noinline-data"
>> echo "y"|${TUNEFS_BIN} ${FS_FEATURES}
>> ${DEVICE} 2>&1 >> ${TUNEFSLOG}
>> Check_Volume
>> - ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "InlineData"
>> + ${DEBUGFS_BIN} -n -R "stats"
>> ${DEVICE}|${GREP} -i "Feature Incompat"|${GREP} -q "inline-data"
>> RC=$?
>> if [ "$RC" -eq "0" ] ;then
>> test_fail
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-test-devel/attachments/20090529/f4b4852b/attachment.html
More information about the Ocfs2-test-devel
mailing list