[v4,12/12] btrfs-progs: add test-case for mkfs with xxhash64
diff mbox series

Message ID 20190903150046.14926-13-jthumshirn@suse.de
State New
Headers show
Series
  • btrfs-progs: support xxhash64 checksums
Related show

Commit Message

Johannes Thumshirn Sept. 3, 2019, 3 p.m. UTC
Add test-cases for creating a file-system xxhash64 as checksumming
algorithm.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
---
 tests/mkfs-tests/001-basic-profiles/test.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

David Sterba Sept. 24, 2019, 2:26 p.m. UTC | #1
On Tue, Sep 03, 2019 at 05:00:46PM +0200, Johannes Thumshirn wrote:
> Add test-cases for creating a file-system xxhash64 as checksumming
> algorithm.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  tests/mkfs-tests/001-basic-profiles/test.sh | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/mkfs-tests/001-basic-profiles/test.sh b/tests/mkfs-tests/001-basic-profiles/test.sh
> index 6e295274119d..3fa3c8ad42d1 100755
> --- a/tests/mkfs-tests/001-basic-profiles/test.sh
> +++ b/tests/mkfs-tests/001-basic-profiles/test.sh
> @@ -46,6 +46,8 @@ test_mkfs_single  -d  single  -m  dup
>  test_mkfs_single  -d  dup     -m  single
>  test_mkfs_single  -d  dup     -m  dup
>  test_mkfs_single  -d  dup     -m  dup     --mixed
> +test_mkfs_single  -C xxhash64
> +test_mkfs_single  -C xxhash

We'll want to do full test coverage with any of the checksum selected
externally, ie. ina similar way how the 'btrfs check --mode=lowmem' is
done

$ make TEST_ENABLE_OVERRIDE=true TEST_ARGS_CHECK=--mode=lowmem test-check

The support code in the testing sicripts is not there but can be copied
and adapted for mkfs.

A separate test that quickly enumerates over the supported mkfs hashes
would still make sense.

Patch
diff mbox series

diff --git a/tests/mkfs-tests/001-basic-profiles/test.sh b/tests/mkfs-tests/001-basic-profiles/test.sh
index 6e295274119d..3fa3c8ad42d1 100755
--- a/tests/mkfs-tests/001-basic-profiles/test.sh
+++ b/tests/mkfs-tests/001-basic-profiles/test.sh
@@ -46,6 +46,8 @@  test_mkfs_single  -d  single  -m  dup
 test_mkfs_single  -d  dup     -m  single
 test_mkfs_single  -d  dup     -m  dup
 test_mkfs_single  -d  dup     -m  dup     --mixed
+test_mkfs_single  -C xxhash64
+test_mkfs_single  -C xxhash
 
 test_mkfs_multi
 test_mkfs_multi   -d  single  -m  single