From: "Alex Elder" <aelder@sgi.com>
To: xfs@oss.sgi.com
Subject: [PATCH 1/2] xfstests: 050: ignore duplicates reported by repquota
Date: Fri, 8 Jan 2010 12:14:41 -0600 [thread overview]
Message-ID: <1AB9A794DBDDF54A8A81BE2296F7BDFE012A6933@cf--amer001e--3.americas.sgi.com> (raw)
Arrange to ignore duplicate entries reported by the "repquota"
xfs_quota command. This can happen if an id is used more than once
(such as when two user names are assigned the same uid).
Since we are already sorting the output we can accomplish this by
adding the "-u" (unique) option to the sort command. Shorten some
long lines while we're at it.
Signed-off-by: Alex Elder <aelder@sgi.com>
---
050 | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
Index: b/050
===================================================================
--- a/050
+++ b/050
@@ -118,7 +118,9 @@
echo
echo "*** report no quota settings" | tee -a $seq.full
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_report | LC_COLLATE=POSIX sort -ru
echo
echo "*** report initial settings" | tee -a $seq.full
@@ -129,20 +131,26 @@
-c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \
-c "limit -$type isoft=$isoft ihard=$ihard $id" \
$SCRATCH_DEV
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_report | LC_COLLATE=POSIX sort -ru
echo
echo "*** push past the soft inode limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie1 $id $type 1024 0
_file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0
_qmount
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_report | LC_COLLATE=POSIX sort -ru
echo
echo "*** push past the soft block limit" | tee -a $seq.full
_file_as_id $SCRATCH_MNT/softie $id $type 1024 140
_qmount
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_report | LC_COLLATE=POSIX sort -ru
echo
# Note: for quota accounting (not enforcement), EDQUOT is not expected
@@ -152,7 +160,9 @@
_file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
done
_qmount
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_report | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_report | LC_COLLATE=POSIX sort -ru
echo
# Note: for quota accounting (not enforcement), EDQUOT is not expected
@@ -161,7 +171,9 @@
echo "ls -l $SCRATCH_MNT" >>$seq.full
ls -l $SCRATCH_MNT >>$seq.full
_qmount
- xfs_quota -D $tmp.projects -P $tmp.projid -x -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_and_check_blks | LC_COLLATE=POSIX sort -r
+ xfs_quota -D $tmp.projects -P $tmp.projid -x \
+ -c "repquota -birnN -$type" $SCRATCH_DEV |
+ _filter_and_check_blks | LC_COLLATE=POSIX sort -ru
echo
echo "*** unmount"
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2010-01-08 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-08 18:14 Alex Elder [this message]
2010-01-09 14:34 ` [PATCH 1/2] xfstests: 050: ignore duplicates reported by repquota Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1AB9A794DBDDF54A8A81BE2296F7BDFE012A6933@cf--amer001e--3.americas.sgi.com \
--to=aelder@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.