Re: [PATCH] generic/456: add check for fallocate flags

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



On Mon, Sep 11, 2017 at 12:25 PM, Xiao Yang <yangx.jy@xxxxxxxxxxxxxx> wrote:
> On RHEL6.9GA, this case could not emulate a crash and passed due
> to unsupported collapse_range and zero_range instead of no bug.
>
> We added check for fallocate flags to avoid confusion.
>

I am not sure I understand the confusion.

A bug was allegedly introduced to ext4 when introducing
collapse_range and/or insert_range and this is a regression test
for this alleged regression.

In what way is it confusing that the test passes on an old kernel?
There are a lot of tests in xfstests that test for regressions that
were introduced by commit XYZ. I don't see those tests checking
that they are running on kernel > XYZ.

BTW, this test also passes on btrfs and xfs, but it does not include
_supported_fs ext4 against confusion.


> Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxxxxx>
> ---
>  tests/generic/456 | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tests/generic/456 b/tests/generic/456
> index 8debd3f..b72acea 100755
> --- a/tests/generic/456
> +++ b/tests/generic/456
> @@ -67,11 +67,16 @@ write 0x3e5ec 0x1a14 0x21446
>  zero_range 0x20fac 0x6d9c 0x40000 keep_size
>  mapwrite 0x216ad 0x274f 0x40000
>  EOF
> -run_check $here/ltp/fsx -d --replay-ops $fsxops $SCRATCH_MNT/testfile
> +touch $tmp.dupops
> +run_check $here/ltp/fsx -d --replay-ops $fsxops --record-ops=$tmp.dupops $SCRATCH_MNT/testfile
>
>  _flakey_drop_and_remount
>  _unmount_flakey
>  _cleanup_flakey
> +
> +ops_name=$(awk '/skip/ {printf "%s ", $2}' $tmp.dupops)
> +[ -n "$ops_name" ] && _notrun "fallocate does not support $ops_name"
> +

If you must add some check, please add
_require_xfs_io_command "fcollapse"
_require_xfs_io_command "fzero"

It is not really a must for this test and its not even really testing if fs
supports those commands, but that is de-facto standard for not
running fcollapse/fzero tests.

Thanks,
Amir.
--
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