Message ID | 20200210164300.14177-1-marcos@mpdesouza.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mkfs-tests: Only check supported checksums | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On Mon, Feb 10, 2020 at 01:43:00PM -0300, Marcos Paulo de Souza wrote:
> From: Marcos Paulo de Souza <mpdesouza@suse.com>
Though it's obvious what the patch does, a short summary would be good.
With that updatd patch is now in devel, thanks.
diff --git a/tests/mkfs-tests/019-basic-checksums-mkfs/test.sh b/tests/mkfs-tests/019-basic-checksums-mkfs/test.sh index 61562942..01934cf0 100755 --- a/tests/mkfs-tests/019-basic-checksums-mkfs/test.sh +++ b/tests/mkfs-tests/019-basic-checksums-mkfs/test.sh @@ -20,7 +20,10 @@ test_mkfs_checksum() run_check $SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" } -test_mkfs_checksum crc32c -test_mkfs_checksum xxhash -test_mkfs_checksum sha256 -test_mkfs_checksum blake2 +if ! [ -f "/sys/fs/btrfs/features/supported_checksums" ]; then + _not_run "kernel support for checksums missing" +fi + +for csum in $(cat /sys/fs/btrfs/features/supported_checksums); do + test_mkfs_checksum "$csum" +done diff --git a/tests/mkfs-tests/020-basic-checksums-mount/test.sh b/tests/mkfs-tests/020-basic-checksums-mount/test.sh index eaac25dd..d52f3e1c 100755 --- a/tests/mkfs-tests/020-basic-checksums-mount/test.sh +++ b/tests/mkfs-tests/020-basic-checksums-mount/test.sh @@ -30,7 +30,6 @@ if ! [ -f "/sys/fs/btrfs/features/supported_checksums" ]; then _not_run "kernel support for checksums missing" fi -test_mkfs_mount_checksum crc32c -test_mkfs_mount_checksum xxhash -test_mkfs_mount_checksum sha256 -test_mkfs_mount_checksum blake2 +for csum in $(cat /sys/fs/btrfs/features/supported_checksums); do + test_mkfs_mount_checksum "$csum" +done