All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs-tests: Only check supported checksums
@ 2020-02-10 16:43 Marcos Paulo de Souza
  2020-02-10 17:05 ` Johannes Thumshirn
  2020-02-11 18:39 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: Marcos Paulo de Souza @ 2020-02-10 16:43 UTC (permalink / raw)
  To: dsterba, linux-btrfs; +Cc: Marcos Paulo de Souza

From: Marcos Paulo de Souza <mpdesouza@suse.com>

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 tests/mkfs-tests/019-basic-checksums-mkfs/test.sh  | 11 +++++++----
 tests/mkfs-tests/020-basic-checksums-mount/test.sh |  7 +++----
 2 files changed, 10 insertions(+), 8 deletions(-)

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
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mkfs-tests: Only check supported checksums
  2020-02-10 16:43 [PATCH] mkfs-tests: Only check supported checksums Marcos Paulo de Souza
@ 2020-02-10 17:05 ` Johannes Thumshirn
  2020-02-11 18:39 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2020-02-10 17:05 UTC (permalink / raw)
  To: Marcos Paulo de Souza, dsterba, linux-btrfs; +Cc: Marcos Paulo de Souza

Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mkfs-tests: Only check supported checksums
  2020-02-10 16:43 [PATCH] mkfs-tests: Only check supported checksums Marcos Paulo de Souza
  2020-02-10 17:05 ` Johannes Thumshirn
@ 2020-02-11 18:39 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2020-02-11 18:39 UTC (permalink / raw)
  To: Marcos Paulo de Souza; +Cc: dsterba, linux-btrfs, Marcos Paulo de Souza

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-11 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 16:43 [PATCH] mkfs-tests: Only check supported checksums Marcos Paulo de Souza
2020-02-10 17:05 ` Johannes Thumshirn
2020-02-11 18:39 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.