summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-20generic/333 debuggeneric-333-debugKent Overstreet
2024-02-16Add ktest style markers for test starting and finishingKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-16Make bash shebang work on nixosKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-16generic/050: tweak for bcachefsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-16generic/275: Reserve more space on bcachefsKent Overstreet
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>
2024-02-16Ensure fuse filesystems unmount correctlyKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-02-16fixup! Disable a few tests on bcachefsKent Overstreet
2024-02-16Dump seqres.full on test failureKent Overstreet
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>
2024-02-16Make sure to pass -t $FSTYP to mountKent Overstreet
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>
2024-02-16Disable a few tests on bcachefsKent Overstreet
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.
2024-02-16generic/103: increase reserved bytes for bcachefsDan Robertson
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>
2024-02-16Add bcachefs/001 for pagecache_add lock deadlock torture testKent Overstreet
2024-02-16generic/{455,457,482}: make dmlogwrites tests work on bcachefsKent Overstreet
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>
2024-02-16check: Add -f: failfast modeKent Overstreet
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>
2024-02-16generic/042: pass -t to mountKent Overstreet
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>
2024-01-14generic: add test for custom crypto data unit sizev2024.01.14Eric Biggers
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>
2024-01-14common/encrypt: support custom data unit sizeEric Biggers
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>
2024-01-14common/rc: fix _require_xfs_io_command with digits in argumentEric Biggers
'_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>
2024-01-14fscrypt-crypt-util: rename block to data unitEric Biggers
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>
2024-01-14btrfs: test snapshotting a deleted subvolumeOmar Sandoval
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>
2024-01-14btrfs: add fstest for overwriting a file partially with RSTJohannes Thumshirn
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>
2024-01-14btrfs: add fstests to write 128k to a RST filesystemJohannes Thumshirn
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>
2024-01-14btrfs: add fstest for writing to a file at an offset with RSTJohannes Thumshirn
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>
2024-01-14btrfs: add fstest for 8k write spanning two stripes on raid-stripe-treeJohannes Thumshirn
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>
2024-01-14btrfs: add fstest for stripe-tree metadata with 4k writeJohannes Thumshirn
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>
2024-01-14common: add filter for btrfs raid-stripe dumpJohannes Thumshirn
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>
2024-01-14common: add _filter_trailing_whitespaceAnand Jain
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>
2024-01-14common: add _require_btrfs_free_space_treeJohannes Thumshirn
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>
2024-01-14common: add _require_btrfs_no_nodatacow helperJohannes Thumshirn
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>
2024-01-14fstests: doc: add new raid-stripe-tree groupJohannes Thumshirn
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>
2024-01-14overlay: create helper _overlay_scratch_mount_opts()Amir Goldstein
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>
2024-01-14generic/732: don't run it on NFSJeff Layton
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>
2024-01-14generic/465: don't run it on NFSJeff Layton
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>
2024-01-14generic/390: Fix test number in commentAndreas Gruenbacher
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>
2024-01-14xfs: Check correctness of metadump/mdrestore's ability to work with dirty logChandan Babu R
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>
2024-01-14xfs: Add support for testing metadump v2Chandan Babu R
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>
2024-01-14_scratch_xfs_mdrestore: Pass scratch log device when applicableChandan Babu R
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>
2024-01-14common/xfs: Add function to detect support for metadump v2Chandan Babu R
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>
2024-01-14common/xfs: Do not append -a and -o options to metadumpChandan Babu R
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>
2024-01-14xfs/506: call _require_scratch_xfs_scrubChristoph Hellwig
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>
2024-01-14xfs/262: call _require_scratch_xfs_scrubChristoph Hellwig
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>
2024-01-14xfs: add a _require_scratch_xfs_scrub helperChristoph Hellwig
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>
2024-01-14xfs: check that the mountpoint is actually mounted in _supports_xfs_scrubChristoph Hellwig
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>
2024-01-04README: add a missing necessary packageChung-Chiang Cheng
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>
2024-01-02btrfs/303: add git commit ID to _fixed_by_kernel_commitFilipe Manana
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>
2023-12-24fstests: btrfs: use proper filter for subvolume deletionv2023.12.25Naohiro Aota
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>
2023-12-24generic/650: add kernel commit idYang Xu
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>
2023-12-24fstests: filter.btrfs: update _filter_transaction_commit()Naohiro Aota
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>
2023-12-24_require_sparse_files: rewrite as a direct test instead of a black listAlexander Patrakov
_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>
2023-12-24overlay/081: fix test when running with index enabledAmir Goldstein
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>