xfs
[Top] [All Lists]

Re: xfstests: 219: fix awk filter for duplicate users

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: xfstests: 219: fix awk filter for duplicate users
From: Alex Elder <aelder@xxxxxxx>
Date: Wed, 03 Feb 2010 16:35:32 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100203205151.GA11337@xxxxxxxxxxxxx>
References: <1265226844.2848.27.camel@doink1> <20100203205151.GA11337@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
On Wed, 2010-02-03 at 15:51 -0500, Christoph Hellwig wrote:
> On Wed, Feb 03, 2010 at 01:54:04PM -0600, Alex Elder wrote:
> > The filter I added for removing duplicate users from the
> > output of repquota didn't do the job very well.  This
> > fixes that, making it so the first time a user is seen
> > its line is printed, not thereafter.
> > 
> > Signed-off-by: Alex Elder <aelder@xxxxxxx>
> > 
> > ---
> >  219 |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Index: b/219
> > ===================================================================
> > --- a/219
> > +++ b/219
> > @@ -86,7 +86,7 @@ test_accounting()
> >         done
> > 
> >         repquota -$type -s -n $SCRATCH_MNT  | grep -v "^#0" |
> > filter_scratch |
> > -       awk '/^#/ { if (! seen[$1]) { seen[$1]++; next; } } { print }'
> > +       awk '/^#/ { if (seen[$1]) next; seen[$1]++; } } { print; }'
> 
> The patch seems whitespace damages, and there's a "}" too many in
> the added line.  After fixing that up 219 passes again for me.
> 
> So more or less:
> 
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

I copy and pasted the wrong thing into my e-mail.
Sorry about that.  I will fix both the white space
and the curly brace before commit.  Thanks for
the review.

                                        -Alex

<Prev in Thread] Current Thread [Next in Thread>