All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Moore <paul@paul-moore.com>
To: selinux@vger.kernel.org
Subject: [PATCH] tests/filesystem/xfs: use a 300M xfs filesystem image
Date: Wed, 24 Aug 2022 12:48:25 -0400	[thread overview]
Message-ID: <166135970524.184778.17486058814645360372.stgit@olly> (raw)

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";
     }


             reply	other threads:[~2022-08-24 16:48 UTC|newest]

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

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=166135970524.184778.17486058814645360372.stgit@olly \
    --to=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.