summaryrefslogtreecommitdiff
path: root/tests/btrfs/164
AgeCommit message (Collapse)Author
2023-12-09tests/btrfs: add tests to the remount groupAnand Jain
Several test cases under tests/btrfs are missing from the remount group. This patch adds the test cases that use -o remount to the remount group. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Zorro Lang <zlang@kernel.org>
2022-02-21tests/btrfs: use $AWK_PROG instead of awkLuis Chamberlain
Use $AWK_PROG instead of awk in case the default awk program is not called awk. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Adam Manzanares <a.manzanares@samsung.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-11-21btrfs: redirect 'btrfs device add' output to seqres.fullJosef Bacik
I updated btrfs-progs on all my test runners and started failing tests because I was getting the TRIM messages in the golden output. There were fixes that went in recently to properly detect TRIM support which resulted in extra messages being printed. Fix this by redirecting stdout to $seqres.full for all 'btrfs device add' calls. If anything fails we'll still pollute the output, but normal status messages will get properly eaten. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2021-11-07common/btrfs: source module file and remove duplicatesLuis Chamberlain
btrfs/249 fails with: QA output created by 249 ./common/btrfs: line 425: _require_loadable_fs_module: command not found ./common/btrfs: line 432: _reload_fs_module: command not found ERROR: not a btrfs filesystem: /media/scratch This is because the test is failing to source common/module. Fix this by sourcing common/module in the btrfs common file. While it it remove duplication of sourcing this file from other tests in btrfs so that this is only done once in one place. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
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-03-07btrfs: make sure we rescan all devices after unregisteringQu Wenruo
There are some btrfs test cases utilizing _btrfs_forget_or_module_reload() to unregister all btrfs devices. However _btrfs_forget_or_module_reload() will unregister all devices, meaning if TEST_DEV is part of a multi-device btrfs, after those test cases TEST_DEV will no longer be mountable. This patch will introduce a new function, btrfs_rescan_devices() to undo the unregister, so that all later test cases can mount TEST_DEV without any problem. Since we are here, also add a missing _require_btrfs_forget_or_module_loadable for btrfs/225. Reported-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.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>
2019-04-06btrfs: try use forget to unregister deviceAnand Jain
Some btrfs test cases use btrfs module-reload to unregister devices in the btrfs kernel. The problem with the module-reload approach is, if test system contains btrfs as rootfs, then you can't run these test cases. Patches [1] introduced btrfs forget feature which can unregister devices without the module-reload approach. [1] btrfs-progs: device scan: add new option to forget one or all scanned devices btrfs: introduce new ioctl to unregister a btrfs device And this patch makes relevant changes in the fstests to use this new feature, when available. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2018-06-09btrfs: convert tests to SPDX license tagsDave Chinner
Fully scripted conversion, see script in initial SPDX license commit message. Signed-off-by: Dave Chinner <dchinner@redhat.com>
2018-06-03btrfs: seed device delete testAnand Jain
Test case to verify that a seed device can be deleted Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>