]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs: add a test to check that data growfs fails with internal rt device
authorChristoph Hellwig <hch@lst.de>
Fri, 22 Nov 2024 06:30:14 +0000 (07:30 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 30 Jan 2025 05:52:05 +0000 (06:52 +0100)
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>
tests/xfs/4204 [new file with mode: 0755]
tests/xfs/4204.out [new file with mode: 0644]

diff --git a/tests/xfs/4204 b/tests/xfs/4204
new file mode 100755 (executable)
index 0000000..0b73cee
--- /dev/null
@@ -0,0 +1,33 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2024 Christoph Hellwig.
+#
+# FS QA Test No. 4204
+#
+# 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
+
+_cleanup()
+{
+       cd /
+       _scratch_unmount
+}
+
+# Import common functions.
+. ./common/filter
+
+_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/4204.out b/tests/xfs/4204.out
new file mode 100644 (file)
index 0000000..b3593cf
--- /dev/null
@@ -0,0 +1,3 @@
+QA output created by 4204
+Creating file system
+Trying to grow file system (should fail)