From patchwork Mon Jun 28 08:52:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anju T Sudhakar X-Patchwork-Id: 12347439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF99CC49EA7 for ; Mon, 28 Jun 2021 08:53:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9B3961C17 for ; Mon, 28 Jun 2021 08:53:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbhF1Ize (ORCPT ); Mon, 28 Jun 2021 04:55:34 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35500 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232282AbhF1Ize (ORCPT ); Mon, 28 Jun 2021 04:55:34 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15S8Ym3g003114 for ; Mon, 28 Jun 2021 04:53:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=wZva2NHUmR0fD3rkD2bGLIrcCgUScbeeYIySC+dKnOs=; b=em8/Jsl3ngJfWbGDuh1M/RVhS7KoyApSbki8eccZRSc9jz/aeZL/4FigIJKg1HOH1TTA HxYPjkNUcjDNR5z7Bcmv51xkvecJEBMcmbYH9AyZQIDnmVgbSSnrPcXo8otZm2mq3KVW CKR3hMRT/TM25qZjz/vMeY73kgl6sLl9A8G1JrQ6H5qSVXTWc0honXny8mJz8t6TOrrq i4QNXjyzv5L4RwMoBlds4SPeWJaoQLBc6HeLQHqfdJHWj2k8qFyDUQsYoyXWbQyNvVX0 xwoZ3BkYbhMG4MHsmxMzFv6HD3/NFw2CR4lqxDEHCT4dcjB+QKR2oWoJmytTGg/ykNFI 5w== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 39farh0v1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 04:53:08 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15S8q2ZQ011390 for ; Mon, 28 Jun 2021 08:53:06 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 39dughgpdj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 08:53:06 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15S8r48230998934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Jun 2021 08:53:04 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7381F4C082; Mon, 28 Jun 2021 08:53:04 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AB3594C0EA; Mon, 28 Jun 2021 08:53:03 +0000 (GMT) Received: from li-00db19cc-1f39-11b2-a85c-fed2f2ec2619.ibm.com.com (unknown [9.77.195.70]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 28 Jun 2021 08:53:03 +0000 (GMT) From: Anju T Sudhakar To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com Subject: [PATCH 1/3] xfs/504: Add scratch_mount before checking for xfs_scrub unicode support. Date: Mon, 28 Jun 2021 14:22:57 +0530 Message-Id: <20210628085259.120666-2-anju@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628085259.120666-1-anju@linux.vnet.ibm.com> References: <20210628085259.120666-1-anju@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: hvpWhBfuxfRGfDEozjpu1Jwl9cjq8UC7 X-Proofpoint-GUID: hvpWhBfuxfRGfDEozjpu1Jwl9cjq8UC7 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-28_07:2021-06-25,2021-06-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 suspectscore=0 impostorscore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106280059 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org We may not detect the error `Inappropriate ioctl for device`, while running `$XFS_IO_PROG -c "scrub probe" "$mountpoint"`, if scratch device is not mounted before invoking _check_xfs_scrub_does_unicode(). So do _scratch_mount before checking for xfs_scrub support. Signed-off-by: Anju T Sudhakar Reviewed-by: Darrick J. Wong --- tests/xfs/504 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/xfs/504 b/tests/xfs/504 index 40318314..291ee4e4 100755 --- a/tests/xfs/504 +++ b/tests/xfs/504 @@ -21,8 +21,11 @@ _require_xfs_io_command 'label' echo "Silence is golden." +_scratch_mkfs > /dev/null +_scratch_mount want_scrub= _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV" && want_scrub=yes +_scratch_unmount filter_scrub() { grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g' From patchwork Mon Jun 28 08:52:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anju T Sudhakar X-Patchwork-Id: 12347441 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 555F6C2B9F4 for ; Mon, 28 Jun 2021 08:53:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D25461C2E for ; Mon, 28 Jun 2021 08:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232425AbhF1Izg (ORCPT ); Mon, 28 Jun 2021 04:55:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48162 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232282AbhF1Izg (ORCPT ); Mon, 28 Jun 2021 04:55:36 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15S8XH6e005979 for ; Mon, 28 Jun 2021 04:53:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=KVsB0fec4swtdD6jYvrabiqwwgz8SJNUtgVidY9WAZ8=; b=gTUlZo6Pwuer2VorHOSDtEk0krurfl1DXGh2F3qld44XA8a3ZgJzykQh43Vs2FiZpr5Z 2TObXdhoRgTRQ7RIAVaABnVGPx6muWN7kKRsJrThewiFHLbgWFLwOzaEg2lkEXvEd2/d V+u6/IFJsSld3nhB/w+suoBkp29gAaqEzzqewf0YGqUtkjhIgvUgavgYFT5TExlYdOZa HTDcavPRzCG3CNbMB4mzin+Yedav9Ryb7oDkyknHPQYcIYoNowUJQ1FdiVW6YHX0OxE3 1iC+tmQekWboFBgZ3/X/Lnw/YxWNLSeFgjR+RL3JB+8fznoCqCZ9OxAXMYrldWI+sNA6 GQ== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 39f9m32x5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 04:53:10 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15S8iG2b016896 for ; Mon, 28 Jun 2021 08:53:08 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma05fra.de.ibm.com with ESMTP id 39duv8gbsq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 08:53:07 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15S8r5al33358202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Jun 2021 08:53:05 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D7D54C0EE; Mon, 28 Jun 2021 08:53:05 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9FE54C0EA; Mon, 28 Jun 2021 08:53:04 +0000 (GMT) Received: from li-00db19cc-1f39-11b2-a85c-fed2f2ec2619.ibm.com.com (unknown [9.77.195.70]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 28 Jun 2021 08:53:04 +0000 (GMT) From: Anju T Sudhakar To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com Subject: [PATCH 2/3] xfs/514: Check xfsprogs version for verifying the xfs_db commands Date: Mon, 28 Jun 2021 14:22:58 +0530 Message-Id: <20210628085259.120666-3-anju@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628085259.120666-1-anju@linux.vnet.ibm.com> References: <20210628085259.120666-1-anju@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 5wfDEMC8aYAX6PyCComzMzkR4ahO2iP2 X-Proofpoint-GUID: 5wfDEMC8aYAX6PyCComzMzkR4ahO2iP2 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-28_07:2021-06-25,2021-06-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 priorityscore=1501 adultscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106280059 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org xfs_db commands like `attr_remove, attr_set, btheight, and logformat`, are documented only in xfsprogs version v5.5 and later. So skip checking for these commands in xfs_db manpage,if the test is running with xfsprogs version less than v5.5. Signed-off-by: Anju T Sudhakar --- Query: The reason to add this check is, while running xfstest with an older version of xfsprogs, this test case flags as failure, though xfs_db is not expected to have those commands. Otherwise upon failure we should ask the user to use the latest version of xfsprogs. OR is there any better solution for this? tests/xfs/514 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/xfs/514 b/tests/xfs/514 index a9c67645..8da66f41 100755 --- a/tests/xfs/514 +++ b/tests/xfs/514 @@ -27,6 +27,11 @@ _require_test echo "Silence is golden" MANPAGE=$($MAN_PROG --path xfs_db) +# xfs_db commands - attr_remove, attr_set, btheight, and logformat +# are documented in 5.5.0 and later versions only. So skip checking for +# those commands if the version is less than 5.5.0. +command_list="attr_set attr_remove btheight logformat" +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) case "$MANPAGE" in *.gz|*.z\|*.Z) CAT=zcat;; @@ -41,7 +46,12 @@ truncate -s 128m $file $MKFS_XFS_PROG $file >> /dev/null for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ + if [ "$req_version" \< "5.5.0" ]; then + if (echo $command_list | tr ' ' '\n' | grep -F -x -q "$COMMAND");then + continue + fi + fi + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ echo "$COMMAND not documented in the xfs_db manpage" done From patchwork Mon Jun 28 08:52:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anju T Sudhakar X-Patchwork-Id: 12347443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFBB5C49EA7 for ; Mon, 28 Jun 2021 08:53:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A37AD61C2E for ; Mon, 28 Jun 2021 08:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232431AbhF1Izh (ORCPT ); Mon, 28 Jun 2021 04:55:37 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49636 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232415AbhF1Izh (ORCPT ); Mon, 28 Jun 2021 04:55:37 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15S8YOAX067160 for ; Mon, 28 Jun 2021 04:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=BjAzIzysDcBYD+vA/iL7gsd+UU7NHN7EO/aImrJMg+8=; b=i7C9JfJmperJ1MLurroU+UjWWLCG120ooVdslI/j7z+AVb72yAFtPfHSj6+j5u9CCsjR iaRmAUgvAhnSy4XahJ8G463/LDV2GfFanL3WrPMM80Ar9bp0nr2WHoOGmiBuVOMydiZd Ml014Lxaw5VYsKYbHHuBysJfXjuMxn8knkBWqFzliRaK2QLDq8ZO5N07R2nQEYH71kDU RYSwqG6QQ1wNXxmZZSTl5qzkl8lCtUc1KDuC09AGeO/YbOPTJLKNxMrxjBNku/H4OToZ Jy7qVE4XB0fRdbPLkB4sV2TGqR8s3WRTMzIROLZTAHhlXpFKFbve7RI2zLnw7vGnzq6B PA== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 39f8kvm7t0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 04:53:11 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15S8qdd3011870 for ; Mon, 28 Jun 2021 08:53:09 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma06ams.nl.ibm.com with ESMTP id 39dughgpdk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 Jun 2021 08:53:09 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 15S8r7fS34799996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Jun 2021 08:53:07 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DE054C10E; Mon, 28 Jun 2021 08:53:07 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 585674C044; Mon, 28 Jun 2021 08:53:06 +0000 (GMT) Received: from li-00db19cc-1f39-11b2-a85c-fed2f2ec2619.ibm.com.com (unknown [9.77.195.70]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 28 Jun 2021 08:53:06 +0000 (GMT) From: Anju T Sudhakar To: fstests@vger.kernel.org Cc: anju@linux.vnet.ibm.com Subject: [PATCH 3/3] xfs/515: Check xfsprogs version for testing xfs_quota commands Date: Mon, 28 Jun 2021 14:22:59 +0530 Message-Id: <20210628085259.120666-4-anju@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628085259.120666-1-anju@linux.vnet.ibm.com> References: <20210628085259.120666-1-anju@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: lSJHgPBbieZ1G9LnleHRCX6CFgt8PnVt X-Proofpoint-ORIG-GUID: lSJHgPBbieZ1G9LnleHRCX6CFgt8PnVt X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-06-28_07:2021-06-25,2021-06-28 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 impostorscore=0 suspectscore=0 clxscore=1015 adultscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106280055 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, to make it suitable for this(xfs/515) test case. So the test case will flag failure while running with xfsprogs version less than v5.5, even though `limit` is documented in xfs_quota manpage. So skip this test for xfsprogs versions less than v5.5. Signed-off-by: Anju T Sudhakar --- tests/xfs/515 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/xfs/515 b/tests/xfs/515 index 32216fe6..5eb97aff 100755 --- a/tests/xfs/515 +++ b/tests/xfs/515 @@ -27,6 +27,11 @@ _require_test echo "Silence is golden" MANPAGE=$($MAN_PROG --path xfs_quota) +# xfs_quota command 'limit' is reformated in xfsprogs version v5.5.0, +# to make it suitable for this test case. For xfprogs versions less than +# v5.5.0, this test case can not detect the command 'limit'. +req_version=$($XFS_DB_PROG -V | cut -d" " -f3) +req_command="limit" case "$MANPAGE" in *.gz|*.z\|*.Z) CAT=zcat;; @@ -36,8 +41,14 @@ case "$MANPAGE" in esac _require_command `which $CAT` $CAT -for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do - $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ +for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; +do + if [ "$req_version" \< "5.5.0" ]; then + if [ "$COMMAND" == "$req_command" ];then + continue + fi + fi + $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \ echo "$COMMAND not documented in the xfs_quota manpage" done