From: Zhihao Cheng <chengzhihao1@huawei.com> To: guaneryu@gmail.com, amir73il@gmail.com, david.oberhollenzer@sigma-star.at, ebiggers@google.com, yi.zhang@huawei.com Cc: fstests@vger.kernel.org, linux-kernel@vger.kernel.org, chengzhihao1@huawei.com Subject: [PATCH xfstests v2] overlay: Enable character device to be the base fs partition Date: Wed, 25 Sep 2019 09:54:08 +0800 [thread overview] Message-ID: <1569376448-53998-1-git-send-email-chengzhihao1@huawei.com> (raw) There is a message in _supported_fs(): _notrun "not suitable for this filesystem type: $FSTYP" for when overlay usecases are executed on a chararcter device based base fs. _overay_config_override() detects that the current base fs partition is not a block device, and FSTYP won't be overwritten as 'overlay' before executing usecases which results in all overlay usecases become 'notrun'. In addition, all generic usecases are based on base fs rather than overlay. We want to rewrite FSTYP to 'overlay' before running the usecases. To do this, we need to add additional character device judgments for TEST_DEV and SCRATCH_DEV in _overay_config_override(). Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> --- common/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/config b/common/config index 4c86a49..a22acdb 100644 --- a/common/config +++ b/common/config @@ -550,7 +550,7 @@ _overlay_config_override() # the new OVL_BASE_SCRATCH/TEST_DEV/MNT vars are set to the values # of the configured base fs and SCRATCH/TEST_DEV vars are set to the # overlayfs base and mount dirs inside base fs mount. - [ -b "$TEST_DEV" ] || return 0 + [ -b "$TEST_DEV" ] || [ -c "$TEST_DEV" ] || return 0 # Config file may specify base fs type, but we obay -overlay flag [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP" @@ -570,7 +570,7 @@ _overlay_config_override() export TEST_DIR="$OVL_BASE_TEST_DIR/$OVL_MNT" export MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS" - [ -b "$SCRATCH_DEV" ] || return 0 + [ -b "$SCRATCH_DEV" ] || [ -c "$SCRATCH_DEV" ] || return 0 # Store original base fs vars export OVL_BASE_SCRATCH_DEV="$SCRATCH_DEV" -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Zhihao Cheng <chengzhihao1@huawei.com> To: <guaneryu@gmail.com>, <amir73il@gmail.com>, <david.oberhollenzer@sigma-star.at>, <ebiggers@google.com>, <yi.zhang@huawei.com> Cc: <fstests@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <chengzhihao1@huawei.com> Subject: [PATCH xfstests v2] overlay: Enable character device to be the base fs partition Date: Wed, 25 Sep 2019 09:54:08 +0800 [thread overview] Message-ID: <1569376448-53998-1-git-send-email-chengzhihao1@huawei.com> (raw) There is a message in _supported_fs(): _notrun "not suitable for this filesystem type: $FSTYP" for when overlay usecases are executed on a chararcter device based base fs. _overay_config_override() detects that the current base fs partition is not a block device, and FSTYP won't be overwritten as 'overlay' before executing usecases which results in all overlay usecases become 'notrun'. In addition, all generic usecases are based on base fs rather than overlay. We want to rewrite FSTYP to 'overlay' before running the usecases. To do this, we need to add additional character device judgments for TEST_DEV and SCRATCH_DEV in _overay_config_override(). Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> --- common/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/config b/common/config index 4c86a49..a22acdb 100644 --- a/common/config +++ b/common/config @@ -550,7 +550,7 @@ _overlay_config_override() # the new OVL_BASE_SCRATCH/TEST_DEV/MNT vars are set to the values # of the configured base fs and SCRATCH/TEST_DEV vars are set to the # overlayfs base and mount dirs inside base fs mount. - [ -b "$TEST_DEV" ] || return 0 + [ -b "$TEST_DEV" ] || [ -c "$TEST_DEV" ] || return 0 # Config file may specify base fs type, but we obay -overlay flag [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP" @@ -570,7 +570,7 @@ _overlay_config_override() export TEST_DIR="$OVL_BASE_TEST_DIR/$OVL_MNT" export MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS" - [ -b "$SCRATCH_DEV" ] || return 0 + [ -b "$SCRATCH_DEV" ] || [ -c "$SCRATCH_DEV" ] || return 0 # Store original base fs vars export OVL_BASE_SCRATCH_DEV="$SCRATCH_DEV" -- 2.7.4
next reply other threads:[~2019-09-25 1:47 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-25 1:54 Zhihao Cheng [this message] 2019-09-25 1:54 ` [PATCH xfstests v2] overlay: Enable character device to be the base fs partition Zhihao Cheng 2019-09-25 3:05 ` Darrick J. Wong 2019-09-25 3:17 ` Darrick J. Wong 2019-09-25 3:27 ` Zhihao Cheng 2019-09-25 3:27 ` Zhihao Cheng 2019-09-25 5:21 ` Amir Goldstein
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=1569376448-53998-1-git-send-email-chengzhihao1@huawei.com \ --to=chengzhihao1@huawei.com \ --cc=amir73il@gmail.com \ --cc=david.oberhollenzer@sigma-star.at \ --cc=ebiggers@google.com \ --cc=fstests@vger.kernel.org \ --cc=guaneryu@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=yi.zhang@huawei.com \ /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: linkBe 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.