summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* 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: add fuzzed testing images, superblock and chunksLiu Bo2016-05-11
| | | | | | | | | | This adds 4 fuzz testing images, btrfsck either doesn't detect errors in them or crashes immediately. Reported-by: Vegard Nossum <vegard.nossum@oracle.com> Reported-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 002-balance-full-no-filtersDavid Sterba2016-05-02
| | | | | | Coverage of new balance option --full-balance. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for command line coverage testsDavid Sterba2016-05-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: update 001-basic-profiles, dup on multidev fsDavid Sterba2016-03-30
| | | | | | | Testcase for "btrfs-progs: mkfs: fix an error when using DUP on multidev fs" 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: introduce mustfail helperDavid Sterba2016-03-30
| | | | | | | Invalid syntax, expected failure on corrupted data etc. Failure is success. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enumerate RWX in convert testsDavid Sterba2016-03-18
| | | | | | Generating all valid combinations takes too much time. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: populate fs with small dataset for convert testsLakshmipathi.G2016-03-18
| | | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> [ minor tweaks ] 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: tests: add image for bko#96971 (bad checksum type)David Sterba2016-03-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix misc/005-long-device-name-for-ssdDavid Sterba2016-03-14
| | | | | | | | We use a device mapper device on top of a loop device, the change in rotational status does not always propagate if change it at the loop device sysfs node. 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: use common variables and helpersDavid Sterba2016-02-23
| | | | | | Use TEST_DEV and the associated helpers to manage the tested image. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: store checksums in /tmpDavid Sterba2016-02-23
| | | | | | We don't want to store the checksum on filesystem that we're converting. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: do checksum verification with convert-testsLakshmipathi.G2016-02-23
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> 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: test multiple-linked file corruptionNaohiro Aota2016-01-12
| | | | | | | | | This commit extends the leaf corruption test to try to repair a file linked from multiple directory. It stresses a case that some links to a file is broken but others kept valid. Signed-off-by: Naohiro Aota <naota@elisp.net> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: print test typeDavid Sterba2016-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | Makes it a bit more clear: [TEST/conv] ext4 32k nodesize, btrfs no-holes [TEST/conv] ext2 64k nodesize, btrfs no-holes [TEST/conv] ext3 64k nodesize, btrfs no-holes [TEST/conv] ext4 64k nodesize, btrfs no-holes [TEST] misc-tests.sh [TEST/misc] 001-btrfstune-features [TEST/misc] 002-uuid-rewrite [TEST/misc] 003-zero-log [TEST/misc] 004-shrink-fs [TEST/misc] 005-convert-progress-thread-crash [TEST/misc] 006-image-on-missing-device [TEST/misc] 007-subvolume-sync [TEST/misc] 008-leaf-crossing-stripes [TEST/misc] 009-subvolume-sync-must-wait [TEST/misc] 010-convert-delete-ext2-subvol [TEST/misc] 011-delete-missing-device [TEST] fuzz-tests.sh [TEST/fuzz] 001-simple-unmounted Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add sys-array-num-stripes-0.raw.xzDavid Sterba2016-01-04
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: mkfs, check sectorsize and nodesize combinationsQu Wenruo2016-01-04
| | | | | | | | | Add mkfs selftest for invalid and valid sectorsize/nodesize combinations. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ switched to TEST_DEV ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance 001-basic-profiles with --data DUPDavid Sterba2015-11-26
| | | | | | Add the remaining valid combinations. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 019-non-skinny-false-alertDavid Sterba2015-11-26
| | | | | | | Catch a buggy condition fixed by "btrfs-progs: fsck: Fix a false alert where extent record has wrong metadata flag" Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 007-mix-nodesize-sectorsizeDavid Sterba2015-11-19
| | | | | | Test combinations of sectorsize and nodesize on a single device. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 006-partitioned-loopdevDavid Sterba2015-11-16
| | | | | | | Create filesystem on a partitioned loop device, test for "btrfs-progs: Fix partitioned loop devices resolving". Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 005-long-device-name-for-ssdDavid Sterba2015-11-16
| | | | | | | | A test for "btrfs-progs: mkfs: increase buffer size in is_ssd". Create a device with a long name through loop device wrapped to a device mapper linear device, switch it to the "ssd" mode status. 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: mkfs: do not truncate the image when --rootdir is setDavid Sterba2015-11-05
| | | | | | | | | | | | | | With the rootdir option we try to guess the final size of the image and fill it with zeros, preceded by truncation. After patch "Btrfs-progs: Do not force mixed block group creation unless '-M' option is specified" the misc test 002 will fail, because of the non-mixed mode. I think we should not touch the image size (no change for block devices) and try to fit into whatever is provided by user. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: add initial tests/READMEDavid Sterba2015-11-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 003-mixed-with-wrong-nodesizeDavid Sterba2015-11-02
| | | | | | | | | Mixed mode needs equal sectorsize and nodesize. This was fixed by "Btrfs-progs: Prevent creation of filesystem with 'mixed bgs' and having differing sectorsize and nodesize" Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: do not log output of run_mayfail to terminalDavid Sterba2015-11-02
| | | | | | | No need to log expected failures to the terminal, the results file is fine; pass the return value of the command. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for command instrumentationDavid Sterba2015-11-02
| | | | | | | | | | | | | | | | | | Add a way to wrap commands executed by the tests. This means the common wrappers: run_check, run_check_stdout and run_mayfail , with the exception of the use root_helper. The contents of the shell variable INSTRUMENT are prepended to the command, without quotes. Use with care. Example: this has been tested with valgrind, the output goes to the RESULTS file. $ INSTRUMENT=valgrind make test-misc Any use of root_helper/SUDO_HELPER will skip the instrumentation. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: 001-simple-unmounted: iterate over fuzzed images and run ↵David Sterba2015-11-02
| | | | | | check Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add test driver for fuzzed imagesDavid Sterba2015-11-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: do not run sudo helper tests if not necessaryDavid Sterba2015-11-02
| | | | | | | | We use setup_root_helper in some helpers to make sure that the sudo helper is set up, and adding that to each test. Make the real test run only once. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: set default test image size to 2GDavid Sterba2015-11-02
| | | | 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: tests: add 002-no-force-mixed-on-small-volumeDavid Sterba2015-11-02
| | | | | | Verify that we do not force mixed block groups on small volumes anymore. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 001-basic-profiles mkfs testsDavid Sterba2015-11-02
| | | | | | Basic test to cover block group profile combinations. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add mkfs testsDavid Sterba2015-11-02
| | | | | | Mkfs deserves it's own. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: print commands on terminal if requestedDavid Sterba2015-10-21
| | | | | | | | | Set the variable TEST_LOG=tty (in the enviroment or as parameter to make) to print commands executed by 'run_check' helpers to terminal (ie. /dev/tty). This might be useful to see the test progress beside watching the results file. 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: Avoid printing useless warning in fsck testsZhao Lei2015-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 002-bad-transid outout 'transid verify failed' message in screen which is just a warning in btrfs-image in normal condition of this test. This patch move above warning into $RESULTS, to: 1: Avoid trouble screen output 2: Let user known detail if other error happened in btrfs-image Before patch: # ./fsck-tests.sh [TEST] 001-bad-file-extent-bytenr [TEST] 002-bad-transid parent transid verify failed on 29360128 wanted 9 found 755944791 parent transid verify failed on 29360128 wanted 9 found 755944791 Ignoring transid failure [TEST] 003-shift-offsets [TEST] 004-no-dir-index ... After patch: # ./fsck-tests.sh [TEST] 001-bad-file-extent-bytenr [TEST] 002-bad-transid [TEST] 003-shift-offsets [TEST] 004-no-dir-index ... Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> 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: Introduce fsck-tests/018-leaf-crossing-stripesZhao Lei2015-10-19
| | | | | | | | | | | To test if fsck can check detec "leaf crossing stripes". This function was introduced from patch titled: btrfs-progs: fsck: Check if a metadata tree block crossing stripe boundary 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: Move extract_image out of check_all_images for common useZhao Lei2015-10-19
| | | | | | | | | | Move code for extract image file to a function from check_all_images() for common use, so caller can use this function to extrace single image file. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> [minor reformatting and updates] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Add '-o loop' to mount command line in convert-tests.shZhao Lei2015-09-20
| | | | | | | | | | | | | | | To fix following bug: # ./convert-tests.sh [TEST] ext2 4k nodesize, btrfs defaults failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt # tail convert-tests-results.txt ... ############### mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt mount: /root/btrfsprogs/tests/test.img is not a block device (maybe try `-o loop'?) failed: mount /root/btrfsprogs/tests/test.img /root/btrfsprogs/tests/mnt Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add crafted and fuzzed imagesDavid Sterba2015-09-09
| | | | | | | | | A collection of several images that were produced in a non-standard way and cause various errors in check or image tools. They do not fit into the fsck tests as we're not able to repair any of them, but the tools should not crash or do out-of-bounds access. 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: Fix mount fail of 013-extent-tree-rebuildZhao Lei2015-09-01
| | | | | | | | | | | | | | | | | | | mount command in old system can not add "-o loop" option automatically for loop device, and make following test failed: # ./fsck-tests.sh ... [TEST] 013-extent-tree-rebuild failed: mount /data/btrfsprogs/tests/test.img /data/btrfsprogs/tests/mnt test failed for case 013-extent-tree-rebuild Considering that $TEST_DEV can be block or loop device, we need determine our mount option in a condition for both case. This patch create a wrapper function for above request, to solve current problem in 013-extent-tree-rebuild, and support similar request in future. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>