summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* btrfs-progs: tests: remove temporary images in mkfs/005 and mkfs/006David Sterba2017-09-25
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: remove temporary loopdev filesDavid Sterba2017-09-25
| | | | | | Remove files for testing loop devices when using the helper. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add testing image for zstd for btrfs-restoreNick Terrell2017-09-25
| | | | | | | | | | | Adds tests for the new features based on a prebuilt btrfs image with a zstd compressed file. Split from the previous patch. Signed-off-by: Nick Terrell <terrelln@fb.com> [ with some cleanups ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix run_mustfail in cli-tests/007-check-forceDavid Sterba2017-09-25
| | | | | | | | The sanity check in run_mustfail does not work as expected and allowed the command to continue without the missing parameter Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196893 Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: add new test for inspect-internal rootidMisono, Tomohiro2017-09-08
| | | | | | | | | | | This new test checks inspect-internal rootid - handle path to subvolume/directory/file as an argument - get different id for each subvolume - get the expected id for each file/directory (i.e. the same as containing subvolume) Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: check for kernel support for reiserfsDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance post-rollback fsck testsDavid Sterba2017-09-08
| | | | | | | | The post-rollback helper still assumes just extN, we need an extra argument that'll get passed to fsck. Change all callsites at once so the tests do not fail temporarily. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: fix name generation not to contain trailing spacesMisono, Tomohiro2017-09-08
| | | | | | | | | | | | | First patch causes test-convert fails. This is because generate_dataset() creates a name containing trailing spaces for "slow_symlink" type, and cause getfacl error in convert_test_perm(). (This is not noticed since original run_check_stdout() throws away the error.) Fix this by use space for delimiter for cut. Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test: fix run_check_stdout() call _fail()Misono, Tomohiro2017-09-08
| | | | | | | | | | run_check_stdout() uses "... | tee ... || _fail". However, since tee won't fail, _fail() is not called even if first command fails. Fix this by checking PIPESTATUS in the end. Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Add test case for mkfs --rootdir parameterQu Wenruo2017-09-08
| | | | | | | | Add test case which checks if -r|--rootdir mkfs option can handle symlink/char/block/fifo files. Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: missing device and slack space reportDavid Sterba2017-09-08
| | | | | | | Verify that a missing device will not result in reporting a negative value interpreted as 16EiB. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert misc/011-delete-missing-device to loopdevsDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: convert misc/006-image-on-missing-device to loopdevsDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: move loopdev helpers out of the testcase to commonDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: cleanup loop device helpersDavid Sterba2017-09-08
| | | | | | | Make the loop device helpers a bit more generic before moving them to the common helpers. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add testcase for 'fi du' and empty subvolDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add test for check --forceDavid Sterba2017-09-08
| | | | | | Basic test of the --force functionality, on an empty filesystem. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more sanitizer message patterns to log scannerDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: limit size of log dump from conver testsDavid Sterba2017-09-08
| | | | | | | The convert tests generate lots of log material, travis CI has limit 4MB so we don't see anything useful when a late test fails. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix TEST_LOG=dump in convert testsDavid Sterba2017-09-08
| | | | | | | Test failure in convert tests with log dump does not happen because _fail is called before that and exits. Other test types are ok. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: update READMEDavid Sterba2017-09-08
| | | | | | Wording, runtime dependencies. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more checks for tools used in convert testsDavid Sterba2017-09-08
| | | | | | | Tools that may not be present in common installations should be checked in the tests. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add build checks for sanitization featuresDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add more fuzzed images from bugzillaDavid Sterba2017-09-08
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add support for converting reiserfsJeff Mahoney2017-09-08
| | | | | | | | | | Many of the test cases for convert apply regardless of what the source file system is and using ext4 is sufficient. I've included several test cases that are reiserfs-specific. Signed-off-by: Jeff Mahoney <jeffm@suse.com> [ patch split from the previous one, minor cleanups in common.convert ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix _is_file_or_command detectionDavid Sterba2017-08-25
| | | | | | | | type -p returns an empty string for nonexistent commands, but the -f test on an empty string does not behave the same on all shells. To be safe, use the quoted value. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: catch bad usage of run_mustfailDavid Sterba2017-08-24
| | | | | | | This function has an extra argument and can get forgotten, add a sanity check so the bad usage can be caught during development. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: scan results for commands not foundDavid Sterba2017-08-24
| | | | | | | In case of typos or messed up command execution, we'd like to be able to catch that. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fsck-test: case for corrupted dir item nameSu Yue2017-08-24
| | | | | | | | | | In this test case, all name in dir_item, dir_index, inode_ref are corrupted to another one. btrfs check should report errors about the corrupted dir_item but btrfs can't repair the case now. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix typo in convert-tests/008-readonly-imageJeff Mahoney2017-08-24
| | | | | | | | The dd in convert-tests/008-readonly-image is expected to fail, so there being a typo in the file name has gone unnoticed. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Use '-t btrfs' mount option in testsAdam Buchbinder2017-07-20
| | | | | | | | Without it, mount (at least from util-linux 2.20.1) tries (and fails) to mount some filesystems as NTFS. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: use separate helper for mounting convert filesystemsDavid Sterba2017-07-20
| | | | | | | | We'll enforce the btrfs type for mount everwhere so we must provide a way to mount converted filesystems. Add a new helper that will try to mount the given type. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: enhance API to request type of the converted filesystemDavid Sterba2017-07-20
| | | | | | | We'll use mount -t $fstype later on, extend the API so we don't have to parse the type from other parameters. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Fix missing internal deps in check and misc testsAdam Buchbinder2017-07-20
| | | | | | | | | Doing a straight 'make test' would fail because some misc and fsck tests require particular tools to already be built. Add dependencies at the Makefile and shell-script level. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Add test case to check file hole extents with NO_HOLES flagQu Wenruo2017-06-26
| | | | | | | | | | | | Add test case which we have NO_HOLES incompat flag while still have hole file extent. This can be created by enabling NO_HOLES feature on an existing filesystem, which lowmem mode would cause false alert for it. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> [ minor adjustments ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: test for restoring multiple devices fs into a single deviceFilipe Manana2017-06-26
| | | | | | | | | | | Test that we are able to create an image from a multiple devices fs, that we are able to restore that image into a single device and finally that we are able to mount it. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> [ added shell quotation and chmod a+w so testsuite on NFS works ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: remove variable quotation from convert-testsTsutomu Itoh2017-06-26
| | | | | | | | | | | | | | | | | | | | | | In btrfs-progs-v4.11-rc1, the following convert-tests failed. [TEST/conv] 008-readonly-image [TEST/conv] readonly image test, btrfs defaults failed: mke2fs -t ext4 -b 4096 -F /Build/btrfs-progs-v4.11-rc1/tests/test.img test failed for case 008-readonly-image Makefile:271: recipe for target 'test-convert' failed make: *** [test-convert] Error 1 [TEST/conv] 009-common-inode-flags [TEST/conv] common inode flags test, btrfs defaults failed: mke2fs -t ext4 -b 4096 -F /Build/btrfs-progs-v4.11-rc1/tests/test.img test failed for case 009-common-inode-flags Makefile:271: recipe for target 'test-convert' failed make: *** [test-convert] Error 1 So, remove quotes from $default_mke2fs. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fix misc/019-receive-clones-on-munted-subvolDavid Sterba2017-05-15
| | | | | | | | Patches "btrfs-progs: tests: correctly receive clones to mounted subvol" (8eaf63bc9a7b957c566be23df7c6701a9a5b22a2) and followup are missing last unmount which leads to failure of misc/020. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add variable quotation to convert-testsLakshmipathi.G2017-05-15
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fssum: fix warning, include correct header for major()David Sterba2017-05-02
| | | | | | | | | | | | tests/fssum.c:599:13: warning: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. sum_add_u64(&cs, major(st.st_rdev)); Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, fix memory leakLu Fengqi2017-05-02
| | | | | | | Free the alloced memory and close dir before exit. Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add variable quotation to fsck-testsLakshmipathi.G2017-05-02
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: misc-tests: Superblock corruption and recovery using backupLakshmipathi.G2017-04-19
| | | | | Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: misc/018-receive use receive -e to terminate on end markerChristian Brauner2017-04-19
| | | | | | Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> [ enhance tests to take extra options and use for -e ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: Add SHARED_DATA_REF test image for check lowmem modeQu Wenruo2017-03-31
| | | | | | | | | | | | | | Introduce a new image, which contains external SHARED_DATA_REF items to trigger a lowmem mode false alert. The image only contains external SHARED_DATA_REF and no inlined data backref. Before the image, we only have inlined shared data ref, which is not enough to trigger lowmem mode false alert. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: misc/019, use fssumDavid Sterba2017-03-16
| | | | | | The fssum utility is now ready to use, test still passes. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, switch from MD5 to SHA256David Sterba2017-03-16
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add SHA256David Sterba2017-03-16
| | | | | | | | | | In order to drop dependency on SSL library to compute MD5 in fssum, we'll use the reference implementation from RFC 6234. The checksum is not in a cryptographically sensitive context, but we're going to skip MD5 and SHA-1 anyway. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, update includesDavid Sterba2017-03-16
| | | | | | Remove unneeded and add headers that define time_te and int types. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: fssum, drop *_SOURCE defines, already provided via config.hDavid Sterba2017-03-16
| | | | | | | | | | | | | In file included from /usr/include/stdio.h:27:0, from kerncompat.h:22, from tests/fssum.c:25: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" ^~~~~~~ We've solved that long time ago and config.h now provides the macros. Signed-off-by: David Sterba <dsterba@suse.com>