FS/XFS testing framework
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Zorro Lang <zlang@kernel.org>
Cc: "Darrick J . Wong " <djwong@kernel.org>,
	linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: [PATCH 4/5] xfs/{158,160}: split out v4 tests
Date: Thu, 18 Apr 2024 09:40:45 +0200	[thread overview]
Message-ID: <20240418074046.2326450-5-hch@lst.de> (raw)
In-Reply-To: <20240418074046.2326450-1-hch@lst.de>

Move the subtests that check we can't upgrade v4 file systems to a
separate test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/158     |  5 -----
 tests/xfs/158.out |  3 ---
 tests/xfs/160     |  5 -----
 tests/xfs/160.out |  3 ---
 tests/xfs/612     | 32 ++++++++++++++++++++++++++++++++
 tests/xfs/612.out |  7 +++++++
 6 files changed, 39 insertions(+), 16 deletions(-)
 create mode 100755 tests/xfs/612
 create mode 100644 tests/xfs/612.out

diff --git a/tests/xfs/158 b/tests/xfs/158
index 4440adf6e..9f03eb528 100755
--- a/tests/xfs/158
+++ b/tests/xfs/158
@@ -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
diff --git a/tests/xfs/158.out b/tests/xfs/158.out
index 5461031a3..3bc043e43 100644
--- a/tests/xfs/158.out
+++ b/tests/xfs/158.out
@@ -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
diff --git a/tests/xfs/160 b/tests/xfs/160
index 399fe4bcf..d11eaba3c 100755
--- a/tests/xfs/160
+++ b/tests/xfs/160
@@ -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
diff --git a/tests/xfs/160.out b/tests/xfs/160.out
index 58fdd68da..9a7647f25 100644
--- a/tests/xfs/160.out
+++ b/tests/xfs/160.out
@@ -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
index 000000000..4ae4d3977
--- /dev/null
+++ b/tests/xfs/612
@@ -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
index 000000000..6908c15f8
--- /dev/null
+++ b/tests/xfs/612.out
@@ -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
-- 
2.39.2


  parent reply	other threads:[~2024-04-18  7:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  7:40 fix kernels without v5 support v2 Christoph Hellwig
2024-04-18  7:40 ` [PATCH 1/5] xfs/045: don't force v4 file systems Christoph Hellwig
2024-04-18 14:55   ` Darrick J. Wong
2024-04-18  7:40 ` [PATCH 2/5] xfs/263: split out the v4 test Christoph Hellwig
2024-04-18 14:55   ` Darrick J. Wong
2024-04-18  7:40 ` [PATCH 3/5] xfs/512: split out v4 specific tests Christoph Hellwig
2024-04-18 14:56   ` Darrick J. Wong
2024-04-18 15:00     ` Christoph Hellwig
2024-04-18  7:40 ` Christoph Hellwig [this message]
2024-04-18 15:00   ` [PATCH 4/5] xfs/{158,160}: split out v4 tests Darrick J. Wong
2024-04-18  7:40 ` [PATCH 5/5] xfs: don't run tests that require v4 file systems when not supported Christoph Hellwig
2024-04-18 15:02   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240418074046.2326450-5-hch@lst.de \
    --to=hch@lst.de \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox