Re: [PATCH 2/4] xfstests: Add a require_seppquota function

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

 



On Tue, Feb 21, 2012 at 10:58:45AM -0600, Chandra Seetharaman wrote:
> >From 6076480613e3034eab9758903c093a0b24048658 Mon Sep 17 00:00:00 2001
> From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
> Date: Wed, 8 Feb 2012 10:04:49 -0600
> Subject: [PATCH 2/3] Add a require_seppquota function in preparation for testing
>  simultaneous use of pquota and gquota in a filesystem
> 
> Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
> ---
>  common.quota |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/common.quota b/common.quota
> index 9736306..16344ea 100644
> --- a/common.quota
> +++ b/common.quota
> @@ -87,6 +87,15 @@ _require_nobody()
>      [ $? -ne 0 ] && _notrun "group file does not contain nobody/nogroup."
>  }
>  
> +#
> +# checks to see if mkfs supports separate pquota
> +#
> +_require_seppquota()
> +{
> +    mkfs.xfs -o test 2>&1 | grep seppquota > /dev/null
                ^^^^^^^

I have a nit to pick about that... FWICS there is no -o option to mkfs.xfs.
Here -o works fine to get usage only because we have not yet defined a mkfs
option for 'o'.  If we were to do that at a later date... who knows?

There isn't a -h option to print usage either.  It looks like the only way to
print usage so you can grep for seppquota is to do something wrong!  I suggest
that you do this instead:

mkfs.xfs 2>&1 | grep seppquota > /dev/null

I think we can be fairly certain that mkfs.xfs with zero args will always be a
safe way to get usage() to kick off.

Other than that silly nit... this looks fine.

Reviewed-by: Ben Myers <bpm@xxxxxxx>

-Ben

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux