summaryrefslogtreecommitdiff
path: root/tests/xfs/101
AgeCommit message (Collapse)Author
2022-10-30xfs: refactor filesystem directory block size extraction logicDarrick J. Wong
There are a lot of places where we open-code determining the directory block size for a specific filesystem. Refactor this into a single helper to clean up existing tests. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Zorro Lang <zlang@redhat.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2021-06-27fstests: move test group info to test filesDarrick J. Wong
Refactor every test in the entire test suite to use the new boilerplate functions. This also migrates all the test group information into the test files. This patch has been autogenerated via the command: ./tools/convert-group btrfs ceph cifs ext4 f2fs generic nfs ocfs2 overlay perf shared udf xfs Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Allison Henderson <allison.henderson@oracle.com> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-05-16xfs: fix old fuzz test invocations of xfs_repairDarrick J. Wong
Some of the older blocktrash-based fuzz tests cause the fs to go down due to the corrupted image and fail to remount. Offline repair fails because _repair_scratch_fs is the helper that is smart enough to call xfs_repair -L, not _scratch_xfs_repair. Fix these instances. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2020-09-21common: kill _supported_osDarrick J. Wong
fstests only supports Linux, so get rid of this unnecessary predicate. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-11-23xfs: Fix the situation that mount operation rejects corrupted XFSXiao Yang
On upstream kernel, running some tests which corrupt XFS on purpose got the mismatched output. e.g. running xfs/087: ------------------------------------------------ + check fs + corrupt image + mount image -+ modify files -broken: 1 + repair fs + mount image (2) ------------------------------------------------ It is reasonable for corrupted XFS to be caught and rejected by mount or read/write operation. Fixes: 0828657542ea ("xfs: fix blocktrash fuzzers") Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-06-09xfs: convert tests to SPDX license tagsDave Chinner
Fully scripted conversion, see script in initial SPDX license commit message. tests/xfs/044 was hand massaged to remove duplicate copyright and divider lines before running the script. Signed-off-by: Dave Chinner <dchinner@redhat.com>
2018-06-08xfs: abstract xfs_info into $XFS_INFO_PROGDarrick J. Wong
Abstract calls to xfs_info into $XFS_INFO_PROG like we do for all other xfs utilities. [Eryu: require xfs_info to be present if FSTYP is xfs] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-05-02xfs: fix blocktrash fuzzersDarrick J. Wong
The blocktrash fuzz tests for xfs will try to mount and write to the filesystem after corrupting it. However, the mount may not necessarily succeed, in which case we must not write junk to the root filesystem. Use the new _try_scratch_mount to guard against that. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2017-01-24populate: add _require_populate_commands to check for toolsDarrick J. Wong
Back when I created common/populate, I thought it was sufficient to _require the tools that the populate functions need in the main file. This turned out to be a bit sloppy, so move them into a helper function and call it from everything that uses populate. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-10-21xfs: remove the device parameter from __populate_check_xfs_dirXiao Yang
In commit c08ebd092 ("xfs: fix $XFS_DB_PROG usage"), the need for callers to pass the device to populate into __populate_check_xfs_dir() was removed. So we can now clean up all the callers by removing the device parameter. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-10-07xfs: fix $XFS_DB_PROG usageDarrick J. Wong
xfs_db requires us to pass in the log device, if any; this can be accomplished via _scratch_xfs_db_options (if we're operating on the scratch device, anyway). However, many of the tests/xfs/ scripts pass only $SCRATCH_DEV directly, so they'll fail if we test with an external log. Fix that by adding a new _scratch_xfs_db helper. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <eguan@redhat.com>
2016-04-05common: replace chattr with $CHATTR_PROGJosef Bacik
We have a wrapper around chattr to make sure people don't do the wrong thing on their boxes, so we need to be able to specify CHATTR_PROG and have it actually work, so replace all chattr calls with $CHATTR_PROG. Signed-off-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
2015-09-21xfs: test directory metadata corruption checking and repairDarrick J. Wong
Targeted fuzzing tests which destroy various pieces of directory metadata; the tests look for (a) kernel detection of corruption, (b) xfs_repair repair of said corruption, and (c) post-repair fs usability. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>