All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: fix zstd compression test on a kernel without ztsd support
@ 2019-09-03 12:27 Johannes Thumshirn
  2019-09-03 16:09 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2019-09-03 12:27 UTC (permalink / raw)
  To: David Sterba; +Cc: Linux BTRFS Mailinglist, Johannes Thumshirn

The test-case 'misc-tests/025-zstd-compression' is failing on a kernel
without zstd compression support.

Check if zstd compression is supported by the kernel and if not skip the
test-case.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 tests/misc-tests/025-zstd-compression/test.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/misc-tests/025-zstd-compression/test.sh b/tests/misc-tests/025-zstd-compression/test.sh
index 22795d27500e..f9ff1d089fd5 100755
--- a/tests/misc-tests/025-zstd-compression/test.sh
+++ b/tests/misc-tests/025-zstd-compression/test.sh
@@ -6,6 +6,11 @@ source "$TEST_TOP/common"
 check_prereq btrfs
 check_global_prereq md5sum
 
+if ! [ -f "/sys/fs/btrfs/features/compress_zstd" ]; then
+       _not_run "kernel does not support zstd compression feature"
+       exit
+fi
+
 # Extract the test image
 image=$(extract_image compress.raw.xz)
 
-- 
2.16.4


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

end of thread, other threads:[~2019-09-04  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 12:27 [PATCH] btrfs-progs: fix zstd compression test on a kernel without ztsd support Johannes Thumshirn
2019-09-03 16:09 ` David Sterba
2019-09-04  7:36   ` Johannes Thumshirn

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.