]> www.infradead.org Git - users/hch/xfstests-dev.git/log
users/hch/xfstests-dev.git
12 months agoxfs/444: fix agfl reset warning detection for small log buffers
Darrick J. Wong [Wed, 3 Jul 2024 21:36:05 +0000 (14:36 -0700)]
xfs/444: fix agfl reset warning detection for small log buffers

Collectively, the ten subtests in xfs/444 can generate a lot of kernel
log data.  If the amount of log data is enough to overflow the kernel
log buffers, the AGFL reset warning generated by fix_start and fix_wrap
might have been overwritten by subsequent log data.  Fix this by
checking for the reset warning after each test and only complaining if
at the end if we have /never/ seen the warning.

Found by running on a kernel configured with CONFIG_LOG_BUF_SHIFT=14
(16K).  This happened to be a Raspberry Pi, but in principle this can
happen to anyone.  I'd never noticed this before because x86 helpfully
sets it to 17 (128K) by default.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric: test creating and removing symlink xattrs
Darrick J. Wong [Thu, 20 Jun 2024 21:01:06 +0000 (14:01 -0700)]
generic: test creating and removing symlink xattrs

This began as a regression test for the issues identified in "xfs: allow
symlinks with short remote targets".  To summarize, the kernel XFS code
does not convert a remote symlink back to a shortform symlink after
deleting the attr fork.  Recent attempts to tighten validation have
flagged this incorrectly, so we need a regression test to focus on this
dusty corner of the codebase.

However, there's nothing in here that's xfs-specific so it's a generic
test.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")
Dave Chinner [Thu, 20 Jun 2024 21:00:50 +0000 (14:00 -0700)]
xfs/348: partially revert dbcc549317 ("xfs/348: golden output is not correct")

In kernel commit 1eb70f54c445f ("xfs: validate inode fork size against
fork format"), we incorrectly started flagging as corrupt symlinks with
short targets that would fit in the inode core but are remote.  The
kernel has historically written out symlinks this way and read them back
in, so we're fixing that.

The 1eb70 change came with change dbcc to fstests to adjust the golden
output; since we're adjusting the kernel back to old behavior, we need
to adjust the test too.

Fixes: dbcc549317 ("xfs/348: golden output is not correct")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/122: update for vectored scrub
Darrick J. Wong [Thu, 20 Jun 2024 21:00:35 +0000 (14:00 -0700)]
xfs/122: update for vectored scrub

Add the two new vectored scrub structures.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoscrub: test correction of directory tree corruptions
Darrick J. Wong [Thu, 20 Jun 2024 21:00:19 +0000 (14:00 -0700)]
scrub: test correction of directory tree corruptions

Make sure that we can fix directory tree loops and multiply-owned dirs.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agocommon/fuzzy: stress directory tree modifications with the dirtree tester
Darrick J. Wong [Thu, 20 Jun 2024 21:00:03 +0000 (14:00 -0700)]
common/fuzzy: stress directory tree modifications with the dirtree tester

Stress test the directory tree corruption detector by racing it with
fsstress.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs: add parent pointer inject test
Allison Henderson [Thu, 20 Jun 2024 20:59:48 +0000 (13:59 -0700)]
xfs: add parent pointer inject test

Add a test to verify parent pointers after an error injection and log
replay.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs: add multi link parent pointer test
Allison Henderson [Thu, 20 Jun 2024 20:59:32 +0000 (13:59 -0700)]
xfs: add multi link parent pointer test

Add a test to verify parent pointers while multiple links to a file are
created and removed.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs: add parent pointer test
Allison Henderson [Thu, 20 Jun 2024 20:59:16 +0000 (13:59 -0700)]
xfs: add parent pointer test

Add a test to verify basic parent pointers operations (create, move, link,
unlink, rename, overwrite).

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: test the xfs_io parent -p argument too]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agocommon: add helpers for parent pointer tests
Allison Henderson [Thu, 20 Jun 2024 20:59:01 +0000 (13:59 -0700)]
common: add helpers for parent pointer tests

Add helper functions in common/parent to parse and verify parent
pointers. Also add functions to check that mkfs, kernel, and xfs_io
support parent pointers.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
[djwong: add license and copyright, dont _fail tests immediately, make
 sure the pptr-generated paths match the dir-generated paths]
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/306: fix formatting failures with parent pointers
Darrick J. Wong [Thu, 20 Jun 2024 20:58:45 +0000 (13:58 -0700)]
xfs/306: fix formatting failures with parent pointers

The parent pointers feature isn't supported on tiny 20MB filesystems
because the larger directory transactions result in larger minimum log
sizes, particularly with nrext64 enabled:

** mkfs failed with extra mkfs options added to " -m rmapbt=0, -i nrext64=1, -n parent=1," by test 306 **
** attempting to mkfs using only test 306 options: -d size=20m -n size=64k **
max log size 5108 smaller than min log size 5310, filesystem is too small

We don't support 20M filesystems anymore, so bump the filesystem size up
to 100M and skip this test if we can't actually format the filesystem.
Convert the open-coded punch-alternating logic into a call to that
program to reduce execve overhead, which more than makes up having to
write 5x as much data to fragment the free space.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/{018,191,288}: disable parent pointers for these tests
Darrick J. Wong [Thu, 20 Jun 2024 20:58:29 +0000 (13:58 -0700)]
xfs/{018,191,288}: disable parent pointers for these tests

These tests depend heavily on the xattr formats created for new files.
Parent pointers break those assumptions, so force parent pointers off.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/021: adapt golden output files for parent pointers
Darrick J. Wong [Thu, 20 Jun 2024 20:58:13 +0000 (13:58 -0700)]
xfs/021: adapt golden output files for parent pointers

Parent pointers change the xattr structure dramatically, so fix this
test to handle them.  For the most part we can get away with filtering
out the parent pointer fields (which xfs_db decodes for us), but the
namelen/valuelen/attr_filter fields still show through.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agopopulate: create hardlinks for parent pointers
Darrick J. Wong [Thu, 20 Jun 2024 20:57:58 +0000 (13:57 -0700)]
populate: create hardlinks for parent pointers

Create some hardlinked files so that we can exercise parent pointers.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/122: update for parent pointers
Darrick J. Wong [Thu, 20 Jun 2024 20:57:42 +0000 (13:57 -0700)]
xfs/122: update for parent pointers

Update test for parent pointers.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/206: filter out the parent= status from mkfs
Darrick J. Wong [Thu, 20 Jun 2024 20:57:27 +0000 (13:57 -0700)]
xfs/206: filter out the parent= status from mkfs

