summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
...
* btrfs-progs: tests: convert: separate ext2 testsDavid Sterba2016-06-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: move convert helpers to a separate fileDavid Sterba2016-06-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert-tests: Add test case for backup superblock migrationQu Wenruo2016-06-03
| | | | | | | | | | | | | | | | | | | | | | New convert introduced simpler chunk/extent allocation algorithm, at the cost of complex backup superblock migration codes. Use specially built ext2 images to test if btrfs-convert can convert and rollback images without problem. All these special ext2 image have blocks/holes across 2nd btrfs backup superblock. The naming of test image is like the following: |<------superblock migration range----->| 64M 64M + 64K |-Data--|-Data--|/Hole//|-Data--|/Hole//|-Data--|--Data--| = drdhdhdrd These test cases should check all typical layouts and make sure new convert works. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert-tests: Add support for custom test scriptsQu Wenruo2016-06-03
| | | | | | | | | | | | | Add support for custom convert test scripts, just like fsck tests. Instead of generic convert tests, we need more specifically created images for new convert tests. This patch provide the needed infrastructure for later convert test cases. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: convert-tests: Add test for backup superblock migrationQu Wenruo2016-06-01
| | | | | | | | | | | | | | New convert framework uses new and simpler chunk layout, while the cost is the more complex superblock range migration logical, compared to old convert. Enhance the convert test script to create file which will takes up 2nd backup superblock space, to ensure the superblock migration is working as expected. Suggested-by: David Sterba <dsterba@suse.cz> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: document cli-tests in readmeDavid Sterba2016-06-01
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert: dump all superblocks after conversionDavid Sterba2016-06-01
| | | | | | We want to see all of them, even if they're not valid. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: run rollback after conversionDavid Sterba2016-06-01
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert, run md5sum with sudo helperDavid Sterba2016-06-01
| | | | | | | Some of the files might not end up in the checksum list because of permissions. This is reported by md5sum as incorrectly formatted lines. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add 020-extent-ref-casesLu Fengqi2016-06-01
| | | | | | | | | | | | | | | In order to confirm that btrfsck supports to check a variety of refs, add the following cases: * keyed_block_ref * keyed_data_ref * shared_block_ref * shared_data_ref * no_inline_ref (a extent item without inline ref) * no_skinny_ref Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> 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: 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>