From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com ([209.132.183.28]:51771 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280AbcDAHBR (ORCPT ); Fri, 1 Apr 2016 03:01:17 -0400 From: Eryu Guan Subject: [PATCH] xfs/133 134 262: limit xfs_quota report to report on specific project quota id Date: Fri, 1 Apr 2016 15:00:50 +0800 Message-Id: <1459494050-28330-1-git-send-email-eguan@redhat.com> Sender: fstests-owner@vger.kernel.org To: fstests@vger.kernel.org Cc: xfs@oss.sgi.com, Eryu Guan List-ID: With GETNEXTQUOTA support, xfs_quota -c "report" now outputs more quota info than before, and this breaks xfs/133 xfs/134 and xfs/262, e.g. xfs/133 fails as Filesystem Blocks Quota Limit Warn/Time Mounted on SCRATCH_DEV 0 102400 204800 00 [--------] SCRATCH_MNT === report command output === +(null) 0 0 0 00 [--------] 123456-project 0 102400 204800 00 [--------] Fix it by limiting xfs_quota to report on specific project quota number using -L & -U option, so only the project quota being tested is reported. Signed-off-by: Eryu Guan --- I'm not sure if kernel should be fixed, but limiting the quota report on project number being tested seems something worth doing to me anyway. It avoids breakage of future changes of quota report output. tests/xfs/133 | 8 +++++--- tests/xfs/133.out | 2 +- tests/xfs/134 | 22 +++++++++++++++------- tests/xfs/262 | 6 ++++-- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/xfs/133 b/tests/xfs/133 index 82c38b1..7a0e55e 100755 --- a/tests/xfs/133 +++ b/tests/xfs/133 @@ -57,16 +57,17 @@ do_project_test() { local qa_project=123456-project local dir=$SCRATCH_MNT/project + local proj_num=10 mkdir $dir 2>/dev/null #project quota files cat >$tmp.projects <$tmp.projid <$tmp.projects <$tmp.projid <> "$seqres.full" 1>&2 # See what gets reported -_quota_cmd "report" | _filter_quota_rpt 2>> "$seqres.full" +_quota_cmd "report -U $proj_num -L $proj_num" | _filter_quota_rpt \ + 2>> $seqres.full _quota_cmd "df" | _filter_quota_rpt 2>> "$seqres.full" # This time using "human readable" output -_quota_cmd "report -h" | _filter_quota_rpt 2>> "$seqres.full" +_quota_cmd "report -h $proj_num -L $proj_num" | _filter_quota_rpt \ + 2>> "$seqres.full" _quota_cmd "df -h" | _filter_quota_rpt 2>> "$seqres.full" # Clean up -- 2.5.5