All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: cgxu <cgxu519@mykernel.net>
Cc: Filipe Manana <fdmanana@gmail.com>,
	Eryu Guan <guaneryu@gmail.com>, fstests <fstests@vger.kernel.org>,
	overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v2] generic/597: test data integrity for rdonly remount
Date: Mon, 25 May 2020 06:40:05 +0300	[thread overview]
Message-ID: <CAOQ4uxhQ0kYkPAfarc5BT6hvwGiqGcJd821xcj7eG7mVR1W0QQ@mail.gmail.com> (raw)
In-Reply-To: <69537fa5-ebd7-c233-0741-5fc4f9798abd@mykernel.net>

On Mon, May 25, 2020 at 5:25 AM cgxu <cgxu519@mykernel.net> wrote:
>
> On 5/20/20 11:09 PM, Filipe Manana wrote:
> > On Tue, May 19, 2020 at 9:10 AM Chengguang Xu <cgxu519@mykernel.net> wrote:
> >>
> >> This test checks data integrity when remounting from
> >> rw to ro mode.
> >>
> >> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> >> ---
> >> v1->v2:
> >> - Add to shutdown greoup.
> >> - Change case number to 597
> >>
> >>   tests/generic/597     | 54 +++++++++++++++++++++++++++++++++++++++++++
> >>   tests/generic/597.out |  2 ++
> >>   tests/generic/group   |  1 +
> >>   3 files changed, 57 insertions(+)
> >>   create mode 100755 tests/generic/597
> >>   create mode 100644 tests/generic/597.out
> >>
> >> diff --git a/tests/generic/597 b/tests/generic/597
> >> new file mode 100755
> >> index 00000000..d96e750b
> >> --- /dev/null
> >> +++ b/tests/generic/597
> >> @@ -0,0 +1,54 @@
> >> +#! /bin/bash
> >> +# SPDX-License-Identifier: GPL-2.0
> >> +# Copyright (c) 2020 Chengguang Xu <cgxu519@mykernel.net>.
> >> +# All Rights Reserved.
> >> +#
> >> +# FS QA Test 597
> >> +#
> >> +# Test data integrity for ro remount.
> >> +#
> >> +seq=`basename $0`
> >> +seqres=$RESULT_DIR/$seq
> >> +echo "QA output created by $seq"
> >> +
> >> +here=`pwd`
> >> +tmp=/tmp/$$
> >> +status=0
> >> +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 generic
> >> +_supported_os Linux
> >> +_require_fssum
> >> +_require_scratch
> >> +_require_scratch_shutdown
> >
> > Couldn't the test be using dm's flakey instead of shutdown?
> > As shutdown is not implemented by all filesystems (btrfs for example),
> > it would allow more coverage.
> >
>
> Thanks for the suggestion, I tried with dmflakey but unfortunately it
> could not work on overlayfs, a possible solution is that move current
> test case to overlay specific directory and create new test case with
> dmflakey for generic purpose.
>

Or you can create an abstraction for shutdown/dmflakey, because
this test doesn't care which one you use:

_require_scratch_drop
_init_scratch_drop
_mount_scratch_drop
_scratch_drop_and_remount
_cleanup_scratch_drop

But IMO, this could also be done after merging test to increase test
coverage.

Thanks,
Amir.

      reply	other threads:[~2020-05-25  3:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19  8:09 [PATCH v2] generic/597: test data integrity for rdonly remount Chengguang Xu
2020-05-20 15:09 ` Filipe Manana
2020-05-25  2:17   ` cgxu
2020-05-25  3:40     ` Amir Goldstein [this message]

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=CAOQ4uxhQ0kYkPAfarc5BT6hvwGiqGcJd821xcj7eG7mVR1W0QQ@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=cgxu519@mykernel.net \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@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.