From patchwork Mon Aug 5 11:45:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 11076577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85FCB112C for ; Mon, 5 Aug 2019 11:45:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73EBA28711 for ; Mon, 5 Aug 2019 11:45:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6861328862; Mon, 5 Aug 2019 11:45:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02D2E28711 for ; Mon, 5 Aug 2019 11:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728015AbfHELp0 (ORCPT ); Mon, 5 Aug 2019 07:45:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:34708 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727259AbfHELp0 (ORCPT ); Mon, 5 Aug 2019 07:45:26 -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 ED357B627 for ; Mon, 5 Aug 2019 11:45:24 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH] btrfs-progs: Check for metadata uuid feature in misc-tests/034-metadata-uuid Date: Mon, 5 Aug 2019 14:45:22 +0300 Message-Id: <20190805114522.12151-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of checking the kernel version, explicitly check for the presence of metadata_uuid file in sysfs. This allows the test to be run on older kernels that might have this feature backported. Signed-off-by: Nikolay Borisov Reviewed-by: Qu Wenruo --- tests/misc-tests/034-metadata-uuid/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/misc-tests/034-metadata-uuid/test.sh b/tests/misc-tests/034-metadata-uuid/test.sh index 3ef110cda823..6ac55b1cacfa 100755 --- a/tests/misc-tests/034-metadata-uuid/test.sh +++ b/tests/misc-tests/034-metadata-uuid/test.sh @@ -10,8 +10,8 @@ check_prereq btrfs-image setup_root_helper prepare_test_dev -if ! check_min_kernel_version 5.0; then - _not_run "kernel too old, METADATA_UUID support needed" +if [ ! -f /sys/fs/btrfs/features/metadata_uuid ] ; then + _not_run "METADATA_UUID feature not supported" fi read_fsid() {