[Ocfs2-test-devel] [PATCH 1/1] patch mkfs-test.patch

Sunil Mushran sunil.mushran at oracle.com
Thu May 28 12:38:13 PDT 2009


There seem to be two unrelated changes.

Can you break it down logically. Say one for the fs-features
and the other for the other change. It is not clear what that
change is for. And have a description in each patch so that we
know what to look for. Also, tunefs test needs the fs features
change too. You can include that with the mkfs patch.

Sunil

Marcos Matsunaga wrote:
> ---
>  programs/mkfs-tests/mkfs-test.sh |   18 ++++++++----------
>  1 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/programs/mkfs-tests/mkfs-test.sh b/programs/mkfs-tests/mkfs-test.sh
> index 51d61be..f823f02 100755
> --- a/programs/mkfs-tests/mkfs-test.sh
> +++ b/programs/mkfs-tests/mkfs-test.sh
> @@ -24,9 +24,9 @@ verify_sizes() {
>  
>      ${DEBUGFS} -R "stats" ${device} >> ${O} 2>/dev/null
>  
> -    num1=`${AWK} '/Block Size Bits/ {print $4;}' ${O}`
> -    num2=`${AWK} '/Cluster Size Bits/ {print $8;}' ${O}`
> -    num3=`${AWK} '/Clusters:/ {print $4;}' ${O}`
> +    num1=`${AWK} '/Block size=/ {print $2;}' ${O}|cut -f2 -d"="`
> +    num2=`${AWK} '/Cluster size=/ {print $2;}' ${O}|cut -f2 -d"="`
> +    num3=`${AWK} '/Volume size=/ {print $3;}' ${O}|cut -f2 -d"("`
>  
>      if [ ${num1} -eq 0 ] || [ ${num2} -eq 0 ] || [ ${num3} -eq 0 ]
>      then
> @@ -34,17 +34,15 @@ verify_sizes() {
>          exit 1
>      fi
>  
> -    b=$[$[2**$[${num1} - 9]]*512]
> -    c=$[$[2**$[${num2} - 9]]*512]
> -    v=$[${num3} * ${c}/${b}]
> +    v=$[${num3} * ${num2}/${num1}]
>  
>       echo -n "verify ..... "  |tee -a ${LOGFILE}
>  
> -    if [ ${B} -ne ${b} ]; then
> +    if [ ${B} -ne ${num1} ]; then
>          echo "ERROR: Blocksize mismatch - found ${b}, expected ${B}" >> ${O}
>          RET=1
>      fi
> -    if [ ${C} -ne ${c} ]; then
> +    if [ ${C} -ne ${num2} ]; then
>          echo "ERROR: Clustersize mismatch - found ${c}, expected ${C}" >> ${O}
>          RET=1
>      fi
> @@ -446,7 +444,7 @@ ${MKFS} --fs-features=inline-data -x -F -b 4K -C 4K -N 2 -L ${label} ${device} 2
>  echo "OK"
>  echo -n "verify ..... "
>  ${DEBUGFS} -R "stats" ${device} >>${OUT} 2>&1
> -${DEBUGFS} -R "stats" ${device}|${GREP} -i "Feature Incompat"|${GREP} -q "InlineData"
> +${DEBUGFS} -R "stats" ${device}|${GREP} -i "Feature Incompat"|${GREP} -q "inline-data"
>  RC=$?
>  if [ "${RC}" != "0" ]; then
>      echo "ERROR: Did not find InlineData Flag on superblock " >> ${OUT}
> @@ -472,7 +470,7 @@ ${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"
> +${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}
>   




More information about the Ocfs2-test-devel mailing list