From 08e93fa7cae1d1ce98abf83024450cb6f4cefc3e Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Thu, 15 Apr 2021 11:49:04 +0200 Subject: [PATCH] generic/554: hide permision warning on exfat Signed-off-by: Pavel Reichl Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- common/rc | 7 +++++++ tests/generic/554 | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index e5a65f25..11ff7635 100644 --- a/common/rc +++ b/common/rc @@ -2425,6 +2425,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