2017-06-17 17:45:17

by Danesh Daroui

[permalink] [raw]
Subject: Regression test (or generic tests) for Linux filesystems

Hello all,

Just a quick question. I am wondering if there is any test suite
available for ext4 fs or basic fs functionalists in Linux, shipped
with kernel as a module or so, then developers would be able to run
the test (or modify them for new features) to ensure fs integrity on a
local branch before submitting a patch for review?

I have already found xfstests at:

https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/

but I am not sure if this is the right one (haven't tried yet) or if
there is any better test suite even more specific tailored for ext4.

Thanks for your answer,

Dan


2017-06-18 20:37:16

by Nikolay Borisov

[permalink] [raw]
Subject: Re: Regression test (or generic tests) for Linux filesystems



On 17.06.2017 20:45, Danesh Daroui wrote:
> Hello all,
>
> Just a quick question. I am wondering if there is any test suite
> available for ext4 fs or basic fs functionalists in Linux, shipped
> with kernel as a module or so, then developers would be able to run
> the test (or modify them for new features) to ensure fs integrity on a
> local branch before submitting a patch for review?
>
> I have already found xfstests at:
>
> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/
>
> but I am not sure if this is the right one (haven't tried yet) or if
> there is any better test suite even more specific tailored for ext4.


xfstest is the de-facto testsuite for linux filesystems. It not only has
generic tests but also fs-specific ones e.g. ext4. So go with it.

>
> Thanks for your answer,
>
> Dan
>

2017-06-19 00:42:33

by Danesh Daroui

[permalink] [raw]
Subject: Re: Regression test (or generic tests) for Linux filesystems

Thanks for the clarification!

Regards,

Dan


On Sun, Jun 18, 2017 at 10:37 PM, Nikolay Borisov
<[email protected]> wrote:
>
>
> On 17.06.2017 20:45, Danesh Daroui wrote:
>> Hello all,
>>
>> Just a quick question. I am wondering if there is any test suite
>> available for ext4 fs or basic fs functionalists in Linux, shipped
>> with kernel as a module or so, then developers would be able to run
>> the test (or modify them for new features) to ensure fs integrity on a
>> local branch before submitting a patch for review?
>>
>> I have already found xfstests at:
>>
>> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/
>>
>> but I am not sure if this is the right one (haven't tried yet) or if
>> there is any better test suite even more specific tailored for ext4.
>
>
> xfstest is the de-facto testsuite for linux filesystems. It not only has
> generic tests but also fs-specific ones e.g. ext4. So go with it.
>
>>
>> Thanks for your answer,
>>
>> Dan
>>

2017-06-19 05:41:28

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Regression test (or generic tests) for Linux filesystems

On Sun, Jun 18, 2017 at 11:37:16PM +0300, Nikolay Borisov wrote:
>
> xfstest is the de-facto testsuite for linux filesystems. It not only has
> generic tests but also fs-specific ones e.g. ext4. So go with it.

If you want a really convenient way of running xfstests, I have a set
of wrapper scripts that make it easy to run xfstests using either KVM
or GCE (Google Compute Engine). The idea is to do something which is
turn-key and really easy, so that people who are submitting patches
for me to review have no excuse not to run tests first. :-)

I also was making it easy because there were some graduate students
who were interesting writing their own file system or making changes
to existing file systems, and this made it easy for them to do their
testing. So it was deisgned for that use case as well. For more
information, please see these URL's:

http://thunk.org/gce-xfstests
https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-quickstart.md
https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-xfstests.md
https://github.com/tytso/xfstests-bld/blob/master/Documentation/gce-xfstests.md

And, for extra fun, we have alpha support for using xfstests in an
Android environment. This can be used if you need to test some
feature that requires hardware support, such as the ext4 integration
with hardware inline-crypto encryption (ICE):

https://github.com/tytso/xfstests-bld/blob/master/Documentation/android-xfstests.md

(This is rather bleeding edge code, and it's mainly only been tested
on a small set of devices. It will also destroy existing user data on
the device, and xfstests can use up a large number of write cycles on
low-end flash. So I recommend only using android-xfstests on
sacrificial development devices where you don't have a strong
attachment to any data on the device or the longevity of of said
device. :-)

Cheers!

- Ted

P.S. gce-xfstest and kvm-xfstests have support to test file systems
beyond ext4, but to date it's been primarily used to test ext4 file
system code. I have basic support for btrfs, f2fs, xfs, overlayfs,
tmpfs, and it would be trivial to add support for more file systems,
or for people who want to give me file system test configurations for
file systems beyond ext4. So if you are interested in using
kvm-xfstests or gce-xfstests for other filesystems --- please drop me
a line and let's chat.