summaryrefslogtreecommitdiff
path: root/tests/convert-tests.sh
Commit message (Collapse)AuthorAge
* 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: add quotation around variables in support scriptsDavid Sterba2016-11-11
| | | | 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: print shorter test name in the outputDavid Sterba2016-06-22
| | | | | | | The full path is printed, we're interested in the last path component only. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: unify test driversDavid Sterba2016-06-03
| | | | | | Remove unnecessary code, add exports to all common variables. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert: set common variablesDavid Sterba2016-06-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: clean up the test driver of convert testsDavid Sterba2016-06-03
| | | | | | Everything is now in separate tests, and TEST=mask now works. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert: separate ext4 testsDavid Sterba2016-06-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert: separate ext3 testsDavid Sterba2016-06-03
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* 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 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: 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: 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: 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: 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 '-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: 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: support testname globDavid Sterba2015-08-31
| | | | | | | | | | | | | | | To run a given test set the variable TEST like $ make test TEST=002-bad-transid $ make test TEST=002-* and only tests matching the value will be run. The pattern is glob and pased to 'find -name'. The convert tests do not follow the fsck and misc layout and are skipped if TEST is set. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: update convert tests to set fs featuresDavid Sterba2015-06-04
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: use readlink -f to resolve pathDavid Sterba2015-05-21
| | | | | | | The utility 'realpath' from coreutils is new enough to be missing on my "old" reference build host. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: convert tests: preserve test image permissionsDavid Sterba2015-04-07
| | | | | | | If the test image is eg. on NFS it's not writable for root, so chmod 0777 fixes that but then we must not delete the file. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: convert-tests: Add check for converted btrfs with regular file ↵Qu Wenruo2015-04-07
| | | | | | | | | | extent. Regression test for previous patch "btrfs-progs: convert: Make ext*_image file obey datacsum setting." Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: convert-tests: Update to use test framework infrastructure.Qu Wenruo2015-04-07
| | | | | | | | Also change the test() to convert_test(), to avoid conflict name with bash test function. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: convert tests: add remaining supported nodesizesDavid Sterba2015-03-23
| | | | | | That's 8k, 32k and 64k. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add nodesize test for btrfs-convertSebastian Thorarensen2015-03-23
| | | | | | | convert-tests now test both 4096 and 16384 nodesizes. Signed-off-by: Sebastian Thorarensen <sebth@naju.se> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests, adjust alignment of the pretty command nameDavid Sterba2015-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: use 'btrfs check' instead of btrfsckDavid Sterba2014-12-12
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Use sparse files for filesystem conversion testsAdam Buchbinder2014-08-22
| | | | | | | | | | On my system, this brings the FS conversion test suite's runtime from over ten seconds down to under two. Thanks to Julien Muchembled for the suggestion. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add some simple end-to-end tests for btrfs-convertAdam Buchbinder2014-08-22
These use the system's mke2fs, and don't require loop devices or root privileges. They don't pick up anything with the default flags right now, but they do pick up some sanitizer issues when the tools are compiled with any of -fsanitize={address,memory,thread}. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.cz>