diff mbox

xfs/122: add check number of structure

Message ID 1464330792-24031-1-git-send-email-yangx.jy@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xiao Yang May 27, 2016, 6:33 a.m. UTC
I think the number of structure is always changing based on
different xfsporg-dev version. If some expected structure is
missing in current environment, we won't check structure size
and offset and set the result to notrun.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 tests/xfs/122 | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Darrick J. Wong May 27, 2016, 7:28 a.m. UTC | #1
On Fri, May 27, 2016 at 02:33:12PM +0800, Xiao Yang wrote:
> I think the number of structure is always changing based on
> different xfsporg-dev version. If some expected structure is
> missing in current environment, we won't check structure size
> and offset and set the result to notrun.
> 
> Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
> ---
>  tests/xfs/122 | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/xfs/122 b/tests/xfs/122
> index 845cdd2..64f4a1b 100755
> --- a/tests/xfs/122
> +++ b/tests/xfs/122
> @@ -239,6 +239,11 @@ if [ $XFSPROGS_VERSION -lt 30000 ]; then
>  	echo 'sizeof( xfs_dsb_t ) = 208' >>$progout;
>  fi
>  
> +actual_num=`cat $progout | wc -l`
> +if [ $actual_num -lt 148 ]; then

I think the maintainer only cares that xfs/122 passes when run against
current xfsprogs git.

For certain, this shouldn't be hardcoded to 148.

--D

> +        _notrun "Some structure is missing in current envirment"
> +fi
> +
>  LC_COLLATE=POSIX sort $progout
>  
>  status=0
> -- 
> 1.8.3.1
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Xiao Yang May 27, 2016, 8 a.m. UTC | #2
> On Fri, May 27, 2016 at 02:33:12PM +0800, Xiao Yang wrote:
>> I think the number of structure is always changing based on
>> different xfsporg-dev version. If some expected structure is
>> missing in current environment, we won't check structure size
>> and offset and set the result to notrun.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
>>   tests/xfs/122 | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/tests/xfs/122 b/tests/xfs/122
>> index 845cdd2..64f4a1b 100755
>> --- a/tests/xfs/122
>> +++ b/tests/xfs/122
>> @@ -239,6 +239,11 @@ if [ $XFSPROGS_VERSION -lt 30000 ]; then
>>   	echo 'sizeof( xfs_dsb_t ) = 208'>>$progout;
>>   fi
>>
>> +actual_num=`cat $progout | wc -l`
>> +if [ $actual_num -lt 148 ]; then
> I think the maintainer only cares that xfs/122 passes when run against
> current xfsprogs git.
>
> For certain, this shouldn't be hardcoded to 148.
>
> --D
>
Thanks for your review, i will rewrite this pacth as you said.

Regards,
Xiao Yang
>> +        _notrun "Some structure is missing in current envirment"
>> +fi
>> +
>>   LC_COLLATE=POSIX sort $progout
>>
>>   status=0
>> -- 
>> 1.8.3.1
>>
>>
>>
>
>



--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/xfs/122 b/tests/xfs/122
index 845cdd2..64f4a1b 100755
--- a/tests/xfs/122
+++ b/tests/xfs/122
@@ -239,6 +239,11 @@  if [ $XFSPROGS_VERSION -lt 30000 ]; then
 	echo 'sizeof( xfs_dsb_t ) = 208' >>$progout;
 fi
 
+actual_num=`cat $progout | wc -l`
+if [ $actual_num -lt 148 ]; then
+        _notrun "Some structure is missing in current envirment"
+fi
+
 LC_COLLATE=POSIX sort $progout
 
 status=0