Re: [PATCH] btrfs-progs: fix zstd compression test on a kernel without ztsd support

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

 



On Tue, Sep 03, 2019 at 02:27:21PM +0200, Johannes Thumshirn wrote:
> 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@xxxxxxx>
> ---
>  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"

Sorry, I misled you with this check. The test needs to detect zstd
support in 'btrfs restore'. The only thing I see right now is to grep
for zstd in output of 'ldd', because unlike for btrfs-convert, the help
does not list the optional features.



[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