Re: [PATCH v2 2/2] btrfs-progs: convert-tests: Add test case for backup superblock migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 03, 2016 at 10:34:26AM +0800, Qu Wenruo wrote:
> 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@xxxxxxxxxxxxxx>

Applied, thanks.

> +	extracted=$(extract_image "$src")
> +	run_check $SUDO_HELPER e2fsck -n -f $extracted
> +	run_check $SUDO_HELPER $TOP/btrfs-convert $extracted
> +	run_check $SUDO_HELPER $TOP/btrfs check $extracted
> +	run_check $SUDO_HELPER $TOP/btrfs-show-super $extracted
> +
> +	run_check $SUDO_HELPER mount -o loop $extracted $TEST_MNT
> +	run_check $SUDO_HELPER e2fsck -n -f $TEST_MNT/ext2_saved/image
> +	run_check $SUDO_HELPER umount $TEST_MNT
> +
> +	run_check $SUDO_HELPER $TOP/btrfs check $extracted
> +	run_check $SUDO_HELPER $TOP/btrfs-convert -r $extracted
> +	run_check $SUDO_HELPER e2fsck -n -f $extracted

Most of the SUDO_HELPER calls are not necessary, and the tests failed
when run under user (on NFS where root cannot do everything), so I did
some additional changes. The separate convert dir should be now ready
for adding more images easily.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux