[LTP] [PATCH 0/2] swapon01: Test on all filesystems, cleanup

Li Wang liwang@redhat.com
Fri Jan 12 08:18:03 CET 2024


Hi Marius, Petr,

On Thu, Oct 12, 2023 at 5:29 PM Marius Kittler <mkittler@suse.de> wrote:

> I guess the code would work and looks generally good to merge. In fact, I
> tested `.all_filesystems = 1`  myself yesterday. It is just the question
> whether we actually want it. Is there really coverage to be gained (or
> does
> the kernel just the same under the hood anyway regardless of the
> filesystem)?
>

After a rough looking at the swapon() related code achieved in the kernel
source.
I think the swapon coverage are same on whatever the swapfile filesystem is,
the only difference may be about the `make_swapfile` part which
highly depends
on the filesystem type, and the filesystem's characteristics can impact the
performance and effectiveness of swapping operations.

So in a word, if we just check the swapon() succeed with swapfile, the
'.all_filesystems = 1' is useless in patch1/2, but if we do more action in
writing/using swapfile that probably raises the coverage.

Reviewed-by: Li Wang <liwang@redhat.com>



>
> > Test on all filesystems to increase coverage.  btrfs and tmpfs
> > currently does not support swap file, but keep it in case this get
> > changed in the future.
>
> Considering btrfs does not support it I guess that means the kernel does
> indeed different things under the hood so the coverage might be
> beneficial. (If
> it was just about tmpfs then I'd say it makes no sense to put a swapfile
> there
> in any case and it will therefore likely never be supported.)
>
> Reviewed-by: Marius Kittler <mkittler@suse.de>
>
>
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang


More information about the ltp mailing list