All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Reichl <preichl@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH v3 3/4] generic/554: hide permision warning on exfat
Date: Thu, 15 Apr 2021 11:49:04 +0200	[thread overview]
Message-ID: <20210415094905.61853-4-preichl@redhat.com> (raw)
In-Reply-To: <20210415094905.61853-1-preichl@redhat.com>

Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 common/rc         | 7 +++++++
 tests/generic/554 | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 47098b55..fb1f7598 100644
--- a/common/rc
+++ b/common/rc
@@ -2378,6 +2378,13 @@ _format_swapfile() {
 	$MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2) >> $seqres.full
 }
 
+_swapon_file() {
+	local fname="$1"
+
+	# Ignore permission complaints on filesystems that don't support perms
+	swapon "$fname" 2> >(grep -v "insecure permissions" >&2)
+}
+
 # Check that the filesystem supports swapfiles
 _require_scratch_swapfile()
 {
diff --git a/tests/generic/554 b/tests/generic/554
index fa4f97d2..da9bfce5 100755
--- a/tests/generic/554
+++ b/tests/generic/554
@@ -46,7 +46,8 @@ $XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $SCRATCH_MNT/file >> $seqres.full 2>&
 
 echo swap files return ETXTBUSY
 _format_swapfile $SCRATCH_MNT/swapfile 16m
-swapon $SCRATCH_MNT/swapfile
+_swapon_file $SCRATCH_MNT/swapfile
+
 $XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/file" $SCRATCH_MNT/swapfile
 swapoff $SCRATCH_MNT/swapfile
 
-- 
2.30.2


  parent reply	other threads:[~2021-04-15  9:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15  9:49 [PATCH v3 0/4] Fix some tests that fail for exfat FS Pavel Reichl
2021-04-15  9:49 ` [PATCH v3 1/4] common/rc: Add _require_{chown,chmod}() Pavel Reichl
2021-04-18 12:50   ` Eryu Guan
2021-04-19 22:06     ` Pavel Reichl
2021-04-15  9:49 ` [PATCH v3 2/4] common: hide permision warning from mkswap for exfat Pavel Reichl
2021-04-15  9:49 ` Pavel Reichl [this message]
2021-04-15  9:49 ` [PATCH v3 4/4] generic/003: Amend the test " Pavel Reichl

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=20210415094905.61853-4-preichl@redhat.com \
    --to=preichl@redhat.com \
    --cc=fstests@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.