mbox series

[0/3] fstests: Fix tests which checks for swapfile support

Message ID cover.1604000570.git.riteshh@linux.ibm.com
Headers show
Series fstests: Fix tests which checks for swapfile support | expand

Message

Ritesh Harjani Oct. 29, 2020, 7:52 p.m. UTC
For more details, pls refer commit msg of each patch.

Patch-1: modifies _require_scratch_swapfile() to check swapon only for btrfs
Patch-2: adds a swapfile test for fallocate files for ext4, xfs (assuming
both FS supports and thus should pass).
Patch-3: added to support tests to run when multiple config section present
in local.config file.

Ritesh Harjani (3):
  common/rc: Make swapon check in _require_scratch_swapfile() specific to btrfs
  shared/001: Verify swapon on fallocated files for supported FS
  common/rc: source common/xfs and common/btrfs

 common/rc            | 20 +++++----
 tests/shared/001     | 97 ++++++++++++++++++++++++++++++++++++++++++++
 tests/shared/001.out |  6 +++
 tests/shared/group   |  1 +
 4 files changed, 116 insertions(+), 8 deletions(-)
 create mode 100755 tests/shared/001
 create mode 100644 tests/shared/001.out

--
2.26.2

Comments

Eryu Guan Nov. 1, 2020, 4:03 p.m. UTC | #1
On Fri, Oct 30, 2020 at 01:22:50AM +0530, Ritesh Harjani wrote:
> For more details, pls refer commit msg of each patch.
> 
> Patch-1: modifies _require_scratch_swapfile() to check swapon only for btrfs

I don't think it's a good idea, if a new fs without swapfile support is
tested by fstests, test would get false failure, where it should
_notrun. And making a generic requirement check to fs-specific doesn't
seem quite right either.

> Patch-2: adds a swapfile test for fallocate files for ext4, xfs (assuming
> both FS supports and thus should pass).

As Brian mentioned in his review, we're in the process to convert all
shared tests to generic or fs-specific tests (very slow though), that
said we don't want new shared tests.

I think we could whitelist fs types in _require_scratch_swapfile() and
don't _notrun for such filesystems, something like what we did in
_fstyp_has_non_default_seek_data_hole(), so that we won't miss silent
regressions on sucn filesystems, and we'll do sanity check as well on
other filesystems.

> Patch-3: added to support tests to run when multiple config section present
> in local.config file.

I have a patch[1] that should fix the issue 3 years ago, but it never
got reviewed, would you please check and see if it fixed the bug for you?

[1] https://patchwork.kernel.org/project/fstests/patch/20171117070022.14002-1-eguan@redhat.com/

Thanks,
Eryu

> 
> Ritesh Harjani (3):
>   common/rc: Make swapon check in _require_scratch_swapfile() specific to btrfs
>   shared/001: Verify swapon on fallocated files for supported FS
>   common/rc: source common/xfs and common/btrfs
> 
>  common/rc            | 20 +++++----
>  tests/shared/001     | 97 ++++++++++++++++++++++++++++++++++++++++++++
>  tests/shared/001.out |  6 +++
>  tests/shared/group   |  1 +
>  4 files changed, 116 insertions(+), 8 deletions(-)
>  create mode 100755 tests/shared/001
>  create mode 100644 tests/shared/001.out
> 
> --
> 2.26.2
Ritesh Harjani Nov. 26, 2020, 3:51 a.m. UTC | #2
On 11/1/20 9:33 PM, Eryu Guan wrote:
> On Fri, Oct 30, 2020 at 01:22:50AM +0530, Ritesh Harjani wrote:
>> For more details, pls refer commit msg of each patch.
>>
>> Patch-1: modifies _require_scratch_swapfile() to check swapon only for btrfs
> 
> I don't think it's a good idea, if a new fs without swapfile support is
> tested by fstests, test would get false failure, where it should
> _notrun. And making a generic requirement check to fs-specific doesn't
> seem quite right either.
> 
>> Patch-2: adds a swapfile test for fallocate files for ext4, xfs (assuming
>> both FS supports and thus should pass).
> 
> As Brian mentioned in his review, we're in the process to convert all
> shared tests to generic or fs-specific tests (very slow though), that
> said we don't want new shared tests.
> 
> I think we could whitelist fs types in _require_scratch_swapfile() and
> don't _notrun for such filesystems, something like what we did in
> _fstyp_has_non_default_seek_data_hole(), so that we won't miss silent
> regressions on sucn filesystems, and we'll do sanity check as well on
> other filesystems.

Nice idea. Let me check that part.

> 
>> Patch-3: added to support tests to run when multiple config section present
>> in local.config file.
> 
> I have a patch[1] that should fix the issue 3 years ago, but it never
> got reviewed, would you please check and see if it fixed the bug for you?
> 
> [1] https://patchwork.kernel.org/project/fstests/patch/20171117070022.14002-1-eguan@redhat.com/

Sure, will test it and get back.

Sorry about the delay from my end on this patch series. I got pulled
into something else. Let me work on your suggestions.


-ritesh