All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH] overlay: run unionmount tests with custom overlay mount options
Date: Sat, 19 Dec 2020 12:47:27 +0200	[thread overview]
Message-ID: <20201219104727.18737-1-amir73il@gmail.com> (raw)

Assign $OVERLAY_MOUNT_OPTIONS to UNIONMOUNT_MNTOPTIONS and require
that unionmount supports UNIONMOUNT_MNTOPTIONS if OVERLAY_MOUNT_OPTIONS
was provided.

For example, when the mount option metacopy=on is set in
$OVERLAY_MOUNT_OPTIONS, it enables the --meta test option and affects
the test verifications after copy up.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

Eryu,

I've added support to configurable mount option to unionmount-testsuite.
This change intergates xfstests configurable mount option to unionmount
test wrappers.

For users who do not have OVERLAY_MOUNT_OPTIONS defined, this change
makes no difference.

For users that have OVERLAY_MOUNT_OPTIONS defined, the overlay/union
tests will be skipped after this change is applied and print:

  overlay/100 -- newer version of unionmount testsuite required to \
                 support OVERLAY_MOUNT_OPTIONS.

Updating the unionmount src code to current master commit 95be14e
("Allow user provided options with or without -o") will fix this and
overlay/union tests will be run with the defined OVERLAY_MOUNT_OPTIONS.

Thanks,
Amir.

 common/overlay | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/common/overlay b/common/overlay
index 5e6a7e0f..1ca37e29 100644
--- a/common/overlay
+++ b/common/overlay
@@ -376,6 +376,13 @@ _require_unionmount_testsuite()
 	local usage=`UNIONMOUNT_BASEDIR=_ "$UNIONMOUNT_TESTSUITE/run" 2>&1`
 	echo $usage | grep -wq "UNIONMOUNT_BASEDIR" || \
 		_notrun "newer version of unionmount testsuite required."
+
+	[ -n "$OVERLAY_MOUNT_OPTIONS" ] || return
+	# If custom overlay mount options are used
+	# verify that UNIONMOUNT_MNTOPTIONS var is supported
+	local usage=`UNIONMOUNT_MNTOPTIONS=_ "$UNIONMOUNT_TESTSUITE/run" 2>&1`
+	echo $usage | grep -wq "UNIONMOUNT_MNTOPTIONS" || \
+		_notrun "newer version of unionmount testsuite required to support OVERLAY_MOUNT_OPTIONS."
 }
 
 _unionmount_testsuite_run()
@@ -394,6 +401,7 @@ _unionmount_testsuite_run()
 		export UNIONMOUNT_LOWERDIR=$OVL_BASE_TEST_DIR/union
 	fi
 	export UNIONMOUNT_BASEDIR=$OVL_BASE_SCRATCH_MNT/union
+	export UNIONMOUNT_MNTOPTIONS="$OVERLAY_MOUNT_OPTIONS"
 
 	_scratch_mkfs
 	rm -rf $UNIONMOUNT_BASEDIR $UNIONMOUNT_LOWERDIR
-- 
2.25.1


                 reply	other threads:[~2020-12-19 10:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20201219104727.18737-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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.