Executing the script inside the directories as './test.sh' is not
supposed to work but could happen accidentally. With an exit after
attempting to source the we can fix that.
Signed-off-by: David Sterba <dsterba@suse.com>
The shell keyword function is not necessary and not used in many tests,
remove it from the few places that use it right now.
Signed-off-by: David Sterba <dsterba@suse.com>
Use TEST_TOP as base for tests to reference any files, this will be used
for git and external testsuite.
INTERNAL_BIN is needed for referencing binaries that could reside in
different paths in git vs external testsuite.
Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
[ add quotes around sourced files, update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
We really use root only for mount/umount and access to the ext2_saved
image (that has 0600). Also switch to common variable so we can use
helpers.
Signed-off-by: David Sterba <dsterba@suse.com>
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>