Re: [PATCH v3] xfstests: Add mkfs input validation tests

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Wed, Jul 13, 2016 at 12:46 PM, Eryu Guan <eguan@xxxxxxxxxx> wrote:
> On Fri, Jul 01, 2016 at 06:12:37PM +0200, Jan Tulak wrote:
>> +
>> +# Skip if we are running an older binary without the stricter input checks.
>> +# Make multiple checks to be sure that there is no regression on the one
>> +# selected feature check, which would skew the result.
>> +$MKFS_XFS_PROG -f -N -s size=2s $SCRATCH_DEV >/dev/null 2>&1
>> +sum=$?
>> +$MKFS_XFS_PROG -f -N -l version=2,su=$((256 * 1024 + 4096)) $SCRATCH_DEV >/dev/null 2>&1
>> +sum=`expr $sum + $?`
>> +
>> +if [ "$sum" -eq 0 ]; then
>> +     _notrun "Requires newer mkfs with stricter input checks."
>> +fi
>
> I think this can be put into a new _require rule in common/rc, as Dave
> suggested in his previous review:
>
> "
> ... a "_require_xfs_mkfs_validation" rule should be
> written to determine the version of mkfs being. e.g. by testing one
> of the failure cases that the unfixed binary says is ok.
> "
>

Mmm, I would say that there is a question whether any other test will
ever need it (and its author remember that there is such function),
but all right. You are two now, who says this, so I will go along.

And I think I will put everything into one patchset, because extended
names fixes has to be applied first for _notrun to work correctly,
then the common/rc functions (I'm making two - one for the new and one
for the old behaviour) and at last can come this and the xfs/096 test.

-- 
Jan Tulak
jtulak@xxxxxxxxxx / jan@xxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux