Re: [PATCH] tests/filesystem/xfs: use a 300M xfs filesystem image

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

 



On Wed, Aug 24, 2022 at 6:50 PM Paul Moore <paul@xxxxxxxxxxxxxx> wrote:
> Recent versions of mkfs.xfs require at least a 300M image to work
> properly which unfortunately causes a large number of xfs test
> failures as the test suite only allocates 16M for a filesystem
> image.  This patch increases the xfs image size to 300M while
> leaving the existing 16M image size for all other filesystem types.
>
> This was first noticed with xfsprogs v5.19.0 but it is possible
> earlier versions are also affected.
>
> Signed-off-by: Paul Moore <paul@xxxxxxxxxxxxxx>
> ---
>  tests/filesystem/Filesystem.pm |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/filesystem/Filesystem.pm b/tests/filesystem/Filesystem.pm
> index e3cd8ee..bd91a11 100644
> --- a/tests/filesystem/Filesystem.pm
> +++ b/tests/filesystem/Filesystem.pm
> @@ -122,10 +122,14 @@ sub attach_dev {
>
>  sub make_fs {
>      my ( $mk_type, $mk_dev, $mk_dir ) = @_;
> +    my $mk_size = 16;
> +    if ( $mk_type eq "xfs" ) {
> +        $mk_size = 300;
> +    }
>      print "Create $mk_dir/fstest with dd\n";
>      $result =
>        system(
> -        "dd if=/dev/zero of=$mk_dir/fstest bs=4096 count=4096 2>/dev/null");
> +        "dd if=/dev/zero of=$mk_dir/fstest bs=1M count=$mk_size 2>/dev/null");
>      if ( $result != 0 ) {
>          print "dd failed to create $mk_dir/fstest\n";
>      }
>

Thanks! I applied this with a minor edit in the patch description
(added upstream xfsprogs commit reference):

https://github.com/SELinuxProject/selinux-testsuite/commit/c592d7f49e5e8ca907d90cb1d6f54bb0d410d442

--
Ondrej Mosnacek
Senior Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux