All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Chengguang Xu <cgxu519@mykernel.net>
Cc: guaneryu@gmail.com, fstests@vger.kernel.org,
	linux-unionfs@vger.kernel.org
Subject: Re: [PATCH] generic/484: test data integrity for rdonly remount
Date: Sun, 17 May 2020 22:29:22 +0800	[thread overview]
Message-ID: <20200517142922.GA2704@desktop> (raw)
In-Reply-To: <20200422045210.11017-1-cgxu519@mykernel.net>

On Wed, Apr 22, 2020 at 12:52:10PM +0800, Chengguang Xu wrote:
> This test checks data integrity when remounting from
> rw to ro mode.
> 
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>

The test itself looks fine. I'm just wondering that is there a real bug
which is exposed by this test? And what's the purpose of the shutdown?
More background info would be great if there's any.

> ---
>  tests/generic/484     | 54 +++++++++++++++++++++++++++++++++++++++++++
>  tests/generic/484.out |  2 ++
>  tests/generic/group   |  1 +
>  3 files changed, 57 insertions(+)
>  create mode 100755 tests/generic/484
>  create mode 100644 tests/generic/484.out
> 
> diff --git a/tests/generic/484 b/tests/generic/484
> new file mode 100755
> index 00000000..bc640214
> --- /dev/null
> +++ b/tests/generic/484
> @@ -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 484
> +#
> +# 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
> +
> +_scratch_mkfs &>/dev/null
> +_scratch_mount
> +
> +localdir=$SCRATCH_MNT/dir
> +mkdir $localdir
> +sync
> +
> +# fssum used for comparing checksum of test file(data & metedata),
> +# exclude checking about atime, block structure, open error.
> +$FSSUM_PROG -ugomAcdES -f -w $tmp.fssum $localdir
> +_scratch_remount ro
> +_scratch_shutdown
> +_scratch_cycle_mount
> +$FSSUM_PROG -r $tmp.fssum $localdir
> +
> +exit
> diff --git a/tests/generic/484.out b/tests/generic/484.out
> new file mode 100644
> index 00000000..e33c7815
> --- /dev/null
> +++ b/tests/generic/484.out
> @@ -0,0 +1,2 @@
> +QA output created by 484
> +OK
> diff --git a/tests/generic/group b/tests/generic/group
> index 718575ba..cc58ff0d 100644
> --- a/tests/generic/group
> +++ b/tests/generic/group
> @@ -486,6 +486,7 @@
>  481 auto quick log metadata
>  482 auto metadata replay thin
>  483 auto quick log metadata
> +484 auto quick remount

Also in shutdown group.

Thanks,
Eryu

>  485 auto quick insert
>  486 auto quick attr
>  487 auto quick eio
> -- 
> 2.20.1
> 

  reply	other threads:[~2020-05-17 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  4:52 [PATCH] generic/484: test data integrity for rdonly remount Chengguang Xu
2020-05-17 14:29 ` Eryu Guan [this message]
2020-05-18  2:36   ` Chengguang Xu

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=20200517142922.GA2704@desktop \
    --to=guan@eryu.me \
    --cc=cgxu519@mykernel.net \
    --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.