[PATCH 04/15] xfs: add a test to check that data growfs fails with internal rt device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 tests/xfs/4204     | 33 +++++++++++++++++++++++++++++++++
 tests/xfs/4204.out |  3 +++
 2 files changed, 36 insertions(+)
 create mode 100755 tests/xfs/4204
 create mode 100644 tests/xfs/4204.out

diff --git a/tests/xfs/4204 b/tests/xfs/4204
new file mode 100755
index 000000000000..0b73cee23ba5
--- /dev/null
+++ b/tests/xfs/4204
@@ -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
index 000000000000..b3593cf60d16
--- /dev/null
+++ b/tests/xfs/4204.out
@@ -0,0 +1,3 @@
+QA output created by 4204
+Creating file system
+Trying to grow file system (should fail)
-- 
2.47.2





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux