Commit Graph

216 Commits

Author SHA1 Message Date
Gao Xiang 8cecbd6e7c xfs: stress test for shrinking free space in the last AG
This adds a stress testcase to shrink free space as much as
possible in the last AG with background fsstress workload.

The expectation is that no crash happens with expected output.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-16 23:16:56 +08:00
Gao Xiang ebc1ee176d xfs: basic functionality test for shrinking free space in the last AG
Add basic test to make sure the functionality works as expected.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-16 23:16:44 +08:00
Darrick J. Wong 4da76bfa4b xfs: test what happens when we reset the root dir and it has xattrs
Make sure that we can reset the root directory and the xattrs are erased
properly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-09 23:19:32 +08:00
Darrick J. Wong 9abb8f44ca xfs/419: remove irrelevant swapfile test
Since the advent of iomap_swapfile_activate in XFS, we actually /do/
support having swap files on the realtime device.  Remove this test.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-09 22:58:59 +08:00
Darrick J. Wong 2837d7c32d xfs: test upgrading filesystem to bigtime
Test that we can upgrade an existing filesystem to use bigtime.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>	(xfs/908 only)
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-09 22:37:50 +08:00
Darrick J. Wong 63b6a5644e xfs: detect time limits from filesystem
Teach fstests to extract timestamp limits of a filesystem using the new
xfs_db timelimit command.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-25 14:45:26 +08:00
Darrick J. Wong 7d20ed3e1f xfs: test inobtcount upgrade
Make sure we can actually upgrade filesystems to support inode btree
counters.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-25 14:27:28 +08:00
Darrick J. Wong 8fb042e54e xfs: functional testing of V5-relevant options
Currently, the only functional testing for xfs_admin is xfs/287, which
checks that one can add 32-bit project ids to a V4 filesystem.  This
obviously isn't an exhaustive test of all the CLI arguments, and
historically there have been xfs configurations that don't even work.

Therefore, introduce a couple of new tests -- one that will test the
simple options with the default configuration, and a second test that
steps a bit outside of the test run configuration to make sure that we
do the right thing for external devices.  The second test already caught
a nasty bug in xfsprogs 5.11.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-25 13:44:51 +08:00
Darrick J. Wong af7ac9448f xfs: test that the needsrepair feature works as advertised
Make sure that the needsrepair feature flag can be cleared only by
repair and that mounts are prohibited when the feature is set.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-25 13:41:18 +08:00
Christian Brauner c188f26b2b xfs: quotas on idmapped mounts
This is basically a re-implementation of xfs/050 but each file creation
call is done through an idmapped mount which verifies that the semantics
are identical even when the mount is idmapped.

Cc: Eryu Guan <guan@eryu.me>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: fstests@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-18 20:53:53 +08:00
Christian Brauner 8a0c1200c1 xfs: quotas and idmapped mounts
Test that xfs quota behave correctly on idmapped mounts.
Mount a scratch device with user and group quota support enabled. Create
directories "unmapped" and "idmapped". Create files in the unampped
mount and verify quota behavior. Create files through the idmapped mount
and verify identical behavior.

Cc: Eryu Guan <guan@eryu.me>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: fstests@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-04-18 20:53:53 +08:00
Darrick J. Wong 9c912ab71b xfs: test the xfs_db ls command
Make sure that the xfs_db ls command works the way the author thinks it
does.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-03-29 01:03:42 +08:00
Darrick J. Wong 7cf9f15eef xfs: test the xfs_db path command
Add a new test to make sure the xfs_db path command works the way the
author thinks it should.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-03-29 01:02:29 +08:00
Darrick J. Wong 4acd3ddd8e xfs: test rtalloc alignment and math errors
Add a couple of regression tests for "xfs: make sure the rt allocator
doesn't run off the end" and "xfs: ensure that fpunch, fcollapse, and
finsert operations are aligned to rt extent size".

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-03-28 23:26:11 +08:00
Pavel Reichl 973865af3c xfs: no excessive warnings about dprecated mount options on remount
Verify that warnings about deprecated mount options are properly
printed.

Verify that no excessive warnings are printed during remounts.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-03-28 22:17:02 +08:00
Chandan Babu R c68a8f5992 xfs: Stress test with bmap_alloc_minlen_extent error tag enabled
This commit adds a stress test that executes fsstress with
bmap_alloc_minlen_extent error tag enabled.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:52:50 +08:00
Chandan Babu R 200ee9e93b xfs: Check for extent overflow when swapping extents
This test verifies that XFS does not cause inode fork's extent count to
overflow when swapping forks across two files.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:51:59 +08:00
Chandan Babu R 3ab311f592 xfs: Check for extent overflow when remapping an extent
This test verifies that XFS does not cause inode fork's extent count to
overflow when remapping extents from one file's inode fork to another.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:51:17 +08:00
Chandan Babu R 7425ee44da xfs: Check for extent overflow when moving extent from cow to data fork
This test verifies that XFS does not cause inode fork's extent count to
overflow when writing to/funshare-ing a shared extent.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:50:41 +08:00
Chandan Babu R 490a8d56fb xfs: Check for extent overflow when writing to unwritten extent
This test verifies that XFS does not cause inode fork's extent count to
overflow when writing to an unwritten extent.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:50:00 +08:00
Chandan Babu R b721a21743 xfs: Check for extent overflow when adding/removing dir entries
This test verifies that XFS does not cause inode fork's extent count to
overflow when adding/removing directory entries.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:49:12 +08:00
Chandan Babu R 224a674587 xfs: Check for extent overflow when adding/removing xattrs
This test verifies that XFS does not cause inode fork's extent count to
overflow when adding/removing xattrs.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:48:17 +08:00
Chandan Babu R 9ffcdd4c78 xfs: Check for extent overflow when punching a hole
This test verifies that XFS does not cause inode fork's extent count to
overflow when punching out an extent.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:47:14 +08:00
Chandan Babu R d9d2de11ef xfs: Check for extent overflow when growing realtime bitmap/summary inodes
Verify that XFS does not cause realtime bitmap/summary inode fork's
extent count to overflow when growing the realtime volume associated
with a filesystem.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:45:56 +08:00
Chandan Babu R 9f8584434b xfs: Check for extent overflow when trivally adding a new extent
This test verifies that XFS does not cause inode fork's extent count to
overflow when adding a single extent while there's no possibility of splitting
an existing mapping.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Chandan Babu R <chandanrlinux@gmail.com>
2021-03-21 21:44:40 +08:00