Filter out the parent pointer bits from the mkfs output so that we don't
cause a regression in this test.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric: test recovery of extended attribute updates
Darrick J. Wong [Thu, 20 Jun 2024 20:57:11 +0000 (13:57 -0700)]
generic: test recovery of extended attribute updates

Fork generic/475 to test recovery of extended attribute modifications
and log recovery.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoexchangerange: make sure that we don't swap unwritten extents unless they're part...
Darrick J. Wong [Thu, 20 Jun 2024 20:56:55 +0000 (13:56 -0700)]
exchangerange: make sure that we don't swap unwritten extents unless they're part of a rt extent

By default, the FILE1_WRITTEN flag for the EXCHANGERANGE ioctl isn't
supposed to touch anything except for written extents.  In other words,
it shouldn't exchange delalloc reservations, unwritten preallocations,
or holes.  The XFS implementation flushes dirty pagecache to disk so
there should never be delalloc reservations running through the
exchangerange machinery, but there can be unwritten extents.

Hence, write a test to make sure that unwritten extents don't get moved
around.  This test opts itself out for realtime filesystems where the
allocation unit is larger than 1 fsblock because xfs has to move full
allocation units, and that requires exchanging of partially written rt
extents.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/206: screen out exchange-range from golden output
Darrick J. Wong [Thu, 20 Jun 2024 20:56:40 +0000 (13:56 -0700)]
xfs/206: screen out exchange-range from golden output

Fix this so that exchange-range doesn't trigger test failures.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/122: fix for exchrange conversion
Darrick J. Wong [Thu, 20 Jun 2024 20:56:24 +0000 (13:56 -0700)]
xfs/122: fix for exchrange conversion

Fix this test for the swapext -> exchrange conversion.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agosrc/fiexchange.h: update XFS_IOC_EXCHANGE_RANGE definitions
Darrick J. Wong [Thu, 20 Jun 2024 20:56:08 +0000 (13:56 -0700)]
src/fiexchange.h: update XFS_IOC_EXCHANGE_RANGE definitions

Update to use our new file content exchange ioctl definitions.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agomisc: flip HAVE_XFS_IOC_EXCHANGE_RANGE logic
Darrick J. Wong [Thu, 20 Jun 2024 20:55:53 +0000 (13:55 -0700)]
misc: flip HAVE_XFS_IOC_EXCHANGE_RANGE logic

We only need to include src/fiexchange.h if the system's xfslibs package
either doesn't define it or is so old that we want a newer definition.
Invert the logic so that we only use src/fiexchange if we need the
override.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoltp/{fsstress,fsx}: make the exchangerange naming consistent
Darrick J. Wong [Thu, 20 Jun 2024 20:55:37 +0000 (13:55 -0700)]
ltp/{fsstress,fsx}: make the exchangerange naming consistent

xchg_range/xchgrange -> exchangerange, since that's what the name has
become.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/717: remove obsolete check
Darrick J. Wong [Thu, 20 Jun 2024 20:55:21 +0000 (13:55 -0700)]
generic/717: remove obsolete check

The final version of the EXCHANGERANGE ioctl has dropped the flag that
enforced that the two files being operated upon were exactly the same
length as was specified in the ioctl parameters.  Remove this check
since it's now defunct.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/711,xfs/537: actually fork these tests for exchange-range
Darrick J. Wong [Thu, 20 Jun 2024 20:55:06 +0000 (13:55 -0700)]
generic/711,xfs/537: actually fork these tests for exchange-range

Fork g/711 to g/752, x/537 to x/615. These tests to check the same
things with exchange-range as they do for swapext, since the code
porting swapext to commit-range has been dropped.

I was going to fork xfs/789 as well, but it turns out that generic/714
covers this sufficiently so for that one, we just strike fiexchange
from the group tag.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/709,710: rework these for exchangerange vs. quota testing
Darrick J. Wong [Thu, 20 Jun 2024 20:54:50 +0000 (13:54 -0700)]
generic/709,710: rework these for exchangerange vs. quota testing

The exchange-range implementation is now completely separate from the
old swapext ioctl, so let's migrate these quota tests to exchangerange.

There's no point in maintaining these tests for the legacy swapext code
because it returns EINVAL if any quota is enabled and the two files have
different user/group/project ids.  Originally I had forward ported the
old swapext ioctl to use commitrange as its backend, but that will be
dropped in favor of porting xfs_fsr to use commitrange directly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agomisc: change xfs_io -c swapext to exchangerange
Darrick J. Wong [Thu, 20 Jun 2024 20:54:34 +0000 (13:54 -0700)]
misc: change xfs_io -c swapext to exchangerange

Update the swapext command to use exchangerange as part of severing the
connection between the two ioctls.

Flags changed:

-h (only exchange written extents) is now -w.

-a (atomic mode) is always enabled now.

-e (to eof) is now the default; -l (length) disables this flag.

-u (unconditonal swap) is inverted to -c (commit only if fresh).

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agomisc: split swapext and exchangerange
Darrick J. Wong [Thu, 20 Jun 2024 20:54:19 +0000 (13:54 -0700)]
misc: split swapext and exchangerange

These two commands (and the kernel implementations) are splitting, so we
need to split the xfs_io usage.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs: test scaling of the mkfs concurrency options
Darrick J. Wong [Thu, 20 Jun 2024 20:54:03 +0000 (13:54 -0700)]
xfs: test scaling of the mkfs concurrency options

Make sure that the AG count and log size scale up with the new
concurrency options to mkfs.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/574: test corruption at more offsets
Eric Biggers [Wed, 12 Jun 2024 03:53:34 +0000 (20:53 -0700)]
generic/574: test corruption at more offsets

Expand generic/574 to test for corruption in more different parts of the
file to try to exercise any hashing optimizations that might be used.

There is no existing bug that this finds.  This is just to prevent
future bugs, considering optimizations along the lines of
https://lore.kernel.org/fsverity/20240611034822.36603-7-ebiggers@kernel.org/

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/073: avoid large recursive diff
Christoph Hellwig [Thu, 20 Jun 2024 12:48:44 +0000 (14:48 +0200)]
xfs/073: avoid large recursive diff

xfs/073 has been failing for me for a while on most of my test setups
with:

diff: memory exhausted

from the large recursive diff it does.  Replace that with a pipe using
md5sum to reduce the memory usage.

Based on a snipplet from Darrick Wong.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofstests: add stress truncation + writeback test
Luis Chamberlain [Sat, 15 Jun 2024 00:29:34 +0000 (17:29 -0700)]
fstests: add stress truncation + writeback test

Stress test folio splits by using the new debugfs interface to a target
a new smaller folio order while triggering writeback at the same time.

This is known to only creates a crash with min order enabled, so for example
with a 16k block sized XFS test profile, an xarray fix for that is merged
already. This issue is fixed by kernel commit 2a0774c2886d ("XArray: set the
marks correctly when splitting an entry").

If inspecting more closely, you'll want to enable on your kernel boot:

dyndbg='file mm/huge_memory.c +p'

Since we want to race large folio splits we also augment the full test
output log $seqres.full with the test specific number of successful
splits from vmstat thp_split_page and thp_split_page_failed. The larger
the vmstat thp_split_page the more we stress test this path.

This test reproduces a really hard to reproduce crash immediately.

[zlang: add _require_debugfs into _require_split_huge_pages_knob]

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months ago_require_debugfs(): simplify and fix for debian
Luis Chamberlain [Sat, 15 Jun 2024 00:29:33 +0000 (17:29 -0700)]
_require_debugfs(): simplify and fix for debian

Using findmnt -S debugfs arguments does not really output anything on
debian, and is not needed, fix that.

Fixes: 8e8fb3da709e ("fstests: fix _require_debugfs and call it properly")
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofstests: add fsstress + compaction test
Luis Chamberlain [Sat, 15 Jun 2024 00:29:32 +0000 (17:29 -0700)]
fstests: add fsstress + compaction test

Running compaction while we run fsstress can crash older kernels as per
korg#218227 [0], the fix for that [0] has been posted [1] that patch
was merged on v6.9-rc6 fixed by commit d99e3140a4d3 ("mm: turn
folio_test_hugetlb into a PageType"). This test reproduces that crash
right away.

But we have more work to do ...

Even on v6.10-rc2 where this kernel commit is already merged we can
still deadlock when running fsstress and at the same time triggering
compaction, this is a new issue being reported now through this patch,
but this patch also serves as a reproducer with a high confidence. At
least for XFS running this test ~ 44 times will deadlock.

If you enable CONFIG_PROVE_LOCKING with the defaults you will end up
with a complaint about increasing MAX_LOCKDEP_CHAIN_HLOCKS [1], if
you adjust that you then end up with a few soft lockup complaints and
some possible deadlock candidates to evaluate [2].

Provide a simple reproducer and pave the way so we keep on testing this.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=218227
[1] https://gist.github.com/mcgrof/824913b645892214effeb1631df75072
[2] https://gist.github.com/mcgrof/926e183d21c5c4c55d74ec90197bd77a

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofstests: add mmap page boundary tests
Luis Chamberlain [Sat, 15 Jun 2024 00:29:31 +0000 (17:29 -0700)]
fstests: add mmap page boundary tests

mmap() POSIX compliance says we should zero fill data beyond a file
size up to page boundary, and issue a SIGBUS if we go beyond. While fsx
helps us test zero-fill sometimes, fsstress also let's us sometimes test
for SIGBUS however that is based on a random value and its not likely we
always test it. Dedicate a specic test for this to make testing for
this specific situation and to easily expand on other corner cases.

The only filesystem currently known to fail is tmpfs with huge pages on
a 4k base page size system, on 64k base page size it does not fail.
The pending upstream patch "filemap: cap PTE range to be created to
allowed zero fill in folio_map_range()" fixes this issue for tmpfs on
4k base page size with huge pages and it also fixes it for LBS support.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agocommon: move mread() to generic helper _mread()
Luis Chamberlain [Sat, 15 Jun 2024 00:29:30 +0000 (17:29 -0700)]
common: move mread() to generic helper _mread()

We want a shared way to use mmap in a way that we can test
for the SIGBUS, provide a shared routine which other tests can
leverage.

Suggested-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/455: skip the test if the file system doesn't support journaling
Theodore Ts'o [Tue, 11 Jun 2024 22:26:59 +0000 (18:26 -0400)]
generic/455: skip the test if the file system doesn't support journaling

This test uses dm-log-writes to test power fail scenarios, so it won't
work if the file system doesn't support metadata journaling.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoext4/045: use the large_dir feature to fix test failures with a 1k block size
Theodore Ts'o [Tue, 11 Jun 2024 22:26:58 +0000 (18:26 -0400)]
ext4/045: use the large_dir feature to fix test failures with a 1k block size

If the file system has a 1k blocksize, this test will fail without the
large_dir file system, because the depth of the dir_index tree needs
to be greater than 2.  So enable the large_dir unconditionally, which
also gives us better test coverage of the large_dir code paths.

As a result of requiring large_dir, this test will get skipped if the
kernel is older than 4.13 --- which was released in 2017; and that
seems to be reasonable at this point.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoext4/059: disable block_validity checks when mounting a corrupted file system
Theodore Ts'o [Wed, 23 Aug 2023 14:56:21 +0000 (10:56 -0400)]
ext4/059: disable block_validity checks when mounting a corrupted file system

Kernels with the commit "ext4: add correct group descriptors and
reserved GDT blocks to system zone" will refuse to mount the corrupted
file system constructed by this test.  So in order to perform the
test, we need to disable the block_validity checks.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-and-tested-by: Baokun Li <libaokun1@huawei.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/74[3,8]: add git commit ID for the fixes
Filipe Manana [Mon, 17 Jun 2024 16:52:14 +0000 (17:52 +0100)]
generic/74[3,8]: add git commit ID for the fixes

The corresponding fixes landed in kernels 6.10-rc1 and 6.10-rc3, so update
the tests to point the commit IDs.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric: test Btrfs fsync vs. size-extending prealloc write crash
Omar Sandoval [Tue, 28 May 2024 17:13:14 +0000 (10:13 -0700)]
generic: test Btrfs fsync vs. size-extending prealloc write crash

This is a regression test for a Btrfs bug, but there's nothing
Btrfs-specific about it. Since it's a race, we just try to make the race
happen in a loop and pass if it doesn't crash after all of our attempts.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/077: ignore errors occurred while accessing the filler files
Luis Henriques (SUSE) [Wed, 5 Jun 2024 16:32:10 +0000 (17:32 +0100)]
generic/077: ignore errors occurred while accessing the filler files

When looking for data to fill in the filesystem, errors accessing files
may occur.  This will cause the test to fail as it'll show in the output
lines such as:

    du: cannot read directory '/usr/etc/sudoers.d': Permission denied

Ignoring these errors should be safe, so simply redirecting the stderr of
'du' to $seqres.full fixes it.  Unfortunately, this exposed a different
issue, which was the truncation of the $seqres.full file while copying files
into the filesystem.  This patch also fixes that.

Signed-off-by: "Luis Henriques (SUSE)" <luis.henriques@linux.dev>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofuzzy: test other dquot ids
Darrick J. Wong [Mon, 3 Jun 2024 20:12:58 +0000 (13:12 -0700)]
fuzzy: test other dquot ids

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofuzzy: allow FUZZ_REWRITE_DURATION to control fsstress runtime when fuzzing
Darrick J. Wong [Mon, 3 Jun 2024 20:12:42 +0000 (13:12 -0700)]
fuzzy: allow FUZZ_REWRITE_DURATION to control fsstress runtime when fuzzing

For each iteration of the fuzz test loop, we try to correct the problem,
and then we run fsstress on the (allegedly corrected) filesystem to
check that subsequent use of the filesystem won't crash the kernel or
panic.

Now that fsstress has a --duration switch, let's add a new config
variable that people can set to constrain the amount of time that a fuzz
test run takes.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agofuzzy: mask off a few more inode fields from the fuzz tests
Darrick J. Wong [Mon, 3 Jun 2024 20:12:27 +0000 (13:12 -0700)]
fuzzy: mask off a few more inode fields from the fuzz tests

XFS doesn't do any validation for filestreams, so don't waste time
fuzzing that.  Exclude the bigtime flag, since we already have inode
timestamps on the no-fuzz list.  Exclude the warning counters, since
they're defunct now.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agobtrfs/280: run defrag after creating file to get expected extent layout
Filipe Manana [Wed, 5 Jun 2024 11:26:20 +0000 (12:26 +0100)]
btrfs/280: run defrag after creating file to get expected extent layout

The test writes a 128M file and expects to end up with 1024 extents, each
with a size of 128K, which is the maximum size for compressed extents.
Generally this is what happens, but often it's possibly for writeback to
kick in while creating the file (due to memory pressure, or something
calling sync in parallel, etc) which may result in creating more and
smaller extents, which makes the test fail since its golden output
expects exactly 1024 extents with a size of 128K each.

So to work around run defrag after creating the file, which will ensure
we get only 128K extents in the file.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agobtrfs: fix raid-stripe-tree tests with non-experimental btrfs-progs build
Filipe Manana [Tue, 4 Jun 2024 12:14:48 +0000 (13:14 +0100)]
btrfs: fix raid-stripe-tree tests with non-experimental btrfs-progs build

When running the raid-stripe-tree tests with a btrfs-progs version that
was not configured with the experimental features, the tests fail because
they expect the dump tree commands to output the stored and calculated
checksums lines, which are enabled only for experimental builds.

Also, these lines exists only starting with btrfs-progs v5.17 (more
specifically since commit 1bb6fb896dfc ("btrfs-progs: btrfstune:
experimental, new option to switch csums")).

The tests fail like this on non-experimental btrfs-progs build:

   $ ./check btrfs/304
   FSTYP         -- btrfs
   PLATFORM      -- Linux/x86_64 debian0 6.9.0-btrfs-next-160+ #1 SMP PREEMPT_DYNAMIC Tue May 28 12:00:03 WEST 2024
   MKFS_OPTIONS  -- /dev/sdc
   MOUNT_OPTIONS -- /dev/sdc /home/fdmanana/btrfs-tests/scratch_1

   btrfs/304 1s ... - output mismatch (see /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad)
       --- tests/btrfs/304.out 2024-01-25 11:15:33.420769484 +0000
       +++ /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad 2024-06-04 12:55:04.289903124 +0100
       @@ -8,8 +8,6 @@
        raid stripe tree key (RAID_STRIPE_TREE ROOT_ITEM 0)
        leaf XXXXXXXXX items X free space XXXXX generation X owner RAID_STRIPE_TREE
        leaf XXXXXXXXX flags 0x1(WRITTEN) backref revision 1
       -checksum stored <CHECKSUM>
       -checksum calced <CHECKSUM>
        fs uuid <UUID>
        chunk uuid <UUID>
      ...
      (Run 'diff -u /home/fdmanana/git/hub/xfstests/tests/btrfs/304.out /home/fdmanana/git/hub/xfstests/results//btrfs/304.out.bad'  to see the entire diff)
   Ran: btrfs/304
   Failures: btrfs/304
   Failed 1 of 1 tests

So update _filter_stripe_tree() to remove the checksum lines, since we
don't care about them, and change the golden output of the tests to not
expect those lines. This way the tests work with both experimental and
non-experimental btrfs-progs builds, as well as btrfs-progs versions below
v5.17.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/747: redirect mkfs stderr to seqres.full
Darrick J. Wong [Mon, 3 Jun 2024 20:12:11 +0000 (13:12 -0700)]
generic/747: redirect mkfs stderr to seqres.full

ext4 fails on this test with:

  --- /tmp/fstests/tests/generic/747.out 2024-05-13 06:05:59.727025928 -0700
  +++ /var/tmp/fstests/generic/747.out.bad 2024-05-21 18:34:51.836000000 -0700
  @@ -1,4 +1,5 @@
   QA output created by 747
  +mke2fs 1.47.2~WIP-2024-05-21 (21-May-2024)
   Starting fillup using direct IO
   Starting mixed write/delete test using direct IO
   Starting mixed write/delete test using buffered IO

The reason for this is that mke2fs annoyingly prints the program version
to stderr, which messes up the golden output.  Fix this by redirecting
stderr like all the othe tests, even though this doesn't seem like a
great solution...

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/008: use block size instead of the pagesize
Pankaj Raghav [Mon, 27 May 2024 11:48:34 +0000 (13:48 +0200)]
xfs/008: use block size instead of the pagesize

The testcase estimates to have ratio of 1:3/4 for holes:filesize. This
holds true where the blocksize is always less than or equal to pagesize
and the total size of the file is calculated based on the pagesize.
There is an implicit assumption that blocksize will always be less than
the pagesize.

LBS support will enable bs > ps where a minimum IO size is one block,
which can be greater than a page. Adjust the size calculation to be
based on the blocksize and not the pagesize.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/436: round up bufsz to nearest filesystem blksz
Pankaj Raghav [Mon, 27 May 2024 11:48:33 +0000 (13:48 +0200)]
generic/436: round up bufsz to nearest filesystem blksz

SEEK_HOLE and SEEK_DATA work in filesystem block size granularity. So
while filling up the buffer for test 13 - 16, round up the bufsz to the
closest filesystem blksz.

As we only allowed blocksizes lower than the pagesize, this was never an
issue and it always aligned. Once we have blocksize > pagesize, this
assumption will break.

Fixes the test for LBS configuration.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoxfs/161: adapt the test case for 64k FS blocksize
Pankaj Raghav [Mon, 27 May 2024 11:48:32 +0000 (13:48 +0200)]
xfs/161: adapt the test case for 64k FS blocksize

This test fails when xfs is formatted with 64k filesystem block size*.
It fails because the soft quota is not exceeded with the hardcoded 64k
pwrite, thereby, the grace time is not set. Even though soft quota is
set to 12k for uid1, it is rounded up to the nearest blocksize.

*** Report for user quotas on device /dev/sdb3
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
0        --       0       0       0      0       3     0     0      0
1        --      64      64    1024      0       1     0     0      0
2        --      64       0       0      0       1     0     0      0

Adapt the pwrite to do twice the FS block size and set the soft limit
to be 1 FS block and hard limit to be 100 FS blocks. This also gets rid
of harcoded quota limit values.

* This happens even on a 64k pagesize system and it is not related to
  LBS effort.

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agoRemove richacl support
David Sterba [Wed, 22 May 2024 17:30:48 +0000 (19:30 +0200)]
Remove richacl support

There's no support for richacl in Linux and based on information in the
links will never be. Remove all related files and support code.

References:
- https://wiki.samba.org/index.php/NFS4_ACL_overview#Linux
- https://lwn.net/Articles/661357/ (article, 2015)
- https://lwn.net/Articles/661078/ (patches, 2015)
- https://github.com/andreas-gruenbacher/richacl/
- http://www.bestbits.at/richacl/ (n/a anymore)

Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agobtrfs/741: add commit ID in _fixed_by_kernel_commit
Anand Jain [Fri, 24 May 2024 04:26:59 +0000 (12:26 +0800)]
btrfs/741: add commit ID in _fixed_by_kernel_commit

Now that the kernel patch is merged in v6.9, replace the placeholder with
the actual commit ID.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months ago_test_mkfs: Include external log device (if any) when creating fs on TEST_DEV
Chandan Babu R [Fri, 24 May 2024 07:31:01 +0000 (13:01 +0530)]
_test_mkfs: Include external log device (if any) when creating fs on TEST_DEV

Test execution fails when testing XFS with external log device and when
RECREATE_TEST_DEV is set to true. This is because _test_mkfs() is invoked as
part of recreating the filesystem on test device and this function does not
include the external log device as part of the mkfs.xfs command line.

_test_mount() invoked later fails since it passes an external log device to
the mount syscall which the kernel does not expect to find.

To fix this bug, this commit modifies _test_mkfs() to invoke _test_options()
in order to compute the value of TEST_OPTIONS and includes the resulting value
in the mkfs.xfs command line.

Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agocheck: log kernel version in check.log
Carlos Maiolino [Wed, 22 May 2024 11:33:38 +0000 (13:33 +0200)]
check: log kernel version in check.log

After collecting several xfstests runs, it's useful to keep track on
which kernel a specific run happened.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/733: add commit ID for btrfs
Filipe Manana [Tue, 21 May 2024 12:01:29 +0000 (13:01 +0100)]
generic/733: add commit ID for btrfs

As of commit 5d6f0e9890ed ("btrfs: stop locking the source extent range
during reflink"), btrfs now does reflink operations without locking the
source file's range, allowing concurrent reads in the whole source file.
So update the test to annotate that commit.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
13 months agogeneric/742: require FIEMAP support
Chen Hanxiao [Wed, 15 May 2024 09:21:33 +0000 (17:21 +0800)]
generic/742: require FIEMAP support

Some filesystems which don't support FIEMP fail on this test, e.g.
  FSTYP         -- nfs
  PLATFORM      -- xxxxxxxx
  MKFS_OPTIONS  -- xxxx-xxx-xxx:/mnt/xfstests/scratch/nfs-server
  MOUNT_OPTIONS -- -o vers=4.2 -o context=system_u:object_r:root_t:s0 xxxx-xxx-xxx:/mnt/xfstests/scratch/nfs-server /mnt/xfstests/scratch/nfs-client

  generic/742       [failed, exit status 1]- output mismatch (see /var/lib/xfstests/results//generic/742.out.bad)
      --- tests/generic/742.out 2024-05-12 10:48:02.502761852 -0400
      +++ /var/lib/xfstests/results//generic/742.out.bad 2024-05-12 21:10:48.412498322 -0400
      @@ -1,2 +1,3 @@
       QA output created by 742
       Silence is golden
      +fiemap-fault: fiemap failed 95: Operation not supported

So _notrun if FIEMAP isn't supported by $FSTYP.

Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: mkfs the scratch device if we have missing profiles
Josef Bacik [Tue, 7 May 2024 20:08:53 +0000 (16:08 -0400)]
fstests: mkfs the scratch device if we have missing profiles

I have a btrfs config where I specifically exclude raid56 testing, and
this resulted in btrfs/011 failing with an inconsistent file system.
This happens because the last test we run does a btrfs device replace of
the $SCRATCH_DEV, leaving it with no valid file system.  We then skip
the remaining profiles and exit, but then we go to check the device on
$SCRATCH_DEV and it fails because there is no file system.

Fix this to re-make the scratch device if we skip any of the raid
profiles.  This only happens in the case of some idiot user configuring
their testing in a special way, in normal runs of this test we'll never
re-make the fs.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agofstests: btrfs/301: handle auto-removed qgroups
Qu Wenruo [Tue, 7 May 2024 07:06:06 +0000 (16:36 +0930)]
fstests: btrfs/301: handle auto-removed qgroups

There are always attempts to auto-remove empty qgroups after dropping a
subvolume.

For squota mode, not all qgroups can or should be dropped, as there are
common cases where the dropped subvolume are still referred by other
snapshots.
In that case, the numbers can only be freed when the last referencer
got dropped.

The latest kernel attempt would only try to drop empty qgroups for
squota mode.
But even with such safe change, the test case still needs to handle
auto-removed qgroups, by explicitly echoing "0", or later calculation
would break bash grammar.

This patch would add extra handling for such removed qgroups, to be
future proof for qgroup auto-removal behavior change.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agobtrfs/{140,141}: verify read-repair test data by md5sum
Josef Bacik [Thu, 16 May 2024 22:12:53 +0000 (00:12 +0200)]
btrfs/{140,141}: verify read-repair test data by md5sum

For validating that read repair works properly we corrupt one mirror and
then read back the physical location after we do a direct or buffered
read on the mounted file system and then unmount the file system.  The
golden output expects all a's, however with encryption this will
obviously not be the case.

However I still broke read repair, so these tests are quite valuable.
Fix them to dump the on disk values to a temporary file and then md5sum
the files, and then validate the md5sum to make sure the read repair
worked properly.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agogeneric/269: require no compression
Josef Bacik [Thu, 16 May 2024 22:12:48 +0000 (00:12 +0200)]
generic/269: require no compression

This is meant to test ENOSPC, but we're dd'ing /dev/zero, which won't
fill up anything with compression on.

Additionally we're killing dd and then immediately trying to unmount.
With compression we could have references to the inode being held by the
async compression workers, so sometimes this will fail with EBUSY on the
unmount.

A better test would be to use slightly compressible data; use _ddt.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ changed to use _ddt ]

14 months agogeneric/027: require no compression
Josef Bacik [Thu, 16 May 2024 22:12:42 +0000 (00:12 +0200)]
generic/027: require no compression

This test creates a small file and then a giant file and then tries to
create a bunch of small files in a loop to exercise ENOPSC.  The problem
is that with compression the giant file isn't actually giant, so it can
make this test take forever.  Simply disable it for compression.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agogeneric/352: require no compression
Josef Bacik [Thu, 16 May 2024 22:12:39 +0000 (00:12 +0200)]
generic/352: require no compression

Our CI has been failing on this test for compression since 0fc226e7
("fstests: generic/352 should accomodate other pwrite behaviors").  This
is because we changed the size of the initial write down to 4k, and we
write a repeatable pattern.  With compression on btrfs this results in
an inline extent, and when you reflink an inline extent this just turns
it into full on copies instead of a reflink.

As this isn't a bug with compression, it's just not well aligned with
how compression interacts with the allocation of space, simply exclude
this test from running when you have compression enabled.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agogeneric: add gc stress test
Hans Holmberg [Mon, 15 Apr 2024 11:23:24 +0000 (11:23 +0000)]
generic: add gc stress test

This test stresses garbage collection for file systems by first filling
up a scratch mount to a specific usage point with files of random size,
then doing overwrites in parallel with deletes to fragment the backing
storage, forcing reclaim.

Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agocommon/tracing: use /sys/kernel/tracing at first
Zorro Lang [Fri, 10 May 2024 04:33:39 +0000 (12:33 +0800)]
common/tracing: use /sys/kernel/tracing at first

To avoid the dependence of debugfs, tracefs is mounted on another
place -- /sys/kernel/tracing now. But for the compatibility, the
/sys/kernel/debug/tracing is still there. So change _require_ftrace
helper, try to use the new /sys/kernel/tracing path at first, or
fallback to the old one if it's not supported.

xfs/499 uses ftrace, so call _require_ftrace in it.

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: fix _require_debugfs and call it properly
Zorro Lang [Fri, 10 May 2024 04:29:45 +0000 (12:29 +0800)]
fstests: fix _require_debugfs and call it properly

The old _require_debugfs helper doesn't work now, fix it to check
a system supports debugfs. And then call this helper in cases which
need $DEBUGFS_MNT.

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: remove the rest of shared
David Sterba [Tue, 7 May 2024 19:07:47 +0000 (21:07 +0200)]
fstests: remove the rest of shared

All tests from shared/ have been moved to generic/, remove the Makefile
and the reference from the 'check' scripts.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: move shared/298 to generic directory
David Sterba [Fri, 10 May 2024 03:43:45 +0000 (11:43 +0800)]
fstests: move shared/298 to generic directory

The shared/ directory was supposed to host tests that apply to a subset
of all supported filesystems but this is not utilized much and creates a
split from the generic tests. Move the test to generic.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: move shared/002 to generic directory
David Sterba [Fri, 10 May 2024 03:41:00 +0000 (11:41 +0800)]
fstests: move shared/002 to generic directory

The shared/ directory was supposed to host tests that apply to a subset
of all supported filesystems but this is not utilized much and creates a
split from the generic tests. Move the test to generic.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: move shared/032 to generic directory
David Sterba [Fri, 10 May 2024 03:36:29 +0000 (11:36 +0800)]
fstests: move shared/032 to generic directory

The shared/ directory was supposed to host tests that apply to a subset
of all supported filesystems but this is not utilized much and creates a
split from the generic tests. Move the test to generic.

Signed-off-by: David Sterba <dsterba@suse.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agogeneric/095: add to the quick group
Christoph Hellwig [Sat, 27 Apr 2024 07:55:30 +0000 (09:55 +0200)]
generic/095: add to the quick group

generic/095 doesn't take more than 4 seconds on any of my test setups,
but is exercises code that handles buffered write iterations interrupted
by concurrent direct I/O that no other test in the quick group does.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agoxfs/077: remove _require_meta_uuid
Christoph Hellwig [Mon, 29 Apr 2024 17:05:48 +0000 (19:05 +0200)]
xfs/077: remove _require_meta_uuid

_require_meta_uuid tries to check if the configuration supports the
metauuid feature.  It assumes a scratch fs has already been created,
which in the part was accidentally true to do a _require_xfs_crc call
that was removed in commit 39afc0aa237d ("xfs: remove support for tools
and kernels without v5 support").

As v5 file systems always support meta uuids, and xfs/077 forces a v5
file systems we can just remove the check.

Reported-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agotests: _fail on _scratch_mkfs_sized failure
David Disseldorp [Mon, 29 Apr 2024 15:37:52 +0000 (01:37 +1000)]
tests: _fail on _scratch_mkfs_sized failure

If _scratch_mkfs_sized() fails, e.g. due to an FS not supporting the
provided size, tests may subsequently mount and run atop a previously
created (e.g. non-size-bound) filesystem.
This can lead to difficult to debug failures, or for some -ENOSPC
exercising tests, near infinite runtimes. Avoid this by renaming the
current function to _try_scratch_mkfs_sized() and _fail in the parent
_scratch_mkfs_sized() wrapper.

[zlang: change _fail output, remove missed _fail in b/007, fix g/466]

Suggested-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agocommon/config: export TEST_DEV for mkfs.xfs
David Disseldorp [Thu, 11 Apr 2024 06:32:33 +0000 (16:32 +1000)]
common/config: export TEST_DEV for mkfs.xfs

As of xfsprogs commit 6e0ed3d1 ("mkfs: stop allowing tiny filesystems")
attempts to create XFS filesystems sized under 300M fail, unless
TEST_DIR, TEST_DEV and QA_CHECK_FS environment variables are exported
(or a --unsupported mkfs parameter is provided).

TEST_DIR and QA_CHECK_FS are already exported, while TEST_DEV may only
be locally set if provided via e.g. configs/$HOSTNAME.config. Explicitly
export TEST_DEV to ensure that tests which call _scratch_mkfs_sized()
with an fssize under 300M run normally.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: solve no-return-in-nonvoid-function issue
Yong Sun [Wed, 24 Apr 2024 11:24:08 +0000 (19:24 +0800)]
fstests: solve no-return-in-nonvoid-function issue

When build xfstests in some platform it will return
no-return-in-nonvoid-function error in dio-buf-fault.c:83 and
fake-dump-rootino.c:224, add return value to solve the issue.

Signed-off-by: Yong Sun <yosun@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agogeneric: move btrfs clone device testcase to the generic group
Anand Jain [Sat, 9 Mar 2024 06:45:24 +0000 (14:45 +0800)]
generic: move btrfs clone device testcase to the generic group

Given that ext4 also allows mounting of a cloned filesystem, the btrfs
test case btrfs/312, which assesses the functionality of cloned
filesystem support, can be refactored to be under the generic group.

So add _require_duplicated_fsid helper, then move btrfs/312 to generic.

[zlang: remove "quick" group, change the cleanup of g/744 a bit]

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agocommon/verity: fix btrfs-corrupt-block -v option
Anand Jain [Fri, 22 Mar 2024 06:32:15 +0000 (14:32 +0800)]
common/verity: fix btrfs-corrupt-block -v option

The btrfs-corrupt-block -v has been replaced with --value so fix it.

_fsv_scratch_corrupt_merkle_tree() uses the btrfs-corrupt-block
--value option, so add the "value" prerequisite in the function
_require_fsverity_corruption.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agobtrfs/290: fix btrfs_corrupt_block options
Anand Jain [Fri, 22 Mar 2024 06:22:57 +0000 (14:22 +0800)]
btrfs/290: fix btrfs_corrupt_block options

Checks if the running btrfs-corrupt-block also has the options value and
offset.

Remove btrfs-corrupt-block command's STDOUT and STDERR output redirection
to /dev/null. Without this, debugging wasn't possible. I also noticed that
command is quiet when successfull, so no redirect to $seqres.full is required.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agocommon/btrfs: refactor _require_btrfs_corrupt_block to check option
Anand Jain [Fri, 22 Mar 2024 07:05:46 +0000 (15:05 +0800)]
common/btrfs: refactor _require_btrfs_corrupt_block to check option

The -v and -o short options in btrfs-corrupt-block were introduced and
replaced with the long options --value and --offset in the same
btrfs-progs release 5.19 by the following commits:

  b2ada0594116 ("btrfs-progs: corrupt-block: corrupt generic item data")
  22ffee3c6cf2 ("btrfs-progs: corrupt-block: use only long options for value and offset")

We hope that if these commits are backported, they are both backported at
the same time.

Use only the long options of btrfs-corrupt-block in the test cases. Also,
check if btrfs-corrupt-block has the options --value and --offset.

[zlang: use -w option for grep, and remove "ret" local value]

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
14 months agofstests: btrfs: use _btrfs for 'subvolume snapshot' command
Qu Wenruo [Fri, 12 Apr 2024 04:41:17 +0000 (14:11 +0930)]
fstests: btrfs: use _btrfs for 'subvolume snapshot' command

[BUG]
All the touched test cases would fail after btrfs-progs commit
5f87b467a9e7 ("btrfs-progs: subvolume: output the prompt line only when
the ioctl succeeded") due to golden output mismatch.

[CAUSE]
Although the patch I sent to the mail list doesn't change the output at
all but only a timing change, David uses this patch to unify the output
of "btrfs subvolume create" and "btrfs subvolume snapshot".

Unfortunately this changes the output and causes mismatch with
golden output.

[FIX]
Just use the recommended way to run simple btrfs command, _btrfs, for
those all "btrfs subvolume snapshot" call sites, and remove the line
from golden output.

The only case not utilizing `_btrfs` is btrfs/300, which utilize
user_do(), which doesn't have the fstests functions.

The "_btrfs()" helper has the following advantages:

- Save the command line arguments and output into $seqres.full
  For easier debugging

- Check the return value of the btrfs command

This would ensure future informative output change would not trigger
such situation any more.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agofstests: btrfs: rename _run_btrfs_util_prog to _btrfs
Qu Wenruo [Fri, 12 Apr 2024 04:41:16 +0000 (14:11 +0930)]
fstests: btrfs: rename _run_btrfs_util_prog to _btrfs

For simple btrfs commands like "btrfs subvolume create", the output is
only informative, meanwhile the output format may still change in the
future.

Normally we already have quite some test cases just redirect the output
for null or seqres.full, without knowing we have a better suitable
function `_run_btrfs_util_prog()` already.

This patch firstly rename the function to a much shorter name `_btrfs`,
then move it to the top of `common/btrfs`, and add a comment
recommending to use it when possible.

The use of `_btrfs` mostly matches the real world usage of btrfs-progs
(just "btrfs" command), and no need to do any filtering or redirection,
and would be the recommended way for future test cases.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agobtrfs: remove useless comments
David Sterba [Tue, 9 Apr 2024 13:32:34 +0000 (15:32 +0200)]
btrfs: remove useless comments

Remove comments from the new test template that are not relevant once
the test case is written:

- commented out common.filters (no filters used)
- Import common functions.
- real QA test starts here
- Modify as appropriate.
- get standard environment, filters and checks

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agobtrfs/125 197 198: cleanup using SCRATCH_DEV_NAME
Anand Jain [Mon, 8 Apr 2024 20:50:32 +0000 (04:50 +0800)]
btrfs/125 197 198: cleanup using SCRATCH_DEV_NAME

Use SCRATCH_DEV_NAME[n] to provide the device path for each device from
the scratch device pool. Also, in btrfs/197, remove common/filter since
it calls common/filter.btrfs.

Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agofstests: update tests to skip unsupported raid profile types
Josef Bacik [Fri, 5 Apr 2024 19:56:14 +0000 (15:56 -0400)]
fstests: update tests to skip unsupported raid profile types

Tests btrfs/197, btrfs/198, and btrfs/297 test multiple raid types in
their workout() function.  We may not support some of the raid types, so
add a check in the workout() function to skip any incompatible raid
profiles.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agofstests: change how we test for supported raid configs
Josef Bacik [Fri, 5 Apr 2024 19:56:13 +0000 (15:56 -0400)]
fstests: change how we test for supported raid configs

In btrfs there's a few ways we limit the RAID profiles we'll use.  We
have the raid56 feature that can be compiled out, zoned devices don't
support certain raid configurations, and you can manually set
BTRFS_PROFILE_CONFIGS to limit what you're testing.

To handle all of these different scenarios in the same way, update
_btrfs_get_profile_configs() to check for RAID56 support and remove it
if it is not there, and then add _require_btrfs_raid_type and
_check_btrfs_raid_type to get all the settings and then check if the
requested raid type is available.

>From there I've updated all of the existing tests that use

_require_btrfs_fs_feature raid56

to use

_require_btrfs_raid_type <type>

where appropriate.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agofstests: change btrfs/197 and btrfs/198 golden output
Josef Bacik [Fri, 5 Apr 2024 19:56:12 +0000 (15:56 -0400)]
fstests: change btrfs/197 and btrfs/198 golden output

Both btrfs/197 and btrfs/198 check several raid types.  We may not have
support for raid5/6 for our available profiles, but we'd like to be able
to test the other profiles.  In order to enable this, update the golden
output to have no output, and simply have the test check for the device
we removed to see if it still exists in the device list output.  This
will allow us to add a check to skip unsupported raid configurations in
our config.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
14 months agobtrfs: new test for devt change between mounts
Boris Burkov [Mon, 11 Mar 2024 19:13:44 +0000 (12:13 -0700)]
btrfs: new test for devt change between mounts

It is possible to confuse the btrfs device cache (fs_devices) by
starting with a multi-device filesystem, then removing and re-adding a
device in a way which changes its dev_t while the filesystem is
unmounted. After this procedure, if we remount, then we are in a funny
state where struct btrfs_device's "devt" field does not match the bd_dev
of the "bdev" field. I would say this is bad enough, as we have violated
a pretty clear invariant.

But for style points, we can then remove the extra device from the fs,
making it a single device fs, which enables the "temp_fsid" feature,
which permits multiple separate mounts of different devices with the
same fsid. Since btrfs is confused and *thinks* there are different
devices (based on device->devt), it allows a second redundant mount of
the same device (not a bind mount!). This then allows us to corrupt the
original mount by doing stuff to the one that should be a bind mount.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ use _create_loop_device, renamed $MNT $BIND and rm them before mkdir ]
Signed-off-by: Zorro Lang <zlang@kernel.org>
[ update the commit id of _fixed_by_kernel_commit ]

15 months agoxfs: don't run tests that require v4 file systems when not supported
Christoph Hellwig [Thu, 18 Apr 2024 07:40:46 +0000 (09:40 +0200)]
xfs: don't run tests that require v4 file systems when not supported

Add a _require_xfs_nocrc helper that checks that we can mkfs and mount
a crc=0 file systems before running tests that rely on it to avoid failures
on kernels with CONFIG_XFS_SUPPORT_V4 disabled.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/{158,160}: split out v4 tests
Christoph Hellwig [Thu, 18 Apr 2024 07:40:45 +0000 (09:40 +0200)]
xfs/{158,160}: split out v4 tests

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

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/512: split out v4 specific tests
Christoph Hellwig [Thu, 18 Apr 2024 07:40:44 +0000 (09:40 +0200)]
xfs/512: split out v4 specific tests

Split the v4-specific tests into a new xfs/613.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/263: split out the v4 test
Christoph Hellwig [Thu, 18 Apr 2024 07:40:43 +0000 (09:40 +0200)]
xfs/263: split out the v4 test

Move the v4-specific test into a separate test case so that we can still
run the tests on a kernel without v4 support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/045: don't force v4 file systems
Christoph Hellwig [Thu, 18 Apr 2024 07:40:42 +0000 (09:40 +0200)]
xfs/045: don't force v4 file systems

xfs_db can change UUIDs on v5 filesystems now, so we don't need the
-mcrc=0 in this test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agocommon/quota: update keywords of quota feature in _require_prjquota() for f2fs
Chao Yu [Tue, 16 Apr 2024 10:16:50 +0000 (18:16 +0800)]
common/quota: update keywords of quota feature in _require_prjquota() for f2fs

Previously, in f2fs, sysfile quota feature has different name:
- "quota" in mkfs.f2fs
- and "quota_ino" in dump.f2fs

Now, it has unified the name to "quota" since commit 92cc5edeb7
("f2fs-tools: reuse feature_table to clean up print_sb_state()").

It needs to update keywords "quota" in _require_prjquota() for f2fs,
Otherwise, quota testcase will fail as below.

generic/383 1s ... [not run] quota sysfile not enabled in this device /dev/vdc

This patch keeps keywords "quota_ino" in _require_prjquota() to
keep compatibility for old f2fs-tools.

Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agogeneric/645: Add hint for expected failure with old kernel
Taylor Jackson [Wed, 17 Apr 2024 19:34:24 +0000 (19:34 +0000)]
generic/645: Add hint for expected failure with old kernel

The following hint is added to reflect that any old kernel
without kernel commit dacfd001eaf2 (“fs/mnt_idmapping.c: Return
-EINVAL when no map is written”) is expected to fail this generic
645 test since without that commit, mount_setattr won’t return
EINVAL when attempting to create an idmapped mount using a user
namespace with no mappings.

Reported-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Taylor Jackson <tjackson9431@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agogeneric/732: don't run it on overlayfs
Amir Goldstein [Wed, 17 Apr 2024 13:01:02 +0000 (16:01 +0300)]
generic/732: don't run it on overlayfs

The test tries to mount with same mount options on two different
mount points.

Overlayfs does not support doing that.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/522: use reflink instead of crc as test feature
Christoph Hellwig [Mon, 8 Apr 2024 13:32:42 +0000 (15:32 +0200)]
xfs/522: use reflink instead of crc as test feature

Replace crc as the main test feature with reflink so that this test
do not require v4 file system support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs/078: remove the 512 byte block size sub-case
Christoph Hellwig [Mon, 8 Apr 2024 13:32:40 +0000 (15:32 +0200)]
xfs/078: remove the 512 byte block size sub-case

512 byte block sizes are only supported for v4 file systems, and
xfs/078 crudely forces use of v4 file systems for it.  This doesn't
work if the kernel is built without v4 support.  Given that v4
support is slowly being phased out and 512 byte block sizes have never
been common, drop this part of the test.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoremove xfs/096
Christoph Hellwig [Mon, 8 Apr 2024 13:32:39 +0000 (15:32 +0200)]
remove xfs/096

This test exercises mkfs error handling before strict validation was added
and thus is useless for xfsprogs > 4.5.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoxfs: remove support for tools and kernels without v5 support
Christoph Hellwig [Mon, 8 Apr 2024 13:32:38 +0000 (15:32 +0200)]
xfs: remove support for tools and kernels without v5 support

v5 file systems have been the default for more than 10 years.  Drop
support for non-v5 enabled kernels and xfsprogs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
15 months agoext4/01{2,9}: fix invalid filesystem option 'journal'
Luis Henriques (SUSE) [Mon, 1 Apr 2024 09:57:08 +0000 (10:57 +0100)]
ext4/01{2,9}: fix invalid filesystem option 'journal'

Creating an ext4 filesystem using '-O journal' will fail with:

    Invalid filesystem option set: journal

Fix it by replacing it by '-O has_journal', which ensures the filesystem
(ext3 or ext4) is created with a journal.  While there, also redirect stderr
and stdout to the full log.

Signed-off-by: "Luis Henriques (SUSE)" <luis.henriques@linux.dev>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Zorro Lang <zlang@kernel.org>