* xfstests: 219: fix awk filter for duplicate users
@ 2010-02-03 19:54 Alex Elder
2010-02-03 20:43 ` Eric Sandeen
2010-02-03 20:51 ` Christoph Hellwig
0 siblings, 2 replies; 4+ messages in thread
From: Alex Elder @ 2010-02-03 19:54 UTC (permalink / raw)
To: xfs
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@sgi.com>
---
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; }'
}
# real QA test starts here
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: xfstests: 219: fix awk filter for duplicate users
2010-02-03 19:54 xfstests: 219: fix awk filter for duplicate users Alex Elder
@ 2010-02-03 20:43 ` Eric Sandeen
2010-02-03 20:51 ` Christoph Hellwig
1 sibling, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2010-02-03 20:43 UTC (permalink / raw)
To: aelder; +Cc: xfs
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@sgi.com>
>
> ---
> 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; }'
> }
+awk: /^#/ { if (seen[$1]) next; seen[$1]++; } } { print; }
+awk: ^ syntax error
but thanks for making me feel better ;)
w/o the extra "}" it works for me.
(incidentally is a line continuation " \ " needed too? I guess
it works without...)
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: xfstests: 219: fix awk filter for duplicate users
2010-02-03 19:54 xfstests: 219: fix awk filter for duplicate users Alex Elder
2010-02-03 20:43 ` Eric Sandeen
@ 2010-02-03 20:51 ` Christoph Hellwig
2010-02-03 22:35 ` Alex Elder
1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2010-02-03 20:51 UTC (permalink / raw)
To: Alex Elder; +Cc: xfs
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@sgi.com>
>
> ---
> 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@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: xfstests: 219: fix awk filter for duplicate users
2010-02-03 20:51 ` Christoph Hellwig
@ 2010-02-03 22:35 ` Alex Elder
0 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2010-02-03 22:35 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
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@sgi.com>
> >
> > ---
> > 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@lst.de>
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-03 22:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03 19:54 xfstests: 219: fix awk filter for duplicate users Alex Elder
2010-02-03 20:43 ` Eric Sandeen
2010-02-03 20:51 ` Christoph Hellwig
2010-02-03 22:35 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox