[PATCH] xfstests comma separated group names
Itaru Kitayama
itaru.kitayama at gmail.com
Mon May 20 22:45:32 CDT 2013
In the current check script the -g option assumes only one group is given.
With this patch, the -g option
understands comma separated multiple groups as the argument as well.
Existing scripts are not affected
by this patch.
Reviewed-by: Dave Chinner <david at redhat.com>
Signed-off-by: Itaru Kitayama <itaru.kitayama at gmail.com>
---
check | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/check b/check
index a79747e..0e0f208 100755
--- a/check
+++ b/check
@@ -164,18 +164,19 @@ while [ $# -gt 0 ]; do
-nfs) FSTYP=nfs ;;
-g) group=$2 ; shift ;
- group_list=$(get_group_list $group)
- if [ -z "$group_list" ]; then
- echo "Group \"$group\" is empty or not defined?"
- exit 1
- fi
-
- [ ! -s $tmp.list ] && touch $tmp.list
- for t in $group_list; do
- grep -s "^$t\$" $tmp.list >/dev/null || \
- echo "$t"
>>$tmp.list
+ for g in ${group//,/ }; do
+ group_list=$(get_group_list $g)
+ if [ -z "$group_list" ]; then
+ echo "Group \"$g\" is empty or not defined?"
+ exit 1
+ fi
+
+ [ ! -s $tmp.list ] && touch $tmp.list
+ for t in $group_list; do
+ grep -s "^$t\$" $tmp.list >/dev/null || \
+ echo "$t"
>>$tmp
+ done
done
-
;;
-x) xgroup=$2 ; shift ;
On Tue, May 21, 2013 at 9:45 AM, Dave Chinner <david at fromorbit.com> wrote:
> On Mon, May 20, 2013 at 08:42:35PM +0900, Itaru Kitayama wrote:
> > Yes, we can do that, but I just thought as you originally proposed last
> year
> >
> > -g rw,attr reads better.
>
> Agreed, it does read better and is easily to type.
>
> That's what you need to put in the commit message - why it is better
> than what we currently have, and whether it is badwards compatible
> or not (doesn't break any existing scripts). i.e. the commit
> message is for telling people -why- the change should be made as we
> can look at the code to determine -what- the change is. ;)
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david at fromorbit.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20130521/c5264fa8/attachment-0001.html>
More information about the xfs
mailing list