From: Eryu Guan <guan@eryu.me>
To: Chengguang Xu <cgxu519@mykernel.net>
Cc: miklos <miklos@szeredi.hu>, amir73il <amir73il@gmail.com>,
fstests <fstests@vger.kernel.org>,
linux-unionfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v4] overlay: test for whiteout inode sharing
Date: Wed, 13 May 2020 00:25:32 +0800 [thread overview]
Message-ID: <20200512162532.GD9345@desktop> (raw)
In-Reply-To: <172015c8691.108177c8110122.924760245390345571@mykernel.net>
On Mon, May 11, 2020 at 09:32:20AM +0800, Chengguang Xu wrote:
> ---- 在 星期日, 2020-05-10 23:50:37 Eryu Guan <guan@eryu.me> 撰写 ----
> > On Wed, May 06, 2020 at 06:15:28PM +0800, Chengguang Xu wrote:
> > > This is a test for whiteout inode sharing feature.
> > >
> > > Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> > > ---
> > > v1->v2:
> > > - Address Amir's comments in v1
> > >
> > > v2->v3:
> > > - Address Amir's comments in v2
> > >
> > > v3->v4:
> > > - Fix test case based on latest kernel patch(removed module param)
> > > https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git/commit/?h=overlayfs-next&id=4e49695244661568130bfefcb6143dd1eaa3d8e7
> > >
> > > tests/overlay/073 | 106 ++++++++++++++++++++++++++++++++++++++++++
> > > tests/overlay/073.out | 2 +
> > > tests/overlay/group | 1 +
> > > 3 files changed, 109 insertions(+)
> > > create mode 100755 tests/overlay/073
> > > create mode 100644 tests/overlay/073.out
> > >
> > > diff --git a/tests/overlay/073 b/tests/overlay/073
> > > new file mode 100755
> > > index 00000000..fc847092
> > > --- /dev/null
> > > +++ b/tests/overlay/073
> > > @@ -0,0 +1,106 @@
> > > +#! /bin/bash
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +# Copyright (c) 2020 Chengguang Xu <cgxu519@mykernel.net>.
> > > +# All Rights Reserved.
> > > +#
> > > +# FS QA Test 073
> > > +#
> > > +# Test whiteout inode sharing functionality.
> > > +#
> > > +# A "whiteout" is an object that has special meaning in overlayfs.
> > > +# A whiteout on an upper layer will effectively hide a matching file
> > > +# in the lower layer, making it appear as if the file didn't exist.
> > > +#
> > > +# Whiteout inode sharing means multiple whiteout objects will share
> > > +# one inode in upper layer, without this feature every whiteout object
> > > +# will consume one inode in upper layer.
> > > +
> > > +seq=`basename $0`
> > > +seqres=$RESULT_DIR/$seq
> > > +echo "QA output created by $seq"
> > > +
> > > +here=`pwd`
> > > +tmp=/tmp/$
> > > +status=1 # failure is the default!
> > > +trap "_cleanup; exit \$status" 0 1 2 3 15
> > > +
> > > +_cleanup()
> > > +{
> > > + cd /
> > > + rm -f $tmp.*
> > > +}
> > > +
> > > +# get standard environment, filters and checks
> > > +. ./common/rc
> > > +. ./common/filter
> > > +
> > > +# remove previous $seqres.full before test
> > > +rm -f $seqres.full
> > > +
> > > +# real QA test starts here
> > > +_supported_fs overlay
> > > +_supported_os Linux
> > > +_require_scratch
> >
> > I see no feature detection logic, so test just fails on old kernels
> > without this feature? I tried with v5.7-r4 kernel, test fails because
> > each whiteout file has only one hardlink.
>
> That's true.
I'd like to see it _notrun on old kernels where the feature is not
available. But that seems hard to do.. Do you have any better ideas?
Thanks,
Eryu
next prev parent reply other threads:[~2020-05-12 16:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 10:15 [PATCH v4] overlay/072: test for whiteout inode sharing Chengguang Xu
2020-05-06 10:19 ` Amir Goldstein
2020-05-10 15:50 ` [PATCH v4] overlay: " Eryu Guan
2020-05-11 1:32 ` Chengguang Xu
2020-05-12 16:25 ` Eryu Guan [this message]
2020-05-12 16:56 ` Amir Goldstein
2020-05-13 1:10 ` Eryu Guan
2020-05-13 3:17 ` Chengguang Xu
2020-05-13 3:37 ` Amir Goldstein
2020-05-13 9:35 ` Miklos Szeredi
2020-05-13 10:54 ` 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=20200512162532.GD9345@desktop \
--to=guan@eryu.me \
--cc=amir73il@gmail.com \
--cc=cgxu519@mykernel.net \
--cc=fstests@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).