summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
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>
2023-11-17misc: privatize the FIEXCHANGE ioctl for nowDarrick J. Wong
I'm abandoning (for now) efforts to bring atomic file content exchanges to the VFS. The goal here is to reduce friction in getting online fsck merged, so Dave and I want to take this back to being a private XFS ioctl so we can explore with it for a while before committing it to the stable KABI. Shift all the existing FIEXCHANGE usage to XFS_IOC_EXCHANGE_RANGE, and try to pick it up from xfs_fs_staging.h if the system xfslibs-dev package has such an animal. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-08-05fstests: add smoketest groupZorro Lang
Darrick suggests that fstests can provide a simple smoketest, by running several generic filesystem smoke testing for five minutes apiece (SOAK_DURATION="5m"). Since there are only five smoke tests, this is effectively a 20min super-quick test. With gcov enabled, running these tests yields about ~75% coverage for iomap and ~60% for xfs; or ~50% for ext4 and ~75% for ext4; and ~45% for btrfs. Coverage was about ~65% for the pagecache. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-12groups: add logical_resolve group for btrfsFilipe Manana
Add a 'logical_resolve' group to identify tests that use the btrfs logical-resolve command, which exercises btrfs' logical to ino ioctl. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-01misc: add duration for long soak testsDarrick J. Wong
Make it so that test runners can schedule long soak stress test programs for an exact number of seconds by setting the SOAK_DURATION config variable. Change the definition of the 'soak' test to specify that these tests can be controlled via SOAK_DURATION. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Andrey Albershteyn <aalbersh@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-01fstests: Doc changes for afsDavid Howells
Documentation changes for afs. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-afs@lists.infradead.org Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-01generic/123, generic/128, afs: Allow for an fs that does its own perm managementDavid Howells
The AFS filesystem has its own distributed permission management system that's based on a per-cell user and group database used in conjunction with ACLs. The user is determined by the authentication token acquired from the kaserver or Kerberos, not by the local fsuid/fsgid. For the most part, the uid, gid and mask on a file are ignored. The generic/123 and generic/128 tests check that the UNIX permission bits do what would normally be expected of them - but this fails on AFS. Using "su" to change the user is not effective on AFS. Instead, "keyctl session" would need to be used and an alternative authentication token would need to be obtained. Provide a "_require_unix_perm_checking" clause so that these tests can be suppressed in cases such as AFS. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-01generic/317, afs: Allow for a filesystem not to honour the local uid/gidDavid Howells
Each AFS cell has it's own set of user IDs that is uses internally, in its ACL system and in its protection management protocol. The user ID used by the fileserver is selected from the set belonging to the fileserver's cell according to the authentication token associated with an RPC operation - and this is set as a file's user ID when it is created. This means that tests that expect to set a UID and see the same UID still set afterwards will fail. Add a "_require_use_local_uidgid" clause to indicate that a test expects internal UID/GID information to be seen in the stat output and should be skipped if AFS's case. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-afs@lists.infradead.org Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-05-01generic/314, afs: Allow for a filesystem that doesn't honour SGID inheritanceDavid Howells
The AFS filesystem doesn't do any special handling for the SUID, SGID and SVTX bits and doesn't perform any sort of propagation. Further, only a user with cell admin rights can set non-0777 bits. Handle this by adding a "_require_sgid_inheritance" clause and labelling the test with it, thereby skipping for filesystems that don't support it. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> cc: linux-afs@lists.infradead.org Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-26report: encode the kernel log as a separate xml elementDarrick J. Wong
Record the .dmesg file in a new <kernel-log> element instead of multiplexing it with <system-err>. This means that the xml report can now capture kernel log and bad golden output. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-26report: record fstests start and report generation timestampsDarrick J. Wong
Report two new timestamps in the xml report: the time that ./check was started, and the time that the report was generated. We introduce new timestamps to minimize breakage with parsing scripts. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-26report: clarify the meaning of the timestamp attributeDarrick J. Wong
We've never specified what the timestamp attribute of the testsuite element actually means, and it history is rather murky. Prior to the introduction of the xml report format in commit f9fde7db2f, the "date_time" variable was used only to scrape dmesg via the /dev/kmsg device after each test. If /dev/kmsg was not a writable path, the variable was not set at all. In this case, the report timestamp would be blank. In commit ffdecf7498a1, Ted changed the xunit report code to handle empty date_time values by setting date_time to the time of report generation. This change was done to handle the case where no tests are run at all. However, it did not change the behavior that date_time is not set if /dev/kmsg is not writable. Clear up all this confusion by defining the timestamp attribute to reflect the start time of the most recent test, regardless of the state of /dev/kmsg. If no tests are run, then define the attribute to be the time of report generation. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-26report: capture the time zone in the test report timestampDarrick J. Wong
Make sure we put the time zone of the system running the test in the timestamp that is recorded in the xunit report. `date "+%F %T"' reports the local time zone, not UTC. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-26report: derive an xml schema for the xunit reportDarrick J. Wong
The "xunit" report format emits an XML document that more or less follows the junit xml schema. However, there are two major exceptions: 1. fstests does not emit an @errors attribute on the testsuite element because we don't have the concept of unanticipated errors such as "unchecked throwables". 2. The system-out/system-err elements sound like they belong under the testcase element, though the schema itself imprecisely says "while the test was executed". The schema puts them under the top-level testsuite element, but we put them under the testcase element. Define an xml schema for the xunit report format, and update the xml headers to link to the schema file. This enables consumers of the reports to check mechanically that the incoming document follows the format. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-03-02generic: test old xfs extent swapping ioctlDarrick J. Wong
Add some tests to check the operation of the old xfs swapext ioctl. There aren't any xfs-specific pieces in here, so they're in generic/ Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-02-25selftest: add tests for debugging testing setupLeah Rumancik
Many people have developed infrastructure around xfstests. In order to test a setup, it would be helpful to have dummy tests that have consistent test outcomes. Add a new test folder with the following tests: selftest/001 pass selftest/002 fail from output mismatch selftest/003 fail via _fail selftest/004 skip selftest/005 crash selftest/006 hang Also, create two new groups: 'selftest' which includes tests 001-004 and 'dangerous_selftest' which includes tests 005-006. The selftests will not run unless explicitly specified. Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-01-14fuzzy: enhance scrub stress testing to use fsxDarrick J. Wong
Add a couple of new online fsck stress tests that race fsx against online fsck. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2023-01-14xfs/422: create a new test group for fsstress/repair racersDarrick J. Wong
Create a new group for tests that race fsstress with online filesystem repair, and add this to the dangerous_online_repair group too. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2022-10-15fstests: add fiemap groupFilipe Manana
Add a fiemap group for all tests that exercise fiemap, either directly through xfs_io, or more indirectly like through filefrag or helpers in common/* (like _count_extents, _count_holes, etc). This is useful in order to quickly test changes made to the fiemap implementation of a filesystem for example. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
2022-05-22fstests: add a btrfs read_repair groupChristoph Hellwig
Add a new group to run all tests the exercise the btrfs read_repair code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2021-09-26tools: make sure that test groups are described in the documentationDarrick J. Wong
Create a file to document the purpose of each test group that is currently defined in fstests, and change mkgroupfile to check that every group mentioned in the tests is also mentioned in the documentation. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2019-06-16fstests: check for filesystem FS_IOC_FSSETXATTR supportAmir Goldstein
With "_require_xfs_io_command chattr <letter>", check that flag can be set/cleared using FS_IOC_FSSETXATTR ioctl, similar to "_require_chattr <letter>" and FS_IOC_SETFLAGS ioctl. Update the documentation and the tests that use "_require_xfs_io_command chattr" to test filesystem support and not only xfs_io support. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2017-11-26fstests: add fio perf results supportJosef Bacik
This patch does the nuts and bolts of grabbing fio results and storing them in a database in order to check against for future runs. This works by storing the results in resuts/fio-results.db as a sqlite database. The src/perf directory has all the supporting python code for parsing the fio json results, storing it in the database, and loading previous results from the database to compare with the current results. This also adds a PERF_CONFIGNAME option that must be set for this to work. Since we all have various ways we run fstests it doesn't make sense to compare different configurations with each other (unless specifically desired). The PERF_CONFIGNAME will allow us to separate out results for different test run configurations to make sure we're comparing results correctly. Currently we only check against the last perf result. In the future I will flesh this out to compare against the average of N number of runs to be a little more complete, and hopefully that will allow us to also watch latencies as well. [eguan: add required Makefile updates] Signed-off-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-09-09fstests: add support for working with dm-log-writes targetAmir Goldstein
Cherry-picked the relevant common bits from commit 70d41e17164b in Josef Bacik's fstests tree (https://github.com/josefbacik/fstests). Quoting from Josef's commit message: This patch adds the supporting code for using the dm-log-writes target. The dmlogwrites code is similar to the dmflakey code, it just gives us functions to build and tear down a dm-log-writes target. We add a new LOGWRITES_DEV variable to take in the device we will use as the log and add checks for that. [Amir:] - Removed unneeded _test_falloc_support - Moved _require_log_writes to dmlogwrites - Document _require_log_writes - Address review comments by Eryu Guan Cc: Josef Bacik <jbacik@fb.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-09-09log-writes: add replay-log program to replay dm-log-writes targetAmir Goldstein
Imported Josef Bacik's code from: https://github.com/josefbacik/log-writes.git Specialized program for replaying a write log that was recorded by device mapper log-writes target. The tools is used to perform crash consistency tests, allowing to run an arbitrary check tool (fsck) at specified checkpoints in the write log. [Amir:] - Add project Makefile and SOURCE files - Document the replay-log auxiliary program - Address review comments by Eryu Guan Cc: Josef Bacik <jbacik@fb.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-06-20generic: add a writeback error handling testJeff Layton
I'm working on a set of kernel patches to change how writeback errors are handled and reported in the kernel. Instead of reporting a writeback error to only the first fsync caller on the file, it has the the kernel report them once on every file description that was open at the time of the error. This patch adds a test for this new behavior. Basically, open many fds to the same file, turn on dm_error, write to each of the fds, and then fsync them all to ensure that they all get an error back. To do that, I'm adding a new tools/dmerror script that the C program can use to load the error table from the script. It's also suitable for setting up, frobbing and tearing down a dmerror device for by-hand testing. For now, only ext2/3/4 and xfs are whitelisted on this test, since those filesystems are included in the initial patchset. We can add to that as we convert filesystems, and eventually make it a more general test. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-05-12src/t_dir_type: support filtering by inode numberAmir Goldstein
usage: t_dir_type <dir> <inode number> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-04-21src/open_by_handle: flexible usage optionsAmir Goldstein
More usage options for testing open_by_handle, which are needed for testing stable handles across copy up in overlayfs. usage: open_by_handle [-c|-l|-u|-d] <test_dir> [num_files] Examples: 1. Create test set of N files and try to get their NFS handles: open_by_handle -c <test_dir> [N] This is used by new helper _require_exportfs() to check if filesystem supports exportfs 2. Get file handles for existing test set, drop caches and try to open all files by handle: open_by_handle <test_dir> [N] 3. Get file handles for existing test set, unlink all test files, drop caches, try to open all files by handle and expect ESTALE: open_by_handle -d <test_dir> [N] 4. Get file handles for existing test set, hardlink all test files, then unlink the original files, drop caches and try to open all files by handle (should work): open_by_handle -l <test_dir> [N] open_by_handle -u <test_dir> [N] This test is done with 2 invocations of the program, first to hardlink (-l) and then to unlink the originals (-u), because we would like to be able to perform the hardlinks on overlay lower layer and unlink on upper layer. NOTE that open_by_handle -u doesn't check if the files are hardlinked, it just assumes that they are. If they are not then the test will fail, because file handles would be stale. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-04-11generic: Check the stx_attributes settable by chattrDavid Howells
Check the stx_attributes that can be set by calling chattr. The script probes the filesystem with chattr to find out which of +a, +c, +d and +i are supported before testing combinations of attrs. Note that if a filesystem supports chattr with these, but doesn't paste the flag values into stx_attributes, the test will fail as there's no way to distinguish cleared from unset. Certain chattr flags are reflected in specific stx_attributes flags: chattr flag stx_attributes flag +a STATX_ATTR_APPEND +c STATX_ATTR_COMPRESSED +d STATX_ATTR_NODUMP +i STATX_ATTR_IMMUTABLE Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2017-04-11doc: Partially expand the documentationDavid Howells
Partially expand the documentation available in xfstests to include requirements checking and auxiliary programs for testing. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2012-12-12xfstests: update version and changelogv1.1.1linux-v3.7Ben Myers
Update the version and changelog for xfstests-1.1.1 release. Signed-off-by: Ben Myers <bpm@sgi.com> Reviewed-by: Nathan Scott <nathans@debian.org> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
2011-10-141.1.0 releasev1.1.0Alex Elder
Signed-off-by: Alex Elder <aelder@sgi.com>
2011-10-14xfstests: prepare for marking an initial versioned releaseAlex Elder
Add the release script used in the other XFS user space packages. The version is set to 1.1.0, to differentiate it from the 1.0.0 version that was recorded in the VERSION file. Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>