From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DD90C3A5A2 for ; Tue, 3 Sep 2019 16:09:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DDEB208E4 for ; Tue, 3 Sep 2019 16:09:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729867AbfICQJY (ORCPT ); Tue, 3 Sep 2019 12:09:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:45758 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728679AbfICQJX (ORCPT ); Tue, 3 Sep 2019 12:09:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9EF9AE74; Tue, 3 Sep 2019 16:09:22 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 1B30BDA876; Tue, 3 Sep 2019 18:09:43 +0200 (CEST) Date: Tue, 3 Sep 2019 18:09:43 +0200 From: David Sterba To: Johannes Thumshirn Cc: David Sterba , Linux BTRFS Mailinglist Subject: Re: [PATCH] btrfs-progs: fix zstd compression test on a kernel without ztsd support Message-ID: <20190903160942.GE2752@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Johannes Thumshirn , David Sterba , Linux BTRFS Mailinglist References: <20190903122721.9865-1-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190903122721.9865-1-jthumshirn@suse.de> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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 > --- > 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.