From: Dave Chinner <david@fromorbit.com>
To: Xiao Yang <yangx.jy@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, "Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH] xfs/132: umount scratch device after finishing test
Date: Tue, 22 May 2018 15:19:16 +1000 [thread overview]
Message-ID: <20180522051916.GT10363@dastard> (raw)
In-Reply-To: <5B039746.1000309@cn.fujitsu.com>
On Tue, May 22, 2018 at 12:06:30PM +0800, Xiao Yang wrote:
> On 2018/05/22 6:46, Dave Chinner wrote:
> >On Mon, May 21, 2018 at 03:45:52PM +0800, Xiao Yang wrote:
> >>On 2018/05/21 10:36, Dave Chinner wrote:
> >>>On Sat, May 19, 2018 at 12:32:24PM +0800, Xiao Yang wrote:
> >>>>xfs/132 and xfs/133 running together got the following error:
> >>>>------------------------------------------------------------
> >>>>...
> >>>>xfs/132 1s ... 1s
> >>>>xfs/133 1s ... [failed, exit status 1] - output mismatch (see /var/lib/xfstests/results//xfs/133.out.bad)
> >>>>...
> >>>>QA output created by 133
> >>>>-Format and mount
> >>>>-Corrupt filesystem
> >>>>-Remount, try to append
> >>>>-Write did not succeed (ok).
> >>>>+SCRATCH_DEV=/dev/sda11 is mounted but not on SCRATCH_MNT=common/config: - aborting
> >>>>+Already mounted result:
> >>>>+/dev/sda11 /mnt/xfstests/scratch
> >>>>...
> >>>>------------------------------------------------------------
> >>>>
> >>>>xfs/132 led to XFS shutdown due to the corrupted inode, but it didn't rectify XFS
> >>>>by umount scratch device.
> >>>AFAIK, we don't have to unmount the scratch device when a test
> >>>finishes - the test harness is supposed to do that and make sure
> >>>that it is in the correct state for the next test to run.
> >>>
> >>>It seems that somewhere along the line this got broken. - I'm
> >>>guessing the fact that this test also says "don't check the scratch
> >>>device" the test harness is failing to unmount it because it's not
> >>>running _check_scratch_device. I'm guessing that it should at least
> >>>run _scratch_unmount....
> >>Hi Dave,
> >>
> >>Could we just make the test harness call _scratch_unmount after running every test, as below:
> >>--------------------------------------------------------------
> >>diff --git a/check b/check
> >>index 96198ac..63ece67 100755
> >>--- a/check
> >>+++ b/check
> >>@@ -815,6 +815,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
> >> _make_testcase_report "$tc_status"
> >> fi
> >> seq="after_$seqnum"
> >>+ _scratch_unmount 2> /dev/null
> >> done
> >> sect_stop=`_wallclock`
> >> interrupt=false
> >Sort of. The problem is in _check_filesystem, though, where it does
> >nothing when _require_scratch_nocheck() is used. It needs to cycle
> >the mount in this case, and then the main loop doesn't need to be
> >touched...
> Hi Dave,
>
> What about cycling the mount when _require_scratch_nocheck() or _notrun is called?
> --------------------------------------------------------------------
> diff --git a/check b/check
> index 96198ac..ea94524 100755
> --- a/check
> +++ b/check
> @@ -489,10 +489,14 @@ _check_filesystems()
> if [ -f ${RESULT_DIR}/require_test ]; then
> _check_test_fs || err=true
> rm -f ${RESULT_DIR}/require_test*
> + else
> + _test_cycle_mount
> fi
> if [ -f ${RESULT_DIR}/require_scratch ]; then
> _check_scratch_fs || err=true
> rm -f ${RESULT_DIR}/require_scratch*
> + else
> + _scratch_cycle_mount
> fi
> }
> --------------------------------------------------------------------
I would just unmount them. _require_test will mount the test device
if it's unmounted, and _require_scratch unmounts it if it is
mounted. Hence there is no real need to mount it again here,
especially as trying to mount a corrupt scratch device can throw
errors...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-05-22 5:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-19 4:32 [PATCH] xfs/132: umount scratch device after finishing test Xiao Yang
2018-05-21 2:36 ` Dave Chinner
2018-05-21 7:45 ` Xiao Yang
2018-05-21 22:46 ` Dave Chinner
2018-05-22 4:06 ` Xiao Yang
2018-05-22 5:19 ` Dave Chinner [this message]
2018-05-22 6:03 ` [PATCH v2] check: Make the test harness unmount fs when finishing a test Xiao Yang
2018-05-22 9:49 ` [PATCH v3] " Xiao Yang
2018-05-22 22:14 ` Dave Chinner
2018-05-22 9:57 ` [PATCH v2] " Xiao Yang
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=20180522051916.GT10363@dastard \
--to=david@fromorbit.com \
--cc=darrick.wong@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=yangx.jy@cn.fujitsu.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: 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