]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/{158,160}: split out v4 tests
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Apr 2024 07:40:45 +0000 (09:40 +0200)
committerZorro Lang <zlang@kernel.org>
Sat, 20 Apr 2024 14:40:48 +0000 (22:40 +0800)
Move the subtests that check we can't upgrade v4 file systems to a
separate test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/158
tests/xfs/158.out
tests/xfs/160
tests/xfs/160.out
tests/xfs/612 [new file with mode: 0755]
tests/xfs/612.out [new file with mode: 0644]

index 4440adf6ee5723f727ddb5da766b8a933f1057b0..9f03eb5286741801dbb72963f3dea3001a437795 100755 (executable)
@@ -23,11 +23,6 @@ _require_xfs_repair_upgrade inobtcount
 _scratch_mkfs -m crc=1,inobtcount=1,finobt=0 &> $seqres.full && \
        echo "Should not be able to format with inobtcount but not finobt."
 
-# Make sure we can't upgrade a V4 filesystem
-_scratch_mkfs -m crc=0,inobtcount=0,finobt=0 >> $seqres.full
-_scratch_xfs_admin -O inobtcount=1 2>> $seqres.full
-_check_scratch_xfs_features INOBTCNT
-
 # Make sure we can't upgrade a filesystem to inobtcount without finobt.
 _scratch_mkfs -m crc=1,inobtcount=0,finobt=0 >> $seqres.full
 _scratch_xfs_admin -O inobtcount=1 2>> $seqres.full
index 5461031a38d4e0f509f46c608c5a8294d7e9509c..3bc043e43485b264c073f2f89f631c78271a01d8 100644 (file)
@@ -1,8 +1,5 @@
 QA output created by 158
 Running xfs_repair to upgrade filesystem.
-Inode btree count feature only supported on V5 filesystems.
-FEATURES: INOBTCNT:NO
-Running xfs_repair to upgrade filesystem.
 Inode btree count feature requires free inode btree.
 FEATURES: INOBTCNT:NO
 Fail partway through upgrading
index 399fe4bcf9667ae369afb99b742330a372421795..d11eaba3c82cb76b2de3529eff31092e258b75c9 100755 (executable)
@@ -22,11 +22,6 @@ _require_xfs_repair_upgrade bigtime
 date --date='Jan 1 00:00:00 UTC 2040' > /dev/null 2>&1 || \
        _notrun "Userspace does not support dates past 2038."
 
-# Make sure we can't upgrade a V4 filesystem
-_scratch_mkfs -m crc=0 >> $seqres.full
-_scratch_xfs_admin -O bigtime=1 2>> $seqres.full
-_check_scratch_xfs_features BIGTIME
-
 # Make sure we're required to specify a feature status
 _scratch_mkfs -m crc=1,bigtime=0,inobtcount=0 >> $seqres.full
 _scratch_xfs_admin -O bigtime 2>> $seqres.full
index 58fdd68da584ce1efea85672be362db85114a58c..9a7647f25c6f121053ef8301f64638c9e4fc03bb 100644 (file)
@@ -1,8 +1,5 @@
 QA output created by 160
 Running xfs_repair to upgrade filesystem.
-Large timestamp feature only supported on V5 filesystems.
-FEATURES: BIGTIME:NO
-Running xfs_repair to upgrade filesystem.
 Running xfs_repair to upgrade filesystem.
 Adding inode btree counts to filesystem.
 Adding large timestamp support to filesystem.
diff --git a/tests/xfs/612 b/tests/xfs/612
new file mode 100755 (executable)
index 0000000..4ae4d39
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2021 Oracle.  All Rights Reserved.
+#
+# FS QA Test No. 612
+# 
+# Check that we can upgrade v5 only features on a v4 file system
+
+. ./common/preamble
+_begin_fstest auto quick
+
+# Import common functions.
+. ./common/filter
+
+# real QA test starts here
+_supported_fs xfs
+_require_scratch_xfs_inobtcount
+_require_command "$XFS_ADMIN_PROG" "xfs_admin"
+_require_xfs_repair_upgrade inobtcount
+
+# Make sure we can't upgrade to inobt on a V4 filesystem
+_scratch_mkfs -m crc=0,inobtcount=0,finobt=0 >> $seqres.full
+_scratch_xfs_admin -O inobtcount=1 2>> $seqres.full
+_check_scratch_xfs_features INOBTCNT
+
+# Make sure we can't upgrade to bigtim on a V4 filesystem
+_scratch_mkfs -m crc=0 >> $seqres.full
+_scratch_xfs_admin -O bigtime=1 2>> $seqres.full
+_check_scratch_xfs_features BIGTIME
+
+status=0
+exit
diff --git a/tests/xfs/612.out b/tests/xfs/612.out
new file mode 100644 (file)
index 0000000..6908c15
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 612
+Running xfs_repair to upgrade filesystem.
+Inode btree count feature only supported on V5 filesystems.
+FEATURES: INOBTCNT:NO
+Running xfs_repair to upgrade filesystem.
+Large timestamp feature only supported on V5 filesystems.
+FEATURES: BIGTIME:NO