From patchwork Wed Mar 4 02:46:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11419169 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F178292A for ; Wed, 4 Mar 2020 02:46:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D247420866 for ; Wed, 4 Mar 2020 02:46:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="RpXixwfu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387397AbgCDCqj (ORCPT ); Tue, 3 Mar 2020 21:46:39 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:44916 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387411AbgCDCqj (ORCPT ); Tue, 3 Mar 2020 21:46:39 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242iNCS190181; Wed, 4 Mar 2020 02:46:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=K8fe4a4yZut3SyJTG8V6xLgjbfY3gs8iO0DeMbyzA2A=; b=RpXixwfudJx83RnU2b3YoXgYN4NZlVhW7Cg3v/pAGqp15mOPvdGoy4TmFDZ3gtWFtv+X kL3qbOALBlPiYrMRvkhBsBkPF8DwBo/mLon8/qadvsJAhLqeMax6xpSY5Caor1zrd4lg +E+F4wI7/aiWdLBC52uk3AI/uINKjx/eCSfKZuqknl7M/BRopRQb9h3ETRpqGIq4+/aE THTXhJQb92o5AFKFq2CuwRARI+PrXh6PNpnyz2o3MpvNLpmLyC3OTZd5ZV1fDiHZ1ZYk /fDRO85wGMcbUxK/gJtl6JKZDcuA2/3qULb/Tow6hgZQw4PkbZZ/8J10opsoUimTedew 0w== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2yffwqucyy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:37 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242ieZ6104627; Wed, 4 Mar 2020 02:46:36 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2yg1p63rwj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:36 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0242kZdr012388; Wed, 4 Mar 2020 02:46:35 GMT Received: from localhost (/10.159.225.108) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Mar 2020 18:46:35 -0800 Subject: [PATCH 1/3] generic/402: skip test if xfs_io can't parse the date value From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, Amir Goldstein , fstests@vger.kernel.org Date: Tue, 03 Mar 2020 18:46:34 -0800 Message-ID: <158328999421.2374922.12052887381904972734.stgit@magnolia> In-Reply-To: <158328998787.2374922.4223951558305234252.stgit@magnolia> References: <158328998787.2374922.4223951558305234252.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong If xfs_io's utimes command cannot interpret the arguments that are given to it, it will print out "Bad value for [am]time". Detect when this happens and drop the file out of the test entirely. This is particularly noticeable on 32-bit platforms and the largest timestamp seconds supported by the filesystem is INT_MAX. In this case, the maximum value we can cram into tv_sec is INT_MAX, and there is no way to actually test setting a timestamp of INT_MAX + 1 to test the clamping. Signed-off-by: Darrick J. Wong Reviewed-by: Amir Goldstein --- tests/generic/402 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/generic/402 b/tests/generic/402 index 2a34d127..2481a5d2 100755 --- a/tests/generic/402 +++ b/tests/generic/402 @@ -63,10 +63,26 @@ run_test_individual() # check if the time needs update if [ $update_time -eq 1 ]; then echo "Updating file: $file to timestamp $timestamp" >> $seqres.full - $XFS_IO_PROG -f -c "utimes $timestamp 0 $timestamp 0" $file - if [ $? -ne 0 ]; then + rm -f $tmp.utimes + $XFS_IO_PROG -f -c "utimes $timestamp 0 $timestamp 0" $file > $tmp.utimes 2>&1 + local res=$? + + cat $tmp.utimes >> $seqres.full + if [ "$timestamp" -ne 0 ] && grep -q "Bad value" "$tmp.utimes"; then + echo "xfs_io could not interpret time value \"$timestamp\", skipping \"$file\" test." >> $seqres.full + rm -f $file $tmp.utimes + return + fi + cat $tmp.utimes + rm -f $tmp.utimes + if [ $res -ne 0 ]; then echo "Failed to update times on $file" | tee -a $seqres.full fi + else + if [ ! -f "$file" ]; then + echo "xfs_io did not create file for time value \"$timestamp\", skipping test." >> $seqres.full + return + fi fi tsclamp=$((timestamptsmax?tsmax:timestamp)) From patchwork Wed Mar 4 02:46:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11419173 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78BF192A for ; Wed, 4 Mar 2020 02:46:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 58B7A20866 for ; Wed, 4 Mar 2020 02:46:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="VEKNJbAP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387457AbgCDCqq (ORCPT ); Tue, 3 Mar 2020 21:46:46 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:45034 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387411AbgCDCqp (ORCPT ); Tue, 3 Mar 2020 21:46:45 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242iBFi180818; Wed, 4 Mar 2020 02:46:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=kcNU8w5IkR57m7sytjdxTjauP66DhWVeXLbvEV1iWQo=; b=VEKNJbAPJOW5clsUTP9Qj8/IV7lI/v39C34n+MH6EeExfWa6DtZqBPRLq1JO/QyhY6k2 BlLL5rib0OGDE6m1PRmAs9zP+2tpxMTV6qTognzfOMyB3Z4Brs/7baCQxFo5jUQw4B62 E15Gg36jwIjnRu6Rly8eV4Gi5W8rjkoHVJATdfj6jJnCuJxWDw4UFHtkuytMIxcq6sYz CAfEEC3EC7dXIUs8BFPI5lTs43u/abC4o/OePXhJ6TCgmrS+GwSm+xjusdv4dhiwU3jM vnQbAF6tDKWUy506Q9iF6T+ZfwtwOPNM6V3P7K7mjtV1EWvlVGrAQ523QQ4hrx8Fu2Gy Dg== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2yffwqud0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:43 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242ifed104810; Wed, 4 Mar 2020 02:46:42 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2yg1p63s3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:42 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0242kg73006524; Wed, 4 Mar 2020 02:46:42 GMT Received: from localhost (/10.159.225.108) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Mar 2020 18:46:41 -0800 Subject: [PATCH 2/3] xfs: refactor calls to xfs_admin From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 03 Mar 2020 18:46:40 -0800 Message-ID: <158329000059.2374922.2321079684090223330.stgit@magnolia> In-Reply-To: <158328998787.2374922.4223951558305234252.stgit@magnolia> References: <158328998787.2374922.4223951558305234252.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Create a helper to run xfs_admin on the scratch device, then refactor all tests to use it. Signed-off-by: Darrick J. Wong --- common/config | 1 + common/xfs | 8 ++++++++ tests/xfs/287 | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/config b/common/config index 9a9c7760..1116cb99 100644 --- a/common/config +++ b/common/config @@ -154,6 +154,7 @@ MKSWAP_PROG="$MKSWAP_PROG -f" export XFS_LOGPRINT_PROG="$(type -P xfs_logprint)" export XFS_REPAIR_PROG="$(type -P xfs_repair)" export XFS_DB_PROG="$(type -P xfs_db)" +export XFS_ADMIN_PROG="$(type -P xfs_admin)" export XFS_GROWFS_PROG=$(type -P xfs_growfs) export XFS_SPACEMAN_PROG="$(type -P xfs_spaceman)" export XFS_SCRUB_PROG="$(type -P xfs_scrub)" diff --git a/common/xfs b/common/xfs index 706ddf85..d9a9784f 100644 --- a/common/xfs +++ b/common/xfs @@ -218,6 +218,14 @@ _scratch_xfs_db() $XFS_DB_PROG "$@" $(_scratch_xfs_db_options) } +_scratch_xfs_admin() +{ + local options=("$SCRATCH_DEV") + [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \ + options+=("$SCRATCH_LOGDEV") + $XFS_ADMIN_PROG "$@" "${options[@]}" +} + _scratch_xfs_logprint() { SCRATCH_OPTIONS="" diff --git a/tests/xfs/287 b/tests/xfs/287 index 8dc754a5..f77ed2f1 100755 --- a/tests/xfs/287 +++ b/tests/xfs/287 @@ -70,7 +70,7 @@ $XFS_IO_PROG -r -c "lsproj" $dir/32bit _scratch_unmount # Now, enable projid32bit support by xfs_admin -xfs_admin -p $SCRATCH_DEV >> $seqres.full 2>&1 || _fail "xfs_admin failed" +_scratch_xfs_admin -p >> $seqres.full 2>&1 || _fail "xfs_admin failed" # Now mount the fs, 32bit project quotas shall be supported, now _qmount_option "pquota" From patchwork Wed Mar 4 02:46:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11419177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE9FE1580 for ; Wed, 4 Mar 2020 02:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF72D20866 for ; Wed, 4 Mar 2020 02:46:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="bkIxcFH9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387492AbgCDCqw (ORCPT ); Tue, 3 Mar 2020 21:46:52 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:45140 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387411AbgCDCqw (ORCPT ); Tue, 3 Mar 2020 21:46:52 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242i3v4173337; Wed, 4 Mar 2020 02:46:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=RcyaUvtCq+GADJ1rzOCG/+LsXihT3VDLV91QZKovmFs=; b=bkIxcFH9wUo4JZkXT0rMukn8SnW3Z1xYFywI0rXG2hZhb10a9DwyEDBDFW/kXyRq7Vhe IUCTgjUEQo3CFhs5MdbenQpVDGVaMwMglgW2Gm3ouF7aHXmIFtnk7C7JpOM0yMnJZcBU woKMx/WAfA8arbXfNYajHFCtibxZZVe5cZVLdCcNIhbXghlLOA9n10XgjFAfwsSBM3Kj oE9AKxT+hBAP04Su+z6qjsD3MBVI5uQkzKamHE5KNQjt1DEWT3YKUumyN1Q6br2ilmjn GMbieUOqlBp4oKzoOS2Akl7JAG5ictZ8QNNIYL9INBvxhafT5bCjmlZjHG+Bknz4iLQb mQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2yffwqud18-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:50 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0242ilgZ137748; Wed, 4 Mar 2020 02:46:49 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2yg1eng08v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 04 Mar 2020 02:46:49 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0242kmoY012478; Wed, 4 Mar 2020 02:46:48 GMT Received: from localhost (/10.159.225.108) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Mar 2020 18:46:47 -0800 Subject: [PATCH 3/3] xfs: make sure xfs_db/xfs_quota commands are documented From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 03 Mar 2020 18:46:47 -0800 Message-ID: <158329000698.2374922.9344618703224232004.stgit@magnolia> In-Reply-To: <158328998787.2374922.4223951558305234252.stgit@magnolia> References: <158328998787.2374922.4223951558305234252.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9549 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040019 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Darrick J. Wong Make sure all the xfs_db/xfs_quota commands are documented. Signed-off-by: Darrick J. Wong --- tests/xfs/754 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/754.out | 2 ++ tests/xfs/755 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/755.out | 2 ++ tests/xfs/group | 2 ++ 5 files changed, 116 insertions(+) create mode 100755 tests/xfs/754 create mode 100644 tests/xfs/754.out create mode 100755 tests/xfs/755 create mode 100644 tests/xfs/755.out diff --git a/tests/xfs/754 b/tests/xfs/754 new file mode 100755 index 00000000..ba0885be --- /dev/null +++ b/tests/xfs/754 @@ -0,0 +1,57 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-newer +# Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 754 +# +# Ensure all xfs_db commands are documented. + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* $file +} + +# get standard environment, filters and checks +. ./common/rc + +# real QA test starts here +_supported_fs xfs +_supported_os Linux +_require_command "$XFS_DB_PROG" "xfs_db" +_require_command "$MAN_PROG" man +_require_test + +echo "Silence is golden" + +MANPAGE=$($MAN_PROG --path xfs_db) + +case "$MANPAGE" in +*.gz|*.z\|*.Z) CAT=zcat;; +*.bz2) CAT=bzcat;; +*.xz) CAT=xzcat;; +*) CAT=cat;; +esac +_require_command `which $CAT` $CAT + +file=$TEST_DIR/xx.$seq +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" || \ + echo "$COMMAND not documented in the xfs_db manpage" +done + +# success, all done +status=0 +exit diff --git a/tests/xfs/754.out b/tests/xfs/754.out new file mode 100644 index 00000000..9e7cda82 --- /dev/null +++ b/tests/xfs/754.out @@ -0,0 +1,2 @@ +QA output created by 754 +Silence is golden diff --git a/tests/xfs/755 b/tests/xfs/755 new file mode 100755 index 00000000..0e5d85ab --- /dev/null +++ b/tests/xfs/755 @@ -0,0 +1,53 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-newer +# Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 755 +# +# Ensure all xfs_quota commands are documented. + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* $file +} + +# get standard environment, filters and checks +. ./common/rc + +# real QA test starts here +_supported_fs xfs +_supported_os Linux +_require_command "$XFS_QUOTA_PROG" "xfs_quota" +_require_command "$MAN_PROG" man +_require_test + +echo "Silence is golden" + +MANPAGE=$($MAN_PROG --path xfs_quota) + +case "$MANPAGE" in +*.gz|*.z\|*.Z) CAT=zcat;; +*.bz2) CAT=bzcat;; +*.xz) CAT=xzcat;; +*) CAT=cat;; +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" || \ + echo "$COMMAND not documented in the xfs_quota manpage" +done + +# success, all done +status=0 +exit diff --git a/tests/xfs/755.out b/tests/xfs/755.out new file mode 100644 index 00000000..7c9ea51c --- /dev/null +++ b/tests/xfs/755.out @@ -0,0 +1,2 @@ +QA output created by 755 +Silence is golden diff --git a/tests/xfs/group b/tests/xfs/group index 522d4bc4..aadbb971 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -511,3 +511,5 @@ 511 auto quick quota 512 auto quick acl attr 513 auto mount +754 auto quick db +755 auto quick quota