Re: [RFC PATCH] check: add flag file to stop running xfstests

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



On Fri, Jan 20, 2017 at 08:44:10AM -0800, Darrick J. Wong wrote:
> On Fri, Jan 20, 2017 at 05:03:28PM +0800, Xiong Zhou wrote:
> > Check if file /tmp/.stopxfstests exists after every
> > case, break and report if positive.
> > 
> > This could gentlely end a xfstests run, instead of
> > killing processes around.
> > 
> > Signed-off-by: Xiong Zhou <xzhou@xxxxxxxxxx>
> > ---
> >  check | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/check b/check
> > index 5a93c94..75ef245 100755
> > --- a/check
> > +++ b/check
> > @@ -472,6 +472,7 @@ else
> >  	trap "_wrapup; exit \$status" 0 1 2 3 15
> >  fi
> >  
> > +rm -f /tmp/.stopxfstests
> >  for section in $HOST_OPTIONS_SECTIONS; do
> >  	OLD_FSTYP=$FSTYP
> >  	OLD_MOUNT_OPTIONS=$MOUNT_OPTIONS
> > @@ -595,6 +596,14 @@ for section in $HOST_OPTIONS_SECTIONS; do
> >  
> >  	for seq in $list
> >  	do
> > +	    if [ -e /tmp/.stopxfstests ] ; then
> > +	        _wrapup
> > +	        echo "WARN: This is an interruptted run."
> 
> "interrupted"
> 
> And, uh, why do we need the ability to programmatically kill xfstests?

Forget it, it's from one of my weird need.

Sometimes I wanna end a running xfstests started by cron, peacefully.

> 
> > +	        echo
> > +                _test_unmount 2> /dev/null
> > +                _scratch_unmount 2> /dev/null
> > +                break 2
> 
> Weird indentation...?

Good catch.

Thanks,
Xiong
> 
> --D
> 
> > +            fi
> >  	    err=false
> >  	    if [ ! -f $seq ]; then
> >  	        # Try to get full name in case the user supplied only seq id
> > -- 
> > 1.8.3.1
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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