Re: [PATCH 4/4] xfs: test upgrading filesystem to bigtime

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Thu, Oct 29, 2020 at 03:06:55PM +0200, Amir Goldstein wrote:
> On Wed, Oct 28, 2020 at 10:25 PM Darrick J. Wong
> <darrick.wong@xxxxxxxxxx> wrote:
> >
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> >
> > Test that we can upgrade an existing filesystem to use bigtime.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Just some nits.
> Not adding RVB because I would rather someone with more understanding of quotas
> will review this.
> 
> > ---
> >  common/xfs        |   16 ++++++
> >  tests/xfs/908     |   87 ++++++++++++++++++++++++++++++
> >  tests/xfs/908.out |   10 +++
> >  tests/xfs/909     |  153 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/xfs/909.out |    4 +
> >  tests/xfs/group   |    2 +
> >  6 files changed, 272 insertions(+)
> >  create mode 100755 tests/xfs/908
> >  create mode 100644 tests/xfs/908.out
> >  create mode 100755 tests/xfs/909
> >  create mode 100644 tests/xfs/909.out
> >
> >
> > diff --git a/common/xfs b/common/xfs
> > index 19ccee03..4274eee7 100644
> > --- a/common/xfs
> > +++ b/common/xfs
> > @@ -1008,3 +1008,19 @@ _xfs_timestamp_range()
> >                 $dbprog -f -c 'timelimit --compact' | awk '{printf("%s %s", $1, $2);}'
> >         fi
> >  }
> > +
> > +_require_xfs_mkfs_bigtime()
> > +{
> > +       _scratch_mkfs_xfs_supported -m bigtime=1 >/dev/null 2>&1 \
> > +          || _notrun "mkfs.xfs doesn't have bigtime feature"
> > +}
> > +
> > +_require_xfs_scratch_bigtime()
> > +{
> > +       _require_scratch
> > +
> > +       _scratch_mkfs -m bigtime=1 > /dev/null
> > +       _try_scratch_mount || \
> > +               _notrun "bigtime not supported by scratch filesystem type: $FSTYP"
> > +       _scratch_unmount
> > +}
> > diff --git a/tests/xfs/908 b/tests/xfs/908
> > new file mode 100755
> > index 00000000..e368d66c
> > --- /dev/null
> > +++ b/tests/xfs/908
> > @@ -0,0 +1,87 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0-or-later
> > +# Copyright (c) 2020, Oracle and/or its affiliates.  All Rights Reserved.
> > +#
> > +# FS QA Test No. 908
> > +#
> > +# Check that we can upgrade a filesystem to support bigtime and that inode
> > +# timestamps work properly after the upgrade.
> > +
> > +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
> > +
> > +# We have very specific formatting parameters, so don't let things get complex
> > +# with realtime devices and external logs.
> > +unset USE_EXTERNAL
> > +
> > +# real QA test starts here
> > +_supported_fs xfs
> > +_require_xfs_mkfs_crc
> > +_require_xfs_mkfs_bigtime
> > +_require_xfs_scratch_bigtime
> 
> Should we also explicitly require support for xfs_admin -O bigtime?

<shrug> I don't know.  Assuming all the xfsprogs support code goes in at
the same time, then the fact that you can format with bigtime means that
xfs_admin will support upgrading to bigtime.

> > diff --git a/tests/xfs/909.out b/tests/xfs/909.out
> > new file mode 100644
> > index 00000000..948502b7
> > --- /dev/null
> > +++ b/tests/xfs/909.out
> > @@ -0,0 +1,4 @@
> > +QA output created by 909
> > +grace2 expiry is in range
> > +grace2 expiry after remount is in range
> > +Silence is golden.
> 
> Output is not silent ;-)

Will fix, thanks.

--D

> Thanks,
> Amir.



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux