Age | Commit message (Collapse) | Author |
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
bcachefs btree nodes default to 256k, therefore we need to reserve more
than 256k of space to ensure we can write.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
|
|
In ktest, we try to keep all essential information on test failure in a
single log file - dumping seqres.full to stdout will end up in that log
file.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
When running a kernel that supports other unrelated filesystems we can
get spurious errors without this.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
bcachefs extents are generally smaller on other filesystems due to
checksum granularity being the same as extent size, which breaks
assumptions made by a few tests. Ideally we'd like to get these working
on bcachefs, but for now we're just disabling them
generic/647 also doesn't really apply to bcachefs - bcachefs has
explicit locking between dio and buffered/mmapped IO, and the test then
fails because those IOs aren't done concurrently.
|
|
The bcachefs btree nodes are quite large. If we only reserve 512 bytes
we hit an intermittent failure where the fallocate that is intented to
fill the available space triggers a btree node split and the exente update
is interrupted. The retry of the extent update will fail because the
new amount of available space is less than that of the request.
Signed-off-by: Dan Robertson <dan@dlrobertson.com>
|
|
|
|
bcachefs has log structured btree nodes, in addition to a regular
journal, which means that unless we replay to markers in the log in the
same order that they happened and are careful to avoid writing in
between replaying to different events - we need to wipe and start fresh
each time.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
This adds a new flag to check which exits immediately after the first
test failure, so as to leave test/scratch devices untouched and make it
easier to debug rare test failures.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
When running a kernel with all filesystems enabled, we sometimes get
strange mount errors if we don't specify the filesystem type.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Add a test that verifies the on-disk format of encrypted files that use
a crypto data unit size that differs from the filesystem block size.
This tests the functionality that was introduced in Linux 6.7 by kernel
commit 5b1188847180 ("fscrypt: support crypto data unit size less than
filesystem block size").
This depends on the xfsprogs patch
"xfs_io/encrypt: support specifying crypto data unit size"
(https://lore.kernel.org/r/20231013062639.141468-1-ebiggers@kernel.org)
which adds the '-s' option to the set_encpolicy command of xfs_io.
As usual, the test skips itself when any prerequisite isn't met.
[zlang: add _wants_kernel_commit]
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Make _require_scratch_encryption() and
_require_encryption_policy_support() support the new '-s' option to
set_encpolicy to specify a custom value of log2_data_unit_size.
Likewise, make _verify_ciphertext_for_encryption_policy() accept an
argument "log2_dusize=*" to cause it to use the specified data unit size
for the test and verify that the file contents are encrypted as expected
for that data unit size.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
'_require_xfs_io_command set_encpolicy -s' does not work as expected
because the following in the output of 'xfs_io -c "help set_encpolicy"':
-s LOG2_DUSIZE -- log2 of data unit size
... does not match the regex:
"^ -s ([a-zA-Z_]+ )?--"
... because the 2 in the argument name LOG2_DUSIZE is not matched. Fix
the regex to support digits in the argument name.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Rename the --block-size option to --data-unit-size, and rename the
--block-number option to --data-unit-index.
This does not change any functionality, but this avoids confusion now
that the kernel supports the case where the crypto data unit size is not
the same as the filesystem block size. fscrypt-crypt-util cares about
the crypto data unit size, not the filesystem block size.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This is a regression test for patch "btrfs: don't abort filesystem when
attempting to snapshot deleted subvolume". Without the fix, the
filesystem goes read-only and prints a warning. With the fix, it should
fail gracefully with ENOENT.
Signed-off-by: Omar Sandoval <osandov@osandov.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a test writing 128k to an empty file with one stripe already
pre-filled on-disk. Then overwrite a portion of the file in the middle.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[Fixed the test statement and trailing white space in the .out file.]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a test writing 128k to a file on an empty filesystem formatted with a
raid-stripe-tree.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[Fixed the test statement and trailing white space in the .out file.]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a fstest writing 4k at offset 64k to a file with one RAID tripe
already pre-filled for a raid-stripe-tree formatted file system.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[Fixed the test statement and trailing white space in the .out file.]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a test-case writing 8k to a raid-stripe-tree formatted filesystem with
one stripe pre-filled to 60k so the 8k are split into a 4k write finishing
stripe 1 and a 4k write starting the next stripe.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[Fixed the test statement and trailing white space in the .out file.]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Test a simple 4k write on all RAID profiles currently supported with the
raid-stripe-tree.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[Fixed the test statement and trailing white space in the .out file.]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
[ add trailing whitespace and the version filter ]
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
The command 'btrfs inspect-internal dump-tree -t raid_stripe'
introduces trailing whitespace in its output.
Apply a filter to remove it. Used in btrfs/30[4-8][.out].
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a new test group for testing the raid-stripe-tree feature of btrfs
with fstests.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
The new overlayfs mount options lowerdir+,datadir+ don't fit well
into any of the existing _overlay_scratch_mount* helpers.
Add this new helper to reduce a common pattern of custom mount options.
Suggested-by: Zorro Lang <zlang@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This test sets up two independent superblocks with the same backend
server, and then does RENAMES of the same files in the two servers. This
is basically trying to simulate the case where two clients are competing
to rename files in the same directory on the same server.
This test would usually pass vs. an NFSv4 server that doesn't have
dfdd2630a7398 ("nfsd: fix change_info in NFSv4 RENAME replies"), because
the client would end up improperly invalidating the dcache for the whole
dir after most RENAMEs.
However, this test doesn't (and shouldn't) pass on NFS, because the
client has no idea that a rename has happened on the second mount. The
expected behavior for the NFS client is for it to use the cache timeouts
in this case, which is what it now does with the above server bug fixed.
Exempt NFS from running this test, since we don't expect it to pass.
Cc: Yongcheng Yang <yoyang@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This test kicks off a thread that issues a read against a file, while
writing to the file in 1M chunks. It expects that the reader will see
either the written data or a short read.
NFS allows DIO reads and writes to run in parallel. That means that it's
possible for them to race and the reader to see NULLs in the file if
things get reordered.
Just skip this test on NFS, since we can't guarantee that it will
reliably pass.
Cc: Anna Schumaker <anna@kernel.org>
Cc: Trond Myklebust <trondmy@hammerspace.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Link: https://lore.kernel.org/linux-nfs/2f7f6d4490ac08013ef78481ff5c7840f41b1bb4.camel@kernel.org/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Fix a comment in generic/390 to refer to the right test number.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Add a new test to verify if metadump/mdrestore are able to dump and restore
the contents of a dirty log.
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This commit adds the ability to test metadump v2 to existing metadump tests.
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Metadump v2 supports dumping contents of an external log device. This commit
modifies _scratch_xfs_mdrestore() and _xfs_mdrestore() to be able to restore
metadump files which contain data from external log devices.
The callers of _scratch_xfs_mdrestore() must set the value of $SCRATCH_LOGDEV
only when all of the following conditions are met:
1. Metadump is in v2 format.
2. Metadump has contents dumped from an external log device.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This commit defines a new function to help detect support for metadump v2.
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
xfs/253 requires the metadump to be obfuscated. However _xfs_metadump() would
append the '-o' option causing the metadump to be unobfuscated.
This commit fixes the bug by modifying _xfs_metadump() to no longer append any
metadump options. The direct/indirect callers of this function now pass the
required options explicitly.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Call _require_scratch_xfs_scrub so that the test is _notrun on kernels
without online scrub support.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Call _require_scratch_xfs_scrub so that the test is _notrun on kernels
without online scrub support.
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>
|
|
Add a helper to call _supports_xfs_scrub with $SCRATCH_MNT and
$SCRATCH_DEV.
[zlang: rename the _scratch_require_xxx to _require_scratch_xxx]
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>
|
|
Add a sanity check that the passed in mount point is actually mounted
to guard against actually calling _supports_xfs_scrub before
$SCRATCH_MNT is mounted.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
src/dbtest.c requires 'gdbm-ndbm.h' or 'ndbm.h', both of which are
supplied by 'libgdbm-compat-dev' in the latest Ubuntu LTS. However,
this package is not a dependency of the currently listed packages.
Therefore, add it explicitly to the necessary packages list.
$ dpkg -L libgdbm-compat-dev
/.
/usr
/usr/include
/usr/include/dbm.h
/usr/include/gdbm-ndbm.h
/usr/include/ndbm.h
Signed-off-by: Chung-Chiang Cheng <cccheng@synology.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
The kernel patch for this test was merged into 6.7-rc4, so replace the
"xxxxxxxxxxxx" stub with the commit id.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Test cases btrfs/208, 233, 276 does not use _filter_btrfs_subvol_delete()
to process "btrfs subvolume delete" command's output. So, the following
diff occurs even with a previous fix.
btrfs/208 - output mismatch (see /host/btrfs/208.out.bad)
--- tests/btrfs/208.out 2023-12-22 02:09:18.000000000 +0000
+++ /host/btrfs/208.out.bad 2023-12-22 02:21:40.697036486 +0000
@@ -6,12 +6,12 @@
subvol1
subvol2
subvol3
-Delete subvolume (no-commit): 'SCRATCH_MNT/subvol1'
+Delete subvolume 256 (no-commit): 'SCRATCH_MNT/subvol1'
After deleting one subvolume:
subvol2
...
Let them use the filter and fix the output accordingly.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
This week, this case crashed when I test xfstests on xfs. Then, I found
this kernel patch to slove this problem, so add it.
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Recent btrfs-progs commit 5c91264d2dfc ("btrfs-progs: subvol delete:
print the id of the deleted subvolume") added the id of the deleted
subvolume to "Delete subvolume" print format.
As a result, btrfs/001 now always fail by the output difference.
- output mismatch (see /host/results/btrfs/001.out.bad)
--- tests/btrfs/001.out 2021-02-05 01:44:17.000000000 +0000
+++ /host/results/btrfs/001.out.bad 2023-12-15 01:43:07.000000000 +0000
@@ -33,7 +33,7 @@
Listing subvolumes
snap
subvol
-Delete subvolume 'SCRATCH_MNT/snap'
+Delete subvolume 256 (no-commit): 'SCRATCH_MNT/snap'
List root dir
subvol
...
Fix the issue by updating _filter_transaction_commit().
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
_require_sparse_files was implemented as a list of filesystems known not to
support sparse files, and therefore it missed some cases.
However, if sparse files do not work as expected during a test, the risk
is that the test will write out to the disk all the zeros that would
normally be unwritten. This amounts to at least 4 TB for the generic/129
test, and therefore there is a significant media wear-out concern here.
Adding more filesystems to the list of exclusions would not scale and
would not work anyway because CIFS backed by SAMBA is safe, while CIFS
backed by Windows Server 2022 is not (because the specific write
patterns found in generic/014 and generic/129 cause it to ignore the
otherwise-supported request to make a file sparse).
Mitigate this risk by rewriting the check as a small-scale test that
reliably triggers Windows misbehavior. The black list becomes unneeded
because the same test creates and detects non-sparse files on exfat and
hfsplus.
Signed-off-by: Alexander Patrakov <patrakov@gmail.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|
|
Test overlay/081 fails with:
CONFIG_OVERLAY_FS_INDEX=y
or
echo Y > /sys/modules/overlay/params/index
The reason is that mount option uuid=off has the undesired side effect
of disabling index feature.
uuid=null is exactly the same as uuid=off for the purpose of this test
but without the undesired side effect.
The test was created to test the new modes uuid=null/auto/on, so the
fact that is is testing the mode uuid=off is just an oversight.
Covert the use of uuid=off to uuid=null to fix this problem.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
|