From patchwork Wed Mar 20 00:46:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10860651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A76DF1669 for ; Wed, 20 Mar 2019 00:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95EAD2998B for ; Wed, 20 Mar 2019 00:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A7A629999; Wed, 20 Mar 2019 00:46:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 274352998B for ; Wed, 20 Mar 2019 00:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726939AbfCTAqE (ORCPT ); Tue, 19 Mar 2019 20:46:04 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:40476 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfCTAqE (ORCPT ); Tue, 19 Mar 2019 20:46:04 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x2K0ew3b176930; Wed, 20 Mar 2019 00:46:02 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-2018-07-02; bh=0cY6OyKjS1DnbblrXJGk4cB3j803XPQ6dXXEEg+yxWs=; b=QT3fSzueDdQVrHnf3vGofWwJNN4BAKkO0CfvFncNKaTh81Zw22EVQUpNOK4ZC7JM0Mt8 CKi8uGhb7VvVg7pMMmG5IxD71NOl5ykPduwjyX5RMk0+p7E5ML3KQxcXx5xkFkAgvg9J 5pFQy2ylACrDyUnir1QhPrSSd+X9uwJUVaBdTGMxBxRLo7SjRAdPOEvYuB0z13CDp4Lp Xe1oE8lEMJZlGeqzacVDG9AAmMKPVm6rtN3hAmS18dwGswXAjn5ty51S1DDBPb7zDcP5 6uQgGmi3ZHUU96vzaikB9QKXfFuxQtTeiGnn/UFI8fH61Wnaw7V1vWObbuFn5qyuXu2x Qw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2r8ssrfsga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:46:02 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x2K0k1vk017789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Mar 2019 00:46:01 GMT 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 x2K0k1Is004408; Wed, 20 Mar 2019 00:46:01 GMT Received: from localhost (/10.159.245.168) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 19 Mar 2019 17:46:01 -0700 Subject: [PATCH 12/12] misc: fix broken _require_scratch usage From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 19 Mar 2019 17:46:01 -0700 Message-ID: <155304276173.31707.10078225002860661364.stgit@magnolia> In-Reply-To: <155304267647.31707.14180452399822113095.stgit@magnolia> References: <155304267647.31707.14180452399822113095.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9200 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903200003 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong _require_scratch doesn't actually format the scratch device with anything, which means that tests are required to format them before using them. Fix tests that don't do this correctly. Signed-off-by: Darrick J. Wong --- tests/generic/026 | 1 - tests/generic/100 | 3 --- tests/generic/506 | 2 +- tests/xfs/065 | 2 +- tests/xfs/108 | 1 + tests/xfs/109 | 2 +- tests/xfs/194 | 4 +++- tests/xfs/261 | 2 ++ tests/xfs/284 | 1 + 9 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/generic/026 b/tests/generic/026 index 6cbd2829..31cd0827 100755 --- a/tests/generic/026 +++ b/tests/generic/026 @@ -32,7 +32,6 @@ _cleanup() _supported_fs generic _supported_os Linux _require_test -_require_scratch _acl_setup_ids _require_acls _require_acl_get_max diff --git a/tests/generic/100 b/tests/generic/100 index c2593333..927c4949 100755 --- a/tests/generic/100 +++ b/tests/generic/100 @@ -52,9 +52,6 @@ _populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres # Then tar up the directory structure tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1 -# create f/s -_require_scratch - # untar on f/s cd $TEST_DIR tar -xvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1 diff --git a/tests/generic/506 b/tests/generic/506 index 5d419cad..7002c00c 100755 --- a/tests/generic/506 +++ b/tests/generic/506 @@ -46,12 +46,12 @@ _supported_os Linux _require_command "$LSATTR_PROG" lsattr _require_command "$CHATTR_PROG" chattr -_require_prjquota $SCRATCH_DEV _require_scratch _require_scratch_shutdown _scratch_mkfs >/dev/null 2>&1 _require_metadata_journaling $SCRATCH_DEV +_require_prjquota $SCRATCH_DEV testfile=$SCRATCH_MNT/testfile diff --git a/tests/xfs/065 b/tests/xfs/065 index c3472486..c0d1ee93 100755 --- a/tests/xfs/065 +++ b/tests/xfs/065 @@ -55,7 +55,7 @@ _supported_os Linux # too much hassle to get output matching with quotas turned on # so don't run it # -_scratch_unmount 2>/dev/null +_scratch_mkfs_xfs >> $seqres.full _scratch_mount $here/src/feature -U $SCRATCH_DEV && \ _notrun "UQuota enabled, test needs controlled xfsdump output" diff --git a/tests/xfs/108 b/tests/xfs/108 index c47f4f37..e70a1f9a 100755 --- a/tests/xfs/108 +++ b/tests/xfs/108 @@ -61,6 +61,7 @@ test_accounting() } export MOUNT_OPTIONS="-opquota" +_scratch_mkfs_xfs >> $seqres.full _qmount _require_prjquota $SCRATCH_DEV diff --git a/tests/xfs/109 b/tests/xfs/109 index a063dc3f..df4ec157 100755 --- a/tests/xfs/109 +++ b/tests/xfs/109 @@ -75,7 +75,7 @@ allocate() } # real QA test starts here -_scratch_unmount 2>/dev/null +_scratch_mkfs_xfs >> $seqres.full _scratch_mount rm -f $seqres.full diff --git a/tests/xfs/194 b/tests/xfs/194 index 6c1eddba..3e186528 100755 --- a/tests/xfs/194 +++ b/tests/xfs/194 @@ -32,6 +32,9 @@ _supported_os Linux # real QA test starts here rm -f $seqres.full +_require_scratch +_scratch_mkfs_xfs >/dev/null 2>&1 + # For this test we use block size = 1/8 page size pgsize=`$here/src/feature -s` blksize=`expr $pgsize / 8` @@ -70,7 +73,6 @@ _filter_od() sed -e "s/^[0-9A-Fa-f ]\{7,8\}//" } -_require_scratch unset MKFS_OPTIONS unset XFS_MKFS_OPTIONS diff --git a/tests/xfs/261 b/tests/xfs/261 index 0fabcd64..92152ace 100755 --- a/tests/xfs/261 +++ b/tests/xfs/261 @@ -47,6 +47,8 @@ _supported_os Linux _require_quota _require_scratch +_scratch_mkfs >> $seqres.full 2>&1 + # Just use the current mount table as an example mtab file. Odds # are good there's nothing wrong with it. _setup_my_mtab() { diff --git a/tests/xfs/284 b/tests/xfs/284 index 07f71031..7af77634 100755 --- a/tests/xfs/284 +++ b/tests/xfs/284 @@ -50,6 +50,7 @@ COPY_FILE="${TEST_DIR}/${seq}_copyfile" # Test dump a mounted device # xfs_metadump should refuse to dump a mounted device +_scratch_mkfs >> $seqres.full 2>&1 _scratch_mount _scratch_metadump $METADUMP_FILE 2>&1 | filter_mounted _scratch_unmount