xfstests 219: ignore duplicates reported by repquota
authorAlex Elder <aelder@sgi.com>
Tue, 19 Jan 2010 20:26:16 +0000 (14:26 -0600)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 19 Jan 2010 20:26:16 +0000 (14:26 -0600)
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 <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
219

diff --git a/219 b/219
index 9d79d5c557ab5279ad17f49c8d9dc5eb105f9011..e278c1cbaa2ac1c2237395958827d83a9058596d 100755 (executable)
--- 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 }'
 }
 
 # real QA test starts here