From patchwork Tue May 17 07:01:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851964 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AC88C433FE for ; Tue, 17 May 2022 07:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbiEQHB3 (ORCPT ); Tue, 17 May 2022 03:01:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239783AbiEQHBZ (ORCPT ); Tue, 17 May 2022 03:01:25 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB97B16583 for ; Tue, 17 May 2022 00:01:19 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id D9AC953423D for ; Tue, 17 May 2022 17:01:14 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy6w-4k for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005njh-3S for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 01/12] fstests: filter quota warnings Date: Tue, 17 May 2022 17:01:00 +1000 Message-Id: <20220517070111.1381936-2-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=e9dl9Yl/ c=1 sm=1 tr=0 ts=6283483a a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=kQqIYB2Um9HJNwBhtG8A:9 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Quota warning code has been removed from the upstream kernel and now returns -EINVAL errors. Seeing as we can't set warnings anymore and they have always been non-functional in the kernel, just remove the calls to set warnings filter those errors out so those tests pass again. Signed-off-by: Dave Chinner --- tests/xfs/050 | 9 --------- tests/xfs/153 | 9 --------- tests/xfs/299 | 9 --------- 3 files changed, 27 deletions(-) diff --git a/tests/xfs/050 b/tests/xfs/050 index 1847611b..2220e470 100755 --- a/tests/xfs/050 +++ b/tests/xfs/050 @@ -84,9 +84,6 @@ _exercise() _qsetup $1 echo "Using type=$type id=$id" >>$seqres.full - - $XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV - echo echo "*** report no quota settings" | tee -a $seqres.full $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ @@ -113,7 +110,6 @@ _exercise() _file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0 _file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0 _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -122,8 +118,6 @@ _exercise() echo "*** push past the soft block limit" | tee -a $seqres.full _file_as_id $SCRATCH_MNT/softie $id $type $bsize 300 _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \ - -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -136,8 +130,6 @@ _exercise() _file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0 done _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" \ - -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -149,7 +141,6 @@ _exercise() echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_and_check_blks | LC_COLLATE=POSIX sort -ru diff --git a/tests/xfs/153 b/tests/xfs/153 index 8e1430c0..dbe26b68 100755 --- a/tests/xfs/153 +++ b/tests/xfs/153 @@ -89,9 +89,6 @@ run_tests() _qsetup $1 echo "Using type=$type id=$id" >>$seqres.full - - $XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV - echo echo "*** report no quota settings" | tee -a $seqres.full $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ @@ -122,7 +119,6 @@ run_tests() _file_as_id $SCRATCH_MNT/softie4 0 $type 1024 0 _scratch_umount_idmapped _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -133,8 +129,6 @@ run_tests() _file_as_id $SCRATCH_MNT/softie 0 $type $bsize 300 _scratch_umount_idmapped _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \ - -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -149,8 +143,6 @@ run_tests() _scratch_umount_idmapped done _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" \ - -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -164,7 +156,6 @@ run_tests() echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_and_check_blks | LC_COLLATE=POSIX sort -ru diff --git a/tests/xfs/299 b/tests/xfs/299 index a3077b0c..4b9df3c6 100755 --- a/tests/xfs/299 +++ b/tests/xfs/299 @@ -70,9 +70,6 @@ _exercise() _qsetup $1 echo "Using type=$type id=$id" >>$seqres.full - - $XFS_QUOTA_PROG -x -c "warn -$type 65535 -d" $SCRATCH_DEV - echo echo "*** report no quota settings" | tee -a $seqres.full $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ @@ -99,7 +96,6 @@ _exercise() _file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0 _file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0 _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -108,8 +104,6 @@ _exercise() echo "*** push past the soft block limit" | tee -a $seqres.full _file_as_id $SCRATCH_MNT/softie $id $type $bsize 200 _qmount - $XFS_QUOTA_PROG -x -c "warn -i -$type 0 $id" \ - -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -122,8 +116,6 @@ _exercise() _file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0 done _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" \ - -c "warn -i -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_quota_report | LC_COLLATE=POSIX sort -ru @@ -135,7 +127,6 @@ _exercise() echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full _qmount - $XFS_QUOTA_PROG -x -c "warn -b -$type 0 $id" $SCRATCH_DEV $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | _filter_and_check_blks | LC_COLLATE=POSIX sort -ru From patchwork Tue May 17 07:01:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C021C433FE for ; Tue, 17 May 2022 07:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238684AbiEQHBW (ORCPT ); Tue, 17 May 2022 03:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240307AbiEQHBT (ORCPT ); Tue, 17 May 2022 03:01:19 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1575F12A99 for ; Tue, 17 May 2022 00:01:17 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id BF26E10E69CD for ; Tue, 17 May 2022 17:01:16 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy6x-5d for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005njl-4T for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 02/12] xfs/122: add attribute log formats to test output. Date: Tue, 17 May 2022 17:01:01 +1000 Message-Id: <20220517070111.1381936-3-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=e9dl9Yl/ c=1 sm=1 tr=0 ts=6283483c a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=VwQbUJbxAAAA:8 a=zfnGL-Rk5xkN1Y3xoGsA:9 a=AjGcO6oz07-iQ99wixmX:22 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Now that we have merged logged attributes, add the attribute log format sizes to the on-disk structure size checking. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong --- tests/xfs/122.out | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/xfs/122.out b/tests/xfs/122.out index 608faa4b..a56cbee8 100644 --- a/tests/xfs/122.out +++ b/tests/xfs/122.out @@ -63,6 +63,8 @@ sizeof(struct xfs_attr3_leaf_hdr) = 80 sizeof(struct xfs_attr3_leafblock) = 88 sizeof(struct xfs_attr3_rmt_hdr) = 56 sizeof(struct xfs_attr_shortform) = 8 +sizeof(struct xfs_attrd_log_format) = 16 +sizeof(struct xfs_attri_log_format) = 40 sizeof(struct xfs_btree_block) = 72 sizeof(struct xfs_btree_block_lhdr) = 64 sizeof(struct xfs_btree_block_shdr) = 48 From patchwork Tue May 17 07:01:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A252C433EF for ; Tue, 17 May 2022 07:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240333AbiEQHBU (ORCPT ); Tue, 17 May 2022 03:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239691AbiEQHBT (ORCPT ); Tue, 17 May 2022 03:01:19 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1771512773 for ; Tue, 17 May 2022 00:01:16 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 6C98E5345EB for ; Tue, 17 May 2022 17:01:14 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy6y-6c for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005njp-5Q for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 03/12] xfs/348: golden output is not correct Date: Tue, 17 May 2022 17:01:02 +1000 Message-Id: <20220517070111.1381936-4-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=6283483a a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=VwQbUJbxAAAA:8 a=bLOITkrf0B9LOGp-q54A:9 a=AjGcO6oz07-iQ99wixmX:22 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner The output of xfs/348 encodes the observed behaviour at the time the test was written, not the correct behaviour that should occur. Recent improvements in verification checking in the upstream kernel (1eb70f54c445 "xfs: validate inode fork size against fork format") have resulted in the kernel having correct behaviour and now the test fails. Fix the test output to reflect correct behaviour. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong --- tests/xfs/348.out | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/xfs/348.out b/tests/xfs/348.out index 0d407718..9130f42a 100644 --- a/tests/xfs/348.out +++ b/tests/xfs/348.out @@ -108,7 +108,7 @@ would have junked entry "DATA" in directory PARENT_INO would have junked entry "EMPTY" in directory PARENT_INO would have junked entry "FIFO" in directory PARENT_INO stat: 'SCRATCH_MNT/test/DIR' is a directory -stat: 'SCRATCH_MNT/test/DATA' is a directory +stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning stat: cannot statx 'SCRATCH_MNT/test/SYMLINK': Structure needs cleaning stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning @@ -240,7 +240,7 @@ would have junked entry "DIR" in directory PARENT_INO would have junked entry "EMPTY" in directory PARENT_INO would have junked entry "FIFO" in directory PARENT_INO stat: cannot statx 'SCRATCH_MNT/test/DIR': Structure needs cleaning -stat: 'SCRATCH_MNT/test/DATA' is a symbolic link +stat: cannot statx 'SCRATCH_MNT/test/DATA': Structure needs cleaning stat: cannot statx 'SCRATCH_MNT/test/EMPTY': Structure needs cleaning stat: 'SCRATCH_MNT/test/SYMLINK' is a symbolic link stat: cannot statx 'SCRATCH_MNT/test/CHRDEV': Structure needs cleaning From patchwork Tue May 17 07:01:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A3BC43217 for ; Tue, 17 May 2022 07:02:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240896AbiEQHCV (ORCPT ); Tue, 17 May 2022 03:02:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240498AbiEQHB3 (ORCPT ); Tue, 17 May 2022 03:01:29 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC55A255BD for ; Tue, 17 May 2022 00:01:20 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 311B910E69CE for ; Tue, 17 May 2022 17:01:18 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy70-7Y for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005njt-6R for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 04/12] fstests: fix group list generation for whacky test names Date: Tue, 17 May 2022 17:01:03 +1000 Message-Id: <20220517070111.1381936-5-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=deDjYVbe c=1 sm=1 tr=0 ts=6283483e a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=_vxGkCWramiWRfEBLmYA:9 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Darrick noticed that tests/xfs/191-input-validation didn't get generated properly. Fix the regex to handle this. $ grep -I -R "^_begin_fstest" tests/xfs | \ sed -e 's/^.*\/\([0-9]*\):_begin_fstest/\1/' |grep 191 tests/xfs/191-input-validation:_begin_fstest auto quick mkfs realtime $ $ grep -I -R "^_begin_fstest" tests/xfs | \ sed -e 's/^.*\/\([0-9]*\).*:_begin_fstest/\1/ ' |grep 191 191 auto quick mkfs realtime $ Use the regexes for matching test names defined in common/test_names rather than trying to open code it. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong --- tools/mkgroupfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/mkgroupfile b/tools/mkgroupfile index 24435898..414cb538 100755 --- a/tools/mkgroupfile +++ b/tools/mkgroupfile @@ -19,6 +19,8 @@ if [ ! -x ../../check ]; then exit 1 fi +. ../../common/test_names + cleanup() { rm -f $new_groups.check @@ -60,7 +62,8 @@ ENDL # Aggregate the groups each test belongs to for the group file grep -I -R "^_begin_fstest" $test_dir/ | \ - sed -e 's/^.*\/\([0-9]*\):_begin_fstest/\1/' >> $new_groups + sed -e "s/^.*\/\($VALID_TEST_NAME\):_begin_fstest/\1/" \ + >> $new_groups # Create the list of unique groups for existence checking grep -I -R "^_begin_fstest" $test_dir/ | \ From patchwork Tue May 17 07:01:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F34DFC433F5 for ; Tue, 17 May 2022 07:01:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229839AbiEQHBa (ORCPT ); Tue, 17 May 2022 03:01:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239886AbiEQHBX (ORCPT ); Tue, 17 May 2022 03:01:23 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E928A15FE4 for ; Tue, 17 May 2022 00:01:19 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id B6F885345F6 for ; Tue, 17 May 2022 17:01:14 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy75-8o for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005njx-7M for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 05/12] README: document _begin_fstests better Date: Tue, 17 May 2022 17:01:04 +1000 Message-Id: <20220517070111.1381936-6-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=deDjYVbe c=1 sm=1 tr=0 ts=6283483a a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=cW3PQDqm_EACmSyWozIA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Because how it actually gets used by the fstests infrastructure has been undocumented and that has impact on how it should be set up. Signed-off-by: Dave Chinner --- README | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/README b/README index 7da66cb6..eacf1acd 100644 --- a/README +++ b/README @@ -368,19 +368,42 @@ Test script environment: 6. Test group membership: Each test can be associated with any number of groups for convenient selection of subsets of tests. Group names - can be any sequence of non-whitespace characters. Test authors - associate a test with groups by passing the names of those groups as - arguments to the _begin_fstest function. For example, the code: + can be any sequence of non-whitespace characters, though human-readable + names that match the set [A-Za-z0-9\-] are highly prefered. - _begin_fstest auto quick subvol snapshot + Test authors associate a test with groups by passing the names of those + groups as arguments to the _begin_fstest function. While _begin_fstests + is a shell function that must be called at the start of a test to + initialise the test environment correctly, the the build infrastructure + also scans the test files for _begin_fstests invocations. It does this + to compile the group lists that are used to determine which tests to run + when `check` is executed. In other words, test files files must call + _begin_fstest with their intended groups or they will not be run. + + However, because the build infrastructure also uses _begin_fstests as + a defined keyword, addition restrictions are placed on how it must be + formatted: + + (a) It must be a single line with no multi-line continuations. + + (b) group names should be separated by spaces and not other whitespace + + (c) A '#' placed anywhere in the list, even in the middle of a group + name, will cause everything from the # to the end of the line to be + ignored. + + For example, the code: + + _begin_fstest auto quick subvol snapshot # metadata associates the current test with the "auto", "quick", "subvol", and - "snapshot" groups. It is not necessary to specify the "all" group - in the list because that group is computed at run time. + "snapshot" groups. Because "metadata" is after the "#" comment + delimiter, it is ignored by the build infrastructure and so it will not + be associated with that group. + + It is not necessary to specify the "all" group in the list because that + group is always computed at run time from the group lists. - The build process scans test files for _begin_fstest invocations and - compiles the group list from that information. In other words, test - files must call _begin_fstest or they will not be run. Verified output: From patchwork Tue May 17 07:01:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7ADD0C433F5 for ; Tue, 17 May 2022 07:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238383AbiEQHBV (ORCPT ); Tue, 17 May 2022 03:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239768AbiEQHBT (ORCPT ); Tue, 17 May 2022 03:01:19 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1789412774 for ; Tue, 17 May 2022 00:01:16 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 4DE2252DC04 for ; Tue, 17 May 2022 17:01:14 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy76-9r for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005nk2-8h for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 06/12] xfs/148: make test debuggable Date: Tue, 17 May 2022 17:01:05 +1000 Message-Id: <20220517070111.1381936-7-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=6283483a a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=shh0ZNA0_UVB9JGXS7UA:9 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Don't clean up image files - leave them laying around on the test device so that when the test fails there's a corpse left behind to post-mortem.... Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong --- tests/xfs/148 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/xfs/148 b/tests/xfs/148 index 9427aff0..8d50a642 100755 --- a/tests/xfs/148 +++ b/tests/xfs/148 @@ -16,7 +16,7 @@ _cleanup() cd / $UMOUNT_PROG $mntpt > /dev/null 2>&1 test -n "$loopdev" && _destroy_loop_device $loopdev > /dev/null 2>&1 - rm -r -f $imgfile $mntpt $tmp.* + rm -r -f $tmp.* } # Import common functions. @@ -38,6 +38,8 @@ nullstr="too_many_beans" slashstr="are_bad_for_you" test_names=("something" "$nullstr" "$slashstr" "another") +rm -f $imgfile $imgfile.old + # Format image file w/o crcs so we can sed the image file $XFS_IO_PROG -f -c 'truncate 40m' $imgfile loopdev=$(_create_loop_device $imgfile) @@ -91,7 +93,6 @@ sed -b \ -i $imgfile test "$(md5sum < $imgfile)" != "$(md5sum < $imgfile.old)" || _fail "sed failed to change the image file?" -rm -f $imgfile.old loopdev=$(_create_loop_device $imgfile) _mount $loopdev $mntpt From patchwork Tue May 17 07:01:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851967 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 945D6C433F5 for ; Tue, 17 May 2022 07:02:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240673AbiEQHCM (ORCPT ); Tue, 17 May 2022 03:02:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240542AbiEQHB3 (ORCPT ); Tue, 17 May 2022 03:01:29 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8571A3CFF1 for ; Tue, 17 May 2022 00:01:24 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id B9E6110E69D5 for ; Tue, 17 May 2022 17:01:23 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy79-BB for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005nkA-9f for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 07/12] xfs/148: fix failure from bad shortform size assumptions Date: Tue, 17 May 2022 17:01:06 +1000 Message-Id: <20220517070111.1381936-8-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=e9dl9Yl/ c=1 sm=1 tr=0 ts=62834844 a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=VwQbUJbxAAAA:8 a=mDPyBUI4OX8v4RjPpF4A:9 a=AjGcO6oz07-iQ99wixmX:22 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner We replaced an attr named: slashstr="are_bad_for_you" with this substitution: cp $imgfile $imgfile.old sed -b \ -e "s/$nullstr/too_many\x00beans/g" \ -e "s/$slashstr/are_bad\/for_you/g" \ -i $imgfile We then try to retreive the attr named 'a_are_bad/for_you'. The failure is: -Attribute "a_are_bad/for_you" had a 3 byte value for TEST_DIR/mount-148/testfile: -heh +attr_get: No data available +Could not get "a_are_bad/for_you" for TEST_DIR/mount-148/testfile The error returned is ENODATA - the xattr does not exist. While the name might exist in the attr leaf block: .... nvlist[0].valuelen = 3 nvlist[0].namelen = 17 nvlist[0].name = "a_are_bad/for_you" nvlist[0].value = "heh" nvlist[1].valuelen = 3 .... xattrs are not looked up by name matches when in leaf or node form like they are in short form. They are looked up by *name hash* matches, and if the hash is not found, then the name does not exist. Only if the has match is found, then it goes and retrieves the xattr pointed to by the hash and checks the name. At this point, it should be obvious that the hash of "a_are_bad_for_you" is different to "a_a_are_bad/for_you". Hence the leaf lookup is always rejected at the hash match stage and never gets to the name compare stage. IOWs, this test can *never* pass when the xattr is in leaf/node form, only when it is in short form. The reason the attr fork is in leaf form is that we are using "-m crc=0" and so the inodes are only 256 bytes in size and can only hold ~150 bytes in the literal area. That leaves ~100 bytes maximum for shortform attr data. The test consumes ~80 bytes of shortform space, so it should fit and the test pass. However: nvlist[4].valuelen = 37 nvlist[4].namelen = 7 nvlist[4].name = "selinux" nvlist[4].value = "unconfined_u:object_r:unlabeled_t:s0\000" Yes, I run the fstests with selinux enabled on some of test machines. The selinux attr pushes the attr fork way over the size that can fit in the shortform literal area, and so it moves to leaf form as the attrs are initially added and the test fails. Fix this by forcing the test to use 512 byte inodes, so as to provide around 350 bytes of usable attr fork literal area so it's not affected by security attributes. While there, clean up the silly conditional loop device cleanup code. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Zorro Lang --- tests/xfs/148 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/xfs/148 b/tests/xfs/148 index 8d50a642..5d0a0bf4 100755 --- a/tests/xfs/148 +++ b/tests/xfs/148 @@ -15,7 +15,7 @@ _cleanup() { cd / $UMOUNT_PROG $mntpt > /dev/null 2>&1 - test -n "$loopdev" && _destroy_loop_device $loopdev > /dev/null 2>&1 + _destroy_loop_device $loopdev > /dev/null 2>&1 rm -r -f $tmp.* } @@ -41,9 +41,12 @@ test_names=("something" "$nullstr" "$slashstr" "another") rm -f $imgfile $imgfile.old # Format image file w/o crcs so we can sed the image file +# We need to use 512 byte inodes to ensure the attr forks remain in short form +# even when security xattrs are present so we are always doing name matches on +# lookup and not name hash compares as leaf/node forms will do. $XFS_IO_PROG -f -c 'truncate 40m' $imgfile loopdev=$(_create_loop_device $imgfile) -MKFS_OPTIONS="-m crc=0" _mkfs_dev $loopdev >> $seqres.full +MKFS_OPTIONS="-m crc=0 -i size=512" _mkfs_dev $loopdev >> $seqres.full # Mount image file mkdir -p $mntpt @@ -121,9 +124,6 @@ res=$? test $res -eq 1 || \ echo "repair failed to report corruption ($res)" -_destroy_loop_device $loopdev -loopdev= - # success, all done status=0 exit From patchwork Tue May 17 07:01:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12852000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73DDFC433FE for ; Tue, 17 May 2022 07:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240470AbiEQHCY (ORCPT ); Tue, 17 May 2022 03:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240474AbiEQHB3 (ORCPT ); Tue, 17 May 2022 03:01:29 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE66925C4E for ; Tue, 17 May 2022 00:01:20 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 39C0010E6984 for ; Tue, 17 May 2022 17:01:19 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy7B-CM for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005nkE-B7 for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 08/12] generic/081: don't run on DAX capable devices Date: Tue, 17 May 2022 17:01:07 +1000 Message-Id: <20220517070111.1381936-9-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=deDjYVbe c=1 sm=1 tr=0 ts=6283483f a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=ZX5orWydIAkmiaoJ8_sA:9 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner LVM/DM has conniptions when you try to use snapshots on a device that has DAX capability. It first sets up the underlying device as a DAX capable mapping (type 3 or DM_TYPE_DAX_BIO_BASED) but because snapshots require COW and shared mappings, it isn't supported on DAX capable devices. Hence creating the snapshot device fails because it requires a type 1 (DM_TYPE_BIO_BASED) device and DM can't change types on a loaded mapping. Hence we get this obscure error message in the log: device-mapper: ioctl: can't change device type (old=3 vs new=1) after initial table load. and these obscure, unhelpful error messages from the LVM command outputs: device-mapper: reload ioctl on (251:0) failed: Invalid argument Failed to suspend logical volume vg_081/base_081. Device vg_081-base_081-real (251:1) is used by another device. Failed to revert logical volume vg_081/base_081. Aborting. Manual intervention required. Failed to create snapshot How to turn off DAX capability is not documented in dmsetup or LVM man pages, nor is dax mentioned anywhere in Documentation/admin/device-mapper/ so I have no idea how to tell LVM/DM "don't try to enable DAX support!". As such, if the uderlying block device is dax capable, skip this test. Signed-off-by: Dave Chinner --- common/rc | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/common/rc b/common/rc index 4201a059..f5ead044 100644 --- a/common/rc +++ b/common/rc @@ -2167,7 +2167,7 @@ _require_sane_bdev_flush() # 3. "dax=inode" or nothing means "use scratch dev capability" to # determine whether DAX is going to be used. # -# Returns 0 if DAX will be used, 1 if DAX is not going to be used. +# Returns 0 if the filesytem will use DAX, 1 if it won't. __scratch_uses_fsdax() { local ops=$(_normalize_mount_options "$MOUNT_OPTIONS") @@ -2175,9 +2175,19 @@ __scratch_uses_fsdax() echo $ops | egrep -qw "dax(=always| |$)" && return 0 echo $ops | grep -qw "dax=never" && return 1 + return 0 +} + +# Determine if the scratch device is DAX capable. Every if the fs is not +# using DAX, we still can't use certain device mapper targets if the block +# device is DAX capable. hence the check needs to be separat from the FS +# capability. +__scratch_dev_has_dax() +{ local sysfs="/sys/block/$(_short_dev $SCRATCH_DEV)" test -e "${sysfs}/dax" && return 0 test "$(cat "${sysfs}/queue/dax" 2>/dev/null)" = "1" && return 0 + return 1 } @@ -2194,15 +2204,18 @@ _require_dm_target() _require_sane_bdev_flush $SCRATCH_DEV _require_command "$DMSETUP_PROG" dmsetup - if __scratch_uses_fsdax; then - case $target in - stripe|linear|log-writes) - ;; - *) - _notrun "Cannot run tests with DAX on $target devices." - ;; - esac - fi + case $target in + stripe|linear|log-writes) + ;; + *) + if __scratch_uses_fsdax; then + _notrun "Cannot run tests with fsdax on $target devices." + fi + if __scratch_dev_has_dax; then + _notrun "Cannot use $target devices on DAX capable block devices." + fi + ;; + esac modprobe dm-$target >/dev/null 2>&1 From patchwork Tue May 17 07:01:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Chinner X-Patchwork-Id: 12851966 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65AB5C4332F for ; Tue, 17 May 2022 07:01:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240697AbiEQHBc (ORCPT ); Tue, 17 May 2022 03:01:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240441AbiEQHB2 (ORCPT ); Tue, 17 May 2022 03:01:28 -0400 Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B6A2620BEF for ; Tue, 17 May 2022 00:01:20 -0700 (PDT) Received: from dread.disaster.area (pa49-181-2-147.pa.nsw.optusnet.com.au [49.181.2.147]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 1C5D352D830 for ; Tue, 17 May 2022 17:01:15 +1000 (AEST) Received: from discord.disaster.area ([192.168.253.110]) by dread.disaster.area with esmtp (Exim 4.92.3) (envelope-from ) id 1nqrCj-00Cy7T-JZ for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 Received: from dave by discord.disaster.area with local (Exim 4.95) (envelope-from ) id 1nqrCj-005nkZ-IK for fstests@vger.kernel.org; Tue, 17 May 2022 17:01:13 +1000 From: Dave Chinner To: fstests@vger.kernel.org Subject: [PATCH 12/12] xfs/191: remove broken test Date: Tue, 17 May 2022 17:01:11 +1000 Message-Id: <20220517070111.1381936-13-david@fromorbit.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220517070111.1381936-1-david@fromorbit.com> References: <20220517070111.1381936-1-david@fromorbit.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=deDjYVbe c=1 sm=1 tr=0 ts=6283483b a=ivVLWpVy4j68lT4lJFbQgw==:117 a=ivVLWpVy4j68lT4lJFbQgw==:17 a=oZkIemNP1mAA:10 a=20KFwNOVAAAA:8 a=s8yMT-HUfeyxIDQlTb4A:9 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Dave Chinner Test has been marked broken for a long time. Original intent of validating all mkfs.xfs input is not realistic, nobody is going to try to make that happen. Remove it as it serves no useful purpose except to have a whacky unique name that nobody expects or codes for. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong --- tests/xfs/191-input-validation | 324 ----------------------------- tests/xfs/191-input-validation.out | 2 - 2 files changed, 326 deletions(-) delete mode 100755 tests/xfs/191-input-validation delete mode 100644 tests/xfs/191-input-validation.out diff --git a/tests/xfs/191-input-validation b/tests/xfs/191-input-validation deleted file mode 100755 index 2728846e..00000000 --- a/tests/xfs/191-input-validation +++ /dev/null @@ -1,324 +0,0 @@ -#! /bin/bash -# SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2016 Red Hat, Inc. All Rights Reserved. -# -# FS QA Test No. xfs/191 -# -# mkfs.xfs input validation test. Designed to break mkfs.xfs if it doesn't -# filter garbage input or invalid option combinations correctly. -# -. ./common/preamble -_begin_fstest auto quick mkfs realtime - -# Override the default cleanup function. -_cleanup() -{ - cd / - rm -f $tmp.* - [ -n "$loopdev" ] && _destroy_loop_device $loopdev -} - -# Import common functions. -. ./common/filter - -# real QA test starts here - -# Modify as appropriate. -_supported_fs xfs -_require_test -_require_loop -_require_xfs_mkfs_validation - -echo silence is golden - -# clear out any options to mkfs first. We want to test realtime and external log -# devices if we can, but we also want to control them ourselves. -logdev=$SCRATCH_LOGDEV -rtdev=$SCRATCH_RTDEV - -MKFS_OPTIONS= -SCRATCH_LOGDEV= -SCRATCH_RTDEV= - -# limit the image size of the filesystem being created to something small -fssize=$((4 * 1024 * 1024 * 1024)) -logsize=$((4 * 1024 * 1024 * 100)) -fsimg=$TEST_DIR/$seq.img - -#create a loop device to test -loopimg=$TEST_DIR/$seq.loopimg -$XFS_IO_PROG -f -c "truncate $fssize" $loopimg -loopdev=$(_create_loop_device $loopimg) -SCRATCH_DEV=$loopdev - -do_mkfs_pass() -{ - echo >> $seqres.full - echo "pass expected $*" >> $seqres.full - $MKFS_XFS_PROG -f -N $* >> $seqres.full 2>&1 - [ $? -ne 0 ] && echo "fail $*" -} - -do_mkfs_fail() -{ - echo >> $seqres.full - echo "fail expected $*" >> $seqres.full - $MKFS_XFS_PROG -f -N $* >> $seqres.full 2>&1 - [ $? -eq 0 ] && echo "pass $*" -} - -reset_fsimg() -{ - rm -f $fsimg - $XFS_IO_PROG -f -c "truncate $fssize" $fsimg -} - -reset_fsimg - -do_mkfs_pass $SCRATCH_DEV - -# basic "should fail" options - -# specifying sector sizes in sectors or blocks or garbage -do_mkfs_fail -s size=2s $SCRATCH_DEV -do_mkfs_fail -d sectsize=2s $SCRATCH_DEV -do_mkfs_fail -l sectsize=2s $SCRATCH_DEV -do_mkfs_fail -s size=2b $SCRATCH_DEV -do_mkfs_fail -d sectsize=2b $SCRATCH_DEV -do_mkfs_fail -l sectsize=2b $SCRATCH_DEV - -do_mkfs_fail -s size=grot $SCRATCH_DEV -do_mkfs_fail -s size=2yerk $SCRATCH_DEV -do_mkfs_fail -d sectsize=blah $SCRATCH_DEV -do_mkfs_fail -d sectsize=2foo $SCRATCH_DEV -do_mkfs_fail -l sectsize=nggh $SCRATCH_DEV -do_mkfs_fail -l sectsize=2nggh $SCRATCH_DEV - -# conflicting sector/block sizes -do_mkfs_fail -s size=512 -d sectsize=1024 $SCRATCH_DEV -do_mkfs_fail -s size=512 -l sectsize=1024 $SCRATCH_DEV -do_mkfs_fail -d sectsize=2048 -l sectsize=1024 $SCRATCH_DEV - -do_mkfs_fail -b size=512 -s size=1024 $SCRATCH_DEV -do_mkfs_fail -b size=512 -d sectsize=1024 $SCRATCH_DEV -do_mkfs_fail -b size=512 -l sectsize=1024 $SCRATCH_DEV - -# specifying block sizes in sectors without specifying sector size -# or in blocks or garbage -do_mkfs_fail -b size=2s $SCRATCH_DEV -do_mkfs_fail -b size=2b $SCRATCH_DEV -do_mkfs_fail -b size=nfi $SCRATCH_DEV -do_mkfs_fail -b size=4096nfi $SCRATCH_DEV -do_mkfs_fail -n size=nfi $SCRATCH_DEV -do_mkfs_fail -n size=4096nfi $SCRATCH_DEV - -do_mkfs_pass -n size=2b $SCRATCH_DEV -do_mkfs_pass -n size=2b $SCRATCH_DEV - -# bad label length -do_mkfs_fail -L thisiswaytoolong $SCRATCH_DEV - -# basic "should pass" data section tests -do_mkfs_pass $SCRATCH_DEV -do_mkfs_pass -d name=$SCRATCH_DEV -do_mkfs_pass -d size=$fssize $SCRATCH_DEV -do_mkfs_pass -d agcount=32 $SCRATCH_DEV -do_mkfs_pass -d agsize=32m $SCRATCH_DEV -do_mkfs_pass -d agsize=32M $SCRATCH_DEV -do_mkfs_pass -d agsize=1g $SCRATCH_DEV -do_mkfs_pass -d agsize=$((32 * 1024 * 1024)) $SCRATCH_DEV -do_mkfs_pass -b size=4096 -d agsize=8192b $SCRATCH_DEV -do_mkfs_pass -d agsize=8192b $SCRATCH_DEV -do_mkfs_pass -d agsize=65536s $SCRATCH_DEV -do_mkfs_pass -d sectsize=512,agsize=65536s $SCRATCH_DEV -do_mkfs_pass -s size=512 -d agsize=65536s $SCRATCH_DEV -do_mkfs_pass -d noalign $SCRATCH_DEV -do_mkfs_pass -d sunit=0,swidth=0 $SCRATCH_DEV -do_mkfs_pass -d sunit=8,swidth=8 $SCRATCH_DEV -do_mkfs_pass -d sunit=8,swidth=64 $SCRATCH_DEV -do_mkfs_pass -d su=0,sw=0 $SCRATCH_DEV -do_mkfs_pass -d su=0,sw=64 $SCRATCH_DEV -do_mkfs_pass -d su=4096,sw=1 $SCRATCH_DEV -do_mkfs_pass -d su=4096s,sw=64 $SCRATCH_DEV -do_mkfs_pass -d su=4096b,sw=64 $SCRATCH_DEV -do_mkfs_pass -d su=4k,sw=1 $SCRATCH_DEV -do_mkfs_pass -d su=4K,sw=8 $SCRATCH_DEV -do_mkfs_pass -b size=4096 -d su=1b,sw=8 $SCRATCH_DEV -do_mkfs_pass -d sectsize=512,su=8s,sw=8 $SCRATCH_DEV -do_mkfs_pass -s size=512 -d su=8s,sw=8 $SCRATCH_DEV - -# invalid data section tests -do_mkfs_fail -d size=${fssize}b $SCRATCH_DEV -do_mkfs_fail -d size=${fssize}s $SCRATCH_DEV -do_mkfs_fail -d size=${fssize}yerk $SCRATCH_DEV -do_mkfs_fail -d agsize=32Mbsdfsdo $SCRATCH_DEV -do_mkfs_fail -d agsize=1GB $SCRATCH_DEV -do_mkfs_fail -d agcount=1k $SCRATCH_DEV -do_mkfs_fail -d agcount=6b $SCRATCH_DEV -do_mkfs_fail -d agcount=32,agsize=32m $SCRATCH_DEV -do_mkfs_fail -d sunit=0,swidth=64 $SCRATCH_DEV -do_mkfs_fail -d sunit=64,swidth=0 $SCRATCH_DEV -do_mkfs_fail -d sunit=64,swidth=64,noalign $SCRATCH_DEV -do_mkfs_fail -d sunit=64k,swidth=64 $SCRATCH_DEV -do_mkfs_fail -d sunit=64,swidth=64m $SCRATCH_DEV -do_mkfs_fail -d su=4096,sw=0 $SCRATCH_DEV -do_mkfs_fail -d su=4097,sw=1 $SCRATCH_DEV -do_mkfs_fail -d su=4096,sw=64,noalign $SCRATCH_DEV -do_mkfs_fail -d su=4096,sw=64s $SCRATCH_DEV -do_mkfs_fail -d su=4096garabge,sw=64 $SCRATCH_DEV -do_mkfs_fail -d su=4096,sw=64,sunit=64,swidth=64 $SCRATCH_DEV -do_mkfs_fail -d sectsize=10,agsize=65536s $SCRATCH_DEV -do_mkfs_fail -d sectsize=512s,agsize=65536s $SCRATCH_DEV - -reset_fsimg - -# file section, should pass -do_mkfs_pass $fsimg -do_mkfs_pass -d file=0 $SCRATCH_DEV -do_mkfs_pass -d size=$fssize,file=1,name=$fsimg -do_mkfs_pass -d size=$fssize,file $fsimg -do_mkfs_pass -d size=$fssize $fsimg -do_mkfs_pass -d size=$fssize,name=$fsimg -do_mkfs_pass -d size=$((fssize/2)) $fsimg -# again this one, to check that we didn't truncated the file -do_mkfs_pass -d size=$fssize $fsimg -rm -f $fsimg -do_mkfs_pass -d file,size=$fssize $fsimg - -reset_fsimg - -# file section, should fail -do_mkfs_fail -d file=1 $SCRATCH_DEV -do_mkfs_fail -d file $fsimg # no size given -rm -f $fsimg -do_mkfs_fail $fsimg -do_mkfs_fail -d size=$fssize $fsimg - -reset_fsimg - -# log section, should pass -do_mkfs_pass -l size=$logsize -d size=$fssize $SCRATCH_DEV -do_mkfs_pass -l agnum=2 $SCRATCH_DEV -do_mkfs_pass -l size=4096b $SCRATCH_DEV -do_mkfs_pass -l sectsize=512 $SCRATCH_DEV -do_mkfs_pass -l sunit=64 $SCRATCH_DEV -do_mkfs_pass -l sunit=64 -d sunit=8,swidth=8 $SCRATCH_DEV -do_mkfs_pass -l sunit=8 $SCRATCH_DEV -do_mkfs_pass -l su=$((4096*10)) $SCRATCH_DEV -do_mkfs_pass -l su=10b $SCRATCH_DEV -do_mkfs_pass -b size=4096 -l su=10b $SCRATCH_DEV -do_mkfs_pass -l sectsize=512,su=$((4096*10)) $SCRATCH_DEV -do_mkfs_pass -l internal $SCRATCH_DEV -$XFS_IO_PROG -f -c "truncate $logsize" $fsimg -do_mkfs_pass -l logdev=$fsimg $SCRATCH_DEV -do_mkfs_pass -l name=$fsimg $SCRATCH_DEV -do_mkfs_pass -l lazy-count=0 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -l lazy-count=1 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -l version=1 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -l version=2 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -l version=2 $SCRATCH_DEV - -# log section, should fail -do_mkfs_fail -l size=${fssize}b $SCRATCH_DEV -do_mkfs_fail -l size=${fssize}s $SCRATCH_DEV -do_mkfs_fail -l size=${fssize}yerk $SCRATCH_DEV -do_mkfs_fail -l agnum=1k $SCRATCH_DEV -do_mkfs_fail -l agnum=6b $SCRATCH_DEV -do_mkfs_fail -l agnum=32 $SCRATCH_DEV -do_mkfs_fail -l sunit=0 $SCRATCH_DEV -do_mkfs_fail -l sunit=63 $SCRATCH_DEV -do_mkfs_fail -l su=1 $SCRATCH_DEV -do_mkfs_fail -l su=10s $SCRATCH_DEV -do_mkfs_fail -l su=$((4096*10+1)) $SCRATCH_DEV -do_mkfs_fail -l sectsize=10,agsize=65536s $SCRATCH_DEV -do_mkfs_fail -l sectsize=512s,agsize=65536s $SCRATCH_DEV -do_mkfs_fail -l internal=0 $SCRATCH_DEV -reset_fsimg -do_mkfs_fail -l internal=1,logdev=$fsimg $SCRATCH_DEV -do_mkfs_fail -l lazy-count=1garbage $SCRATCH_DEV -do_mkfs_fail -l lazy-count=2 $SCRATCH_DEV -do_mkfs_fail -l lazy-count=0 -m crc=1 $SCRATCH_DEV -do_mkfs_fail -l version=1 -m crc=1 $SCRATCH_DEV -do_mkfs_fail -l version=0 $SCRATCH_DEV - -# naming section, should pass -do_mkfs_pass -n size=65536 $SCRATCH_DEV -do_mkfs_pass -n version=2 $SCRATCH_DEV -do_mkfs_pass -n version=ci $SCRATCH_DEV -do_mkfs_pass -n ftype=0 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -n ftype=1 $SCRATCH_DEV - -# naming section, should fail -do_mkfs_fail -n version=1 $SCRATCH_DEV -do_mkfs_fail -n version=cid $SCRATCH_DEV -do_mkfs_fail -n ftype=4 $SCRATCH_DEV -do_mkfs_fail -n ftype=0 $SCRATCH_DEV -do_mkfs_fail -n log=15 $SCRATCH_DE - -reset_fsimg - -# metadata section, should pass -do_mkfs_pass -m crc=1,finobt=1 $SCRATCH_DEV -do_mkfs_pass -m crc=1,finobt=0 $SCRATCH_DEV -do_mkfs_pass -m crc=0,finobt=0 $SCRATCH_DEV -do_mkfs_pass -m crc=1 -n ftype=1 $SCRATCH_DEV -do_mkfs_pass -m crc=0 -n ftype=1 $SCRATCH_DEV -do_mkfs_pass -m crc=0 -n ftype=0 $SCRATCH_DEV - -# metadata section, should fail -do_mkfs_fail -m crc=0,finobt=1 $SCRATCH_DEV -do_mkfs_fail -m crc=1 -n ftype=0 $SCRATCH_DEV - -# realtime section, results depend on reflink -_scratch_mkfs_xfs_supported -m reflink=0 >/dev/null 2>&1 -if [ $? -eq 0 ]; then - do_mkfs_pass -m reflink=0 -r rtdev=$fsimg $SCRATCH_DEV - do_mkfs_pass -m reflink=0 -r size=65536,rtdev=$fsimg $SCRATCH_DEV - do_mkfs_fail -m reflink=1 -r rtdev=$fsimg $SCRATCH_DEV - do_mkfs_fail -m reflink=1 -r size=65536,rtdev=$fsimg $SCRATCH_DEV -else - do_mkfs_pass -r rtdev=$fsimg $SCRATCH_DEV - do_mkfs_pass -r size=65536,rtdev=$fsimg $SCRATCH_DEV -fi - -# realtime section, should pass -do_mkfs_pass -r extsize=4k $SCRATCH_DEV -do_mkfs_pass -r extsize=1G $SCRATCH_DEV -do_mkfs_pass -r noalign $SCRATCH_DEV - -# realtime section, should fail -do_mkfs_fail -r rtdev=$SCRATCH_DEV -do_mkfs_fail -r extsize=256 $SCRATCH_DEV -do_mkfs_fail -r extsize=2G $SCRATCH_DEV -do_mkfs_fail -r size=65536 $SCRATCH_DEV - -# inode section, should pass -do_mkfs_pass -i size=256 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -i size=512 $SCRATCH_DEV -do_mkfs_pass -i size=2048 $SCRATCH_DEV -do_mkfs_pass -i perblock=2 $SCRATCH_DEV -do_mkfs_pass -i maxpct=10 $SCRATCH_DEV -do_mkfs_pass -i maxpct=100 $SCRATCH_DEV -do_mkfs_pass -i maxpct=0 $SCRATCH_DEV -do_mkfs_pass -i align=0 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -i align=1 -m crc=1 $SCRATCH_DEV -do_mkfs_pass -i attr=1 -m crc=0 $SCRATCH_DEV -do_mkfs_pass -i attr=2 $SCRATCH_DEV -do_mkfs_pass -i projid32bit $SCRATCH_DEV -do_mkfs_pass -i sparse=0 $SCRATCH_DEV -do_mkfs_pass -i sparse -m crc $SCRATCH_DEV - -# inode section, should fail -do_mkfs_fail -i size=256 -m crc $SCRATCH_DEV -do_mkfs_fail -i size=128 $SCRATCH_DEV -do_mkfs_fail -i size=513 $SCRATCH_DEV -do_mkfs_fail -i size=4096 $SCRATCH_DEV -do_mkfs_fail -i maxpct=110 $SCRATCH_DEV -do_mkfs_fail -i align=2 $SCRATCH_DEV -do_mkfs_fail -i sparse -m crc=0 $SCRATCH_DEV -do_mkfs_fail -i align=0 -m crc=1 $SCRATCH_DEV -do_mkfs_fail -i attr=1 -m crc=1 $SCRATCH_DEV -do_mkfs_fail -i log=10 $SCRATCH_DEV - -status=0 -exit diff --git a/tests/xfs/191-input-validation.out b/tests/xfs/191-input-validation.out deleted file mode 100644 index 020bd625..00000000 --- a/tests/xfs/191-input-validation.out +++ /dev/null @@ -1,2 +0,0 @@ -QA output created by 191-input-validation -silence is golden