All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: Paul Moore <paul@paul-moore.com>
Cc: SElinux list <selinux@vger.kernel.org>
Subject: Re: [PATCH] tests/filesystem/xfs: use a 300M xfs filesystem image
Date: Thu, 25 Aug 2022 10:07:08 +0200	[thread overview]
Message-ID: <CAFqZXNshMbqDhRVZrBg=fNRo0ORfD3s5ffqFMyz1Ds-GbNfSyA@mail.gmail.com> (raw)
In-Reply-To: <166135970524.184778.17486058814645360372.stgit@olly>

On Wed, Aug 24, 2022 at 6:50 PM Paul Moore <paul@paul-moore.com> 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@paul-moore.com>
> ---
>  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.


      reply	other threads:[~2022-08-25  8:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 16:48 [PATCH] tests/filesystem/xfs: use a 300M xfs filesystem image Paul Moore
2022-08-25  8:07 ` Ondrej Mosnacek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFqZXNshMbqDhRVZrBg=fNRo0ORfD3s5ffqFMyz1Ds-GbNfSyA@mail.gmail.com' \
    --to=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.