]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: add a test to check that data growfs fails with internal rt device
authorChristoph Hellwig <hch@lst.de>
Thu, 8 May 2025 05:34:35 +0000 (07:34 +0200)
committerZorro Lang <zlang@kernel.org>
Thu, 8 May 2025 19:17:17 +0000 (03:17 +0800)
The internal RT device directly follows the data device on the same
block device.  This implies the data device can't be grown, and growfs
should handle this gracefully.

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

diff --git a/tests/xfs/637 b/tests/xfs/637
new file mode 100755 (executable)
index 0000000..92d727f
--- /dev/null
@@ -0,0 +1,24 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024 Christoph Hellwig.
+#
+# FS QA Test No. 637
+#
+# Check that trying to grow a data device followed by the internal RT device
+# fails gracefully with EINVAL.
+#
+. ./common/preamble
+_begin_fstest quick auto growfs ioctl zone
+
+_require_scratch
+_require_zoned_device $SCRATCH_DEV
+
+echo "Creating file system"
+_scratch_mkfs_xfs >>$seqres.full 2>&1
+_scratch_mount
+
+echo "Trying to grow file system (should fail)"
+$XFS_GROWFS_PROG -d $SCRATCH_MNT >>$seqres.full 2>&1
+
+status=0
+exit
diff --git a/tests/xfs/637.out b/tests/xfs/637.out
new file mode 100644 (file)
index 0000000..2dcf668
--- /dev/null
@@ -0,0 +1,3 @@
+QA output created by 637
+Creating file system
+Trying to grow file system (should fail)