From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 1/8 v4] common/rc: add _require_scratch_shtudown Date: Thu, 5 Feb 2015 13:01:00 +1100 Message-ID: <20150205020100.GB12722@dastard> References: <1423004840-45315-1-git-send-email-jaegeuk@kernel.org> <1423004840-45315-2-git-send-email-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1423004840-45315-2-git-send-email-jaegeuk@kernel.org> Sender: fstests-owner@vger.kernel.org To: Jaegeuk Kim Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net List-Id: linux-f2fs-devel.lists.sourceforge.net On Tue, Feb 03, 2015 at 03:07:13PM -0800, Jaegeuk Kim wrote: > This is to detect whether filesystem supports shutdown feature or not. > > Signed-off-by: Jaegeuk Kim > --- > common/rc | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/common/rc b/common/rc > index 5377ba0..438cd51 100644 > --- a/common/rc > +++ b/common/rc > @@ -2320,6 +2320,17 @@ _require_freeze() > [ $result -eq 0 ] || _notrun "$FSTYP does not support freezing" > } > > +# Does shutdown work on this fs? > +_require_scratch_shutdown() > +{ > + [ -x src/godown ] || _notrun "src/godown executable not found" > + > + _scratch_mount Whitespace damage. Also, the state of the scratch device is undefined until scratch_mkfs is run. > + src/godown -v -f $SCRATCH_MNT >/dev/null 2>&1 \ > + || _notrun "$FSTYP does not support shutdown" Why verbose if you are redirecting all output to /dev/null? > + _scratch_unmount > +} Cheers, Dave. -- Dave Chinner david@fromorbit.com