summaryrefslogtreecommitdiff
path: root/tests/misc-tests
Commit message (Collapse)AuthorAge
* btrfs-progs: tests: change options to list all loop devicesDavid Sterba2016-11-23
| | | | | | | The option --list might not be available on older versions, the equvalent is --all. Discovered via failed travis build. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: use the root helper for various info retrieval commandsDavid Sterba2016-11-23
| | | | | | | The current user might not be able to peek into the loop files directly, use the helper. Discovered by running tests in travis. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add basic checks for bad stream on the receive sideDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add checking of send multiple clone source optionTsutomu Itoh2016-11-11
| | | | | | | | Sending stream size of clone-src(-c) option is checked. Fixed by "btrfs-progs: send: fix handling of -c option". Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: switch to dump- commands from inspectDavid Sterba2016-11-09
| | | | | | | The dump-super and debug-tree commands are replacements for the standalone tools. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 015-dump-super-garbageDavid Sterba2016-09-05
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: 006-image-on-missing-device: fix btrfs tool pathLuis Henriques2016-07-13
| | | | | | | | | | | | | | | | If btrfs isn't in the path, this test will fail with: [TEST/misc] 006-image-on-missing-device failed: btrfs fi show /dev/loop0 test failed for case 006-image-on-missing-device Makefile:226: recipe for target 'test-misc' failed make: *** [test-misc] Error 1 Fix the test script by adding $TOP to the path. Signed-off-by: Luis Henriques <henrix@camandro.org> [ updated to full command names ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: typo review of strings and commentsNicholas D Steeves2016-06-01
| | | | | Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add misc 014-filesystem-labelDavid Sterba2016-03-30
| | | | | | Test various label lengths on a mounted filesystem. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 013-subvolume-sync-crashDavid Sterba2016-03-17
| | | | | | | | Test for "btrfs-progs: subvol sync: fix memory corruption, undersized array", a lot of deleted subvolumes in the 'subvol sync' will not fit into the array, should result in a glibc report. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: misc-test: Add regression test for find-root gives empty resultQu Wenruo2016-02-26
| | | | | | | | | Add regression test for btrfs-find-root gives empty result even the fs is OK. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ enhanced test ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add missing prerequisitesDavid Sterba2016-01-12
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 011-delete-missing-deviceDavid Sterba2015-11-16
| | | | | | | Test for "btrfs-progs: allow device deletion using 'missing' keyword again". Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 010-convert-delete-ext2-subvolDavid Sterba2015-11-02
| | | | | | | | Testcase for "Btrfs-progs: fix btrfs-convert rollback to check ROOT_BACKREF", make sure we don't try a rollback if the ext2_subvol is half-deleted. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: misc tests: add 009-subvolume-sync-must-waitDavid Sterba2015-10-21
| | | | | | | Test to verify that subovolume sync waits until the subvolume is cleaned. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Introduce misc-tests/008-leaf-crossing-stripesZhao Lei2015-10-19
| | | | | | | | | | | | | | | | | | | | | To check is btrfs-convert create bad filesystem with leaf across stripes. It is happened in progs version <=v4.1.2, and fixed by patch titled: btrfs: convert: Avoid allocating metadata extent crossing stripe boundary which was merged in v4.2. Notice thar this testcase can not report error in old version of btrfs-progs, because "btrfs check" can't check this type of error in those version, but we have another testcase in fsck-tests, to check is "btrfs check" support this check. So, the above 2 testcase together can check leaf-crossing-stripes bug in all versions. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> [renamed and other minor changes] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Use mount_test_dev for misc-tests/007-subvolume-syncZhao Lei2015-09-01
| | | | | | | So this test can support both block device and loop device simply. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Introduce init_env to initialize common env variantZhao Lei2015-09-01
| | | | | | | | | | | | | | | | | | | | | | | For example, $TEST_DIR is common used in severial tests, and have duplicated code for initialize. These duplicated code not only benifits harddisk vendor, but have inconsistent details, as: convert-tests.sh: lack of mkdir fsck-tests/012-leaf-corruption/test.sh: unnecessary mkdir fsck-tests/013-extent-tree-rebuild/test.sh: unnecessary init misc-tests/XXX ... And severial error message: _fail "unable to create mount point on $TEST_MNT" _fail "failed to create mount point" ... This patch move initizlizaton of $TEST_DIR to common init_env(), to avoid above problem, and init_env() can be used to add more things in future. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Introduce subvolume sync testZhao Lei2015-08-31
| | | | | | | | | | | | Current code have following bug for subvolume sync: 1: If there are more than 1 subvolume to sync, the program will infinitely loop. 2: return !0 in exit This patch add misc-tests/007-subvolume-sync for above case. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests, verify that btrfs-image works on a missing deviceDavid Sterba2015-08-31
| | | | | | | | Create a 2 device raid1 filesystem, fill with some data, delete one device (the device node must not exist) and try to dump a filesystem image. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Introduce a misc test for thread conflict in btrfs-convertZhao Lei2015-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code of btrfs-convert have a bug of thread conflict, which caused invalid memory accessing between threads, and make program panic. This patch add a test item for above bug, as: # ./misc-tests.sh [TEST] 001-btrfstune-features [TEST] 002-uuid-rewrite [TEST] 003-zero-log [TEST] 004-convert-thread-conflict failed: btrfs-convert /root/btrfsprogs/tests/test.img test failed for case 004-convert-thread-conflict # # cat misc-tests-results.txt ... ############### btrfs-convert /root/btrfsprogs/tests/test.img trans 7 running 5 ctree.c:363: btrfs_cow_block: Assertion `1` failed. btrfs-convert(btrfs_cow_block+0x92)[0x40acaf] btrfs-convert(btrfs_search_slot+0x1cb)[0x40c50f] btrfs-convert(btrfs_csum_file_block+0x20f)[0x41d83a] btrfs-convert[0x43422d] btrfs-convert[0x4342cd] btrfs-convert[0x4345ca] btrfs-convert[0x434767] btrfs-convert[0x435770] btrfs-convert[0x439748] btrfs-convert(main+0x13f8)[0x43b09d] /lib64/libc.so.6(__libc_start_main+0xfd)[0x335e01ecdd] btrfs-convert[0x407649] create btrfs filesystem: blocksize: 4096 nodesize: 16384 features: extref, skinny-metadata (default) creating btrfs metadata. creating ext2fs image file. failed: btrfs-convert /root/btrfsprogs/tests/test.img test failed for case 004-convert-thread-conflict # Note that this bug is not happened every time, especilly in slow device as loop(slow cpu with fast block device is likely to trigger). I set loop count to 20 to make bug happened in 90% tests. Suggested-by: David Sterba <dsterba@suse.com> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Move code to create loop device to commonZhao Lei2015-08-31
| | | | | | | | This code block is used several tests, move it to ./common and add a helper. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: inspect: add command min-dev-sizeDavid Sterba2015-08-31
| | | | | | | | | | Previously in 'filesystem resize get_min_size', now 'inspect-internal min-dev-size'. We'd like to avoid cluttering the 'resize' syntax further. The test has been updated to exercise the new option. Signed-off-by: David Sterba <dsterba@suse.com>
* Btrfs-progs: add feature to get mininum size for resizing a fs/deviceFilipe Manana2015-08-31
| | | | | | | | | | | | | | | | | | | Currently there is not way for a user to know what is the minimum size a device of a btrfs filesystem can be resized to. Sometimes the value of total allocated space (sum of all allocated chunks/device extents), which can be parsed from 'btrfs filesystem show' and 'btrfs filesystem usage', works as the minimum size, but sometimes it does not, namely when device extents have to relocated to holes (unallocated space) within the new size of the device (the total allocated space sum). This change adds the ability to reliably compute such minimum value and extents 'btrfs filesystem resize' with the following syntax to get such value: btrfs filesystem resize [devid:]get_min_size Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: verify btrfstune output during uuid-rewriteDavid Sterba2015-06-18
| | | | | | | The 'Current fsid:' value does not match the real fsid. Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: add test for zero-logDavid Sterba2015-06-05
| | | | | | | | Simple test to verify that the log_root is reset after the command, but we yet need to provide a testing image with log_root set to something sensible or crafted images with borked log_root pointer. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: add misc tests for uuid rewriteDavid Sterba2015-06-03
| | | | | | Simple tests of the -u/-U options of btrfstune. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: btrfstune: add option to enable NO_HOLESDavid Sterba2015-06-03
| | | | | | New option -n to enable the NO_HOLES feature. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: add misc test for fs featuresDavid Sterba2015-06-02
A sample test for the misc-test category. Verify that btrfstune sets the requested fs features. Now implemented extrefs, skinny-metadata and seeding. Signed-off-by: David Sterba <dsterba@suse.cz>