From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o0ALHRKa049088 for ; Sun, 10 Jan 2010 15:17:29 -0600 Date: Sun, 10 Jan 2010 16:18:21 -0500 From: Christoph Hellwig Subject: Re: [PATCH 2/2] xfstests: 219: ignore duplicates reported by repquota Message-ID: <20100110211821.GA28166@infradead.org> References: <1AB9A794DBDDF54A8A81BE2296F7BDFE012A6942@cf--amer001e--3.americas.sgi.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1AB9A794DBDDF54A8A81BE2296F7BDFE012A6942@cf--amer001e--3.americas.sgi.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Alex Elder Cc: xfs@oss.sgi.com On Sun, Jan 10, 2010 at 01:26:32PM -0600, Alex Elder wrote: > (Re-sending; I misaddressed it the first time.) > > Arrange to ignore duplicate entries reported by the repquota command. > This can happen if an id is used more than once (such as when two user > names are assigned the same uid). > > Do this here by simply dropping any reported entries whose id number > has already been seen in the output. > > Signed-off-by: Alex Elder > > --- > 219 | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Index: b/219 > =================================================================== > --- a/219 > +++ b/219 > @@ -85,7 +85,8 @@ test_accounting() > $here/src/lstat64 $file | head -3 | filter_scratch > done > > - repquota -$type -s -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch > + repquota -$type -s -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch | > + awk '/^#/ { if (! seen[$1]) { seen[$1]++; next; } } { print }' Looks good, Reviewed-by: Christoph Hellwig _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs