summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* btrfs-progs: tests: 005-qgroup-showDavid Sterba2017-01-25
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert-test: trigger chunk allocation after convertQu Wenruo2016-12-21
| | | | | | | | | Populate fs after convert so we can trigger data chunk allocation. This can expose too restrict old rollback condition Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check for partscan support in misc/006-partitioned-loopdevDavid Sterba2016-12-14
| | | | | | | The travis CI does not have losetup with --partscan, skip the check in that case so we can still run the mkfs testsuite. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more gobal option to test 001-btrfsDavid Sterba2016-12-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: end of stream conditionsDavid Sterba2016-11-30
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for additional command argumentsDavid Sterba2016-11-23
| | | | | | | | | Add convenient support for extending command arguments, now implemented for 'btrfs check' to cover the low-memory mode. If defined, arguments are inserted to any 'btrfs check' command in tests. Exceptions could be defined in common.local. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: more variable quoting in common scriptsDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: drop redundant test for rwx number validityDavid Sterba2016-11-23
| | | | | | | The list of rwx permissions is now hardcoded but used to begenerated and the invalid numbers filtered out. Not necessary anymore. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: fix how to make test files in fsck-tests 013Tsutomu Itoh2016-11-23
| | | | | | | | | | | | | | | | | | | | | | In my test environment, following error was occurred because the size of /lib/modules/`uname -r`/* is larger than 1GB. # make test-fsck [TEST] fsck-tests.sh [TEST/fsck] 013-extent-tree-rebuild failed: cp -aR /lib/modules/4.9.0-rc5/ /test/btrfs-progs/tests/mnt test failed for case 013-extent-tree-rebuild Makefile:272: recipe for target 'test-fsck' failed make: *** [test-fsck] Error 1 # In this test case, 'generate_dataset small' is enough for making the test files, so I will use 'generate_dataset' instead of 'cp'. For this, move 'generate_dataset()' from 'common.convert' to 'common'. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Update README and other docsDavid Sterba2016-11-23
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fallback to current directory for check_all_imagesDavid Sterba2016-11-23
| | | | | Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance TEST_LOG featuresDavid Sterba2016-11-23
| | | | | | | Add new keyword to dump the log file after any test fails. Can be useful for remote analysis of test failures. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check for TEST_LOG values by a regexDavid Sterba2016-11-23
| | | | | | | The set of possible values will be extended so check for existence of the keyword. Signed-off-by: David Sterba <dsterba@suse.com>
* 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 more fuzzed images from bugzillaDavid Sterba2016-11-23
| | | | | | | | Fixing the problems by one does not scale now. Add more images despite the fuzz tests will fail. They have been for some time already. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance run_mayfail description commentDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotation around variables in support scriptsDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotation around variables in common.convertDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add quotes around variables in commonDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add path assertions to post-checksDavid Sterba2016-11-11
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add assertion helperDavid Sterba2016-11-11
| | | | | | Helper to extend sanity checks in various functions. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: refactor post-convert check helpersDavid Sterba2016-11-11
| | | | | | | | Separate checksum test from convert_test_post_check and use it to fix the broken test 005 as reported. References: https://bugzilla.kernel.org/show_bug.cgi?id=177141 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check if kernel has btrfs supportDavid Sterba2016-11-11
| | | | | | | Add some sanity checks, reported among other issues via bugzilla. References: https://bugzilla.kernel.org/show_bug.cgi?id=177141 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: teach extract_image about packed streamsDavid Sterba2016-11-11
| | | | | | | Packed streams for testing purposes should be packed with 'xz -9' and use suffix .stream.xz . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: teach scan-results about more errorsDavid Sterba2016-11-09
| | | | | | ASAN detects use after free. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add test for multi-subvolume send from parentDavid Sterba2016-11-09
| | | | | | | Fixed by "btrfs-progs: send: fix handling of multiple snapshots (-p option)". 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: fsck-tests: Check if clear space cache worksQu Wenruo2016-11-09
| | | | | | | Add test case to check the basic function of --clear-space-cache. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: Add image for quota verify stack overflowQu Wenruo2016-10-24
| | | | | | | | | | | | | For image with tree reloc tree, if its height is over level 2, the root node's backref will point to itself. It's valid for kernel, but quota verify code can't handle it and cause a infinite call, overflowing the stack. Add minimal image to reproduce the bug, as regression test. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ minor cleanups in test.sh ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: Add test image for btrfsck qgroup rescan detectionQu Wenruo2016-10-24
| | | | | | | | | | | Fixed by commit 7c646c538e74 btrfs-progs: qgroup: Fix regression leads to corrupted qgroup status. Add minimal test image for that fix. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ minor cleanups in test.sh ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert-test: Add test case for common inode flagsQu Wenruo2016-10-24
| | | | | | | | | Add a new test case to check if btrfs-convert copies common inode flags like append(a), immutable(i). Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ minor fixes ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Add fast,slow symlinks, fifo types to convert testLakshmipathi.G2016-10-24
| | | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> [ fix root helper use in fast_symlink ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add script to help build coverageDavid Sterba2016-10-10
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: teach run_mayfail about sigabrtDavid Sterba2016-10-05
| | | | | | Mayfail helper should stop when we encoutner an abort. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: don't treat segfault as ignorable errorDavid Sterba2016-10-05
| | | | | | | | Some fuzzed images cause various tools to crash but the mayfail helper would not recognize that. We don't mind if the utility failes but it must not crash. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: split test 004 to separate testsDavid Sterba2016-10-05
| | | | | | Makes testing specific tool easier. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image with bad parent refs, qgroup-verifyDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed images with bad blocksize/lengh of ebDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add script to scan results for some known runtime errorsDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: iterate over fuzzed images and test various toolsDavid Sterba2016-10-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: reorganize extent_buffer and fix alignment of dataDavid Sterba2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by UBSAN, the checksum code tries to access unaligned data that come from the extent_buffer. struct extent_buffer { struct cache_extent cache_node; /* 0 48 */ u64 start; /* 48 8 */ u64 dev_bytenr; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 len; /* 64 4 */ /* XXX 4 bytes hole, try to pack */ struct extent_io_tree * tree; /* 72 8 */ struct list_head lru; /* 80 16 */ struct list_head recow; /* 96 16 */ int refs; /* 112 4 */ u32 flags; /* 116 4 */ int fd; /* 120 4 */ char data[0]; /* 124 0 */ /* size: 128, cachelines: 2, members: 11 */ /* sum members: 120, holes: 1, sum holes: 4 */ /* padding: 4 */ }; Add explicit alignment to data. Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156471 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 021-partially-dropped-snapshot-caseWang Xiaoguang2016-09-21
| | | | | Signed-off-by: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed images for bad block group offsetDavid Sterba2016-09-21
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: run check with various options on the fuzzed imagesDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzz test to try btrfs-image on all imagesDavid Sterba2016-09-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: rename test 001 to mention checkDavid Sterba2016-09-21
| | | | | | Make it more clear that the test does 'btrfs check'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add fuzzed image for a bad backrefDavid Sterba2016-09-21
| | | | | Reported-by: Lukas Lueg <lukas.lueg@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>