From patchwork Mon Jan 21 16:33:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774193 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 DB3081390 for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB2B329385 for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF64F2970C; Mon, 21 Jan 2019 16:33:50 +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 7A0AD2972C for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730171AbfAUQdt (ORCPT ); Mon, 21 Jan 2019 11:33:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:46338 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730116AbfAUQdo (ORCPT ); Mon, 21 Jan 2019 11:33:44 -0500 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 8266AAFB2 for ; Mon, 21 Jan 2019 16:33:43 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [IPv6:2001:559:c0d4::1fe]) by mail.home.jeffm.io (Postfix) with ESMTPS id 9D2D881AD3EB; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 24301265DA5; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 1/7] btrfs/010: don't run without /sys/fs/btrfs Date: Mon, 21 Jan 2019 11:33:10 -0500 Message-Id: <20190121163316.20616-1-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney Older kernels don't have /sys/fs/btrfs. btrfs/010 will happily run until it goes to check its work against sysfs and finds those files don't exist. This patch introduces a require check to ensure that the sysfs files are present before running. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana --- common/btrfs | 8 ++++++++ tests/btrfs/010 | 1 + 2 files changed, 9 insertions(+) diff --git a/common/btrfs b/common/btrfs index 26dc0bb9..f6513c06 100644 --- a/common/btrfs +++ b/common/btrfs @@ -89,6 +89,14 @@ _require_btrfs_fs_feature() _notrun "Feature $feat not supported by the available btrfs version" } +_require_btrfs_fs_sysfs() +{ + modprobe btrfs > /dev/null 2>&1 + [ -e /sys/fs/btrfs/features ] || \ + _notrun "Sysfs not supported by the available btrfs version" + +} + _check_btrfs_filesystem() { device=$1 diff --git a/tests/btrfs/010 b/tests/btrfs/010 index 1a5f0146..72b2c727 100755 --- a/tests/btrfs/010 +++ b/tests/btrfs/010 @@ -33,6 +33,7 @@ rm -f $seqres.full _supported_fs btrfs _supported_os Linux _require_test +_require_btrfs_fs_sysfs # Create 32k extents. All of these extents will be accounted as outstanding and # reserved. From patchwork Mon Jan 21 16:33:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774185 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 2D959139A for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E4FE2964F for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12A7F2972C; Mon, 21 Jan 2019 16:33:49 +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 B56092964F for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730516AbfAUQdr (ORCPT ); Mon, 21 Jan 2019 11:33:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:46346 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729870AbfAUQdp (ORCPT ); Mon, 21 Jan 2019 11:33:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 82B49AFB8 for ; Mon, 21 Jan 2019 16:33:44 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id 945E481AD3DA; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 293C4265DA7; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 2/7] filter: fix assumed whitespace in _filefrag_filter regex Date: Mon, 21 Jan 2019 11:33:11 -0500 Message-Id: <20190121163316.20616-2-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney The regex assumes there will be whitespace after the .. in the ranges and, with larger offsets, there may not be any. Signed-off-by: Jeff Mahoney --- common/filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/filter b/common/filter index ed082d24..b4443a34 100644 --- a/common/filter +++ b/common/filter @@ -532,7 +532,7 @@ _filter_filefrag() next } ($ext, $logical, $physical, $length) = - (/^\s*(\d+):\s+(\d+)..\s+\d+:\s+(\d+)..\s+\d+:\s+(\d+):/) + (/^\s*(\d+):\s+(\d+)\.\.\s*\d+:\s+(\d+)\.\.\s*\d+:\s+(\d+):/) or next; ($flags) = /.*:\s*(\S*)$/; print $physical * $blocksize, "#", From patchwork Mon Jan 21 16:33:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774189 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 698BD139A for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A3DE2970C for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ED712990C; Mon, 21 Jan 2019 16:33:50 +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 D526229385 for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730522AbfAUQdt (ORCPT ); Mon, 21 Jan 2019 11:33:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:46336 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730171AbfAUQdo (ORCPT ); Mon, 21 Jan 2019 11:33:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 83757AFB5 for ; Mon, 21 Jan 2019 16:33:43 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id 96FC281AD3DF; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 307E6265DA9; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 3/7] filter: add support for old filefrag -v Date: Mon, 21 Jan 2019 11:33:12 -0500 Message-Id: <20190121163316.20616-3-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney e2fsprogs versions prior to v1.42.7 had a different format for filefrag -v that is incompatible with the regex in _filefrag_filter. This patch adds support for the older format to test on older releases Signed-off-by: Jeff Mahoney --- common/filter | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/common/filter b/common/filter index b4443a34..a8ddf571 100644 --- a/common/filter +++ b/common/filter @@ -528,13 +528,27 @@ _filter_filefrag() { perl -ne ' if (/blocks? of (\d+) bytes/) { + $oldfmt = 0; $blocksize = $1; - next + next; + } elsif (/\d+ blocks, blocksize (\d+)/) { + $oldfmt = 1; + $blocksize = $1; + next; + } + if ($oldfmt) { + chomp; + ($ext, $logical, $physical, $ignore, $length1, $length2, $flags) = + (/^\s*(\d+)\s+(\d+)\s+(\d+)\s+((\d+)|\d+\s+(\d+))\s+([a-z0-9,]*)$/) + or next; + $length = "$length1$length2"; + } else { + ($ext, $logical, $physical, $length) = + (/^\s*(\d+):\s+(\d+)\.\.\s*\d+:\s+(\d+)\.\.\s*\d+:\s+(\d+):/) + or next; + ($flags) = /.*:\s*(\S*)$/; } - ($ext, $logical, $physical, $length) = - (/^\s*(\d+):\s+(\d+)\.\.\s*\d+:\s+(\d+)\.\.\s*\d+:\s+(\d+):/) - or next; - ($flags) = /.*:\s*(\S*)$/; + print $physical * $blocksize, "#", $length * $blocksize, "#", $logical * $blocksize, "#", From patchwork Mon Jan 21 16:33:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774183 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 0A7AD1515 for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED9352970C for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E20742972C; Mon, 21 Jan 2019 16:33:48 +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 89FD929385 for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730475AbfAUQdo (ORCPT ); Mon, 21 Jan 2019 11:33:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:46332 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729891AbfAUQdo (ORCPT ); Mon, 21 Jan 2019 11:33:44 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 818FDAFAA for ; Mon, 21 Jan 2019 16:33:43 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id 9F82381AD3ED; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 370F2265DAB; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 4/7] btrfs: require feature raid56 for raid56 tests Date: Mon, 21 Jan 2019 11:33:13 -0500 Message-Id: <20190121163316.20616-4-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney btrfs/125, btrfs/148, btrfs/157, and btrfs/158 test for raid56 behavior. We shouldn't run if the kernel doesn't have support for them. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana --- tests/btrfs/125 | 1 + tests/btrfs/148 | 1 + tests/btrfs/157 | 1 + tests/btrfs/158 | 1 + 4 files changed, 4 insertions(+) diff --git a/tests/btrfs/125 b/tests/btrfs/125 index 5ac68b67..847fa62a 100755 --- a/tests/btrfs/125 +++ b/tests/btrfs/125 @@ -51,6 +51,7 @@ _supported_os Linux _require_scratch_dev_pool 3 _test_unmount _require_loadable_fs_module "btrfs" +_require_btrfs_fs_feature raid56 _scratch_dev_pool_get 3 diff --git a/tests/btrfs/148 b/tests/btrfs/148 index d0e554c2..3fd8616f 100755 --- a/tests/btrfs/148 +++ b/tests/btrfs/148 @@ -30,6 +30,7 @@ _supported_os Linux _require_scratch _require_scratch_dev_pool 4 _require_odirect +_require_btrfs_fs_feature raid56 _scratch_dev_pool_get 4 diff --git a/tests/btrfs/157 b/tests/btrfs/157 index d9ea4b7b..7f75c407 100755 --- a/tests/btrfs/157 +++ b/tests/btrfs/157 @@ -49,6 +49,7 @@ _supported_fs btrfs _supported_os Linux _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree +_require_btrfs_fs_feature raid56 get_physical_stripe0() { diff --git a/tests/btrfs/158 b/tests/btrfs/158 index fe2dd956..603e8bea 100755 --- a/tests/btrfs/158 +++ b/tests/btrfs/158 @@ -41,6 +41,7 @@ _supported_fs btrfs _supported_os Linux _require_scratch_dev_pool 4 _require_btrfs_command inspect-internal dump-tree +_require_btrfs_fs_feature raid56 get_physical_stripe0() { From patchwork Mon Jan 21 16:33:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774191 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 806241515 for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FD7129385 for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64A1A29ADF; Mon, 21 Jan 2019 16:33:50 +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 1D84B2972C for ; Mon, 21 Jan 2019 16:33:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730116AbfAUQdt (ORCPT ); Mon, 21 Jan 2019 11:33:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:46334 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730023AbfAUQdo (ORCPT ); Mon, 21 Jan 2019 11:33:44 -0500 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 81786AFA3 for ; Mon, 21 Jan 2019 16:33:43 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id 9EC4081AD3EC; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 3C70D265DAD; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 5/7] btrfs/023: skip trying to test raid56 without kernel support Date: Mon, 21 Jan 2019 11:33:14 -0500 Message-Id: <20190121163316.20616-5-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney Older kernels don't support raid56. This test is still valid for other profiles, so skip raid56 if the kernel doesn't support it. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana --- tests/btrfs/023 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/btrfs/023 b/tests/btrfs/023 index 6d9cc443..6c02113b 100755 --- a/tests/btrfs/023 +++ b/tests/btrfs/023 @@ -63,11 +63,13 @@ check_group_profile "RAID1" create_group_profile "raid10" check_group_profile "RAID10" -create_group_profile "raid5" -check_group_profile "RAID5" +if [ -e "/sys/fs/btrfs/features/raid56" ]; then + create_group_profile "raid5" + check_group_profile "RAID5" -create_group_profile "raid6" -check_group_profile "RAID6" + create_group_profile "raid6" + check_group_profile "RAID6" +fi # success, all done echo "Silence is golden" From patchwork Mon Jan 21 16:33:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774181 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 203D31390 for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CBFB2835B for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00BA42A742; Mon, 21 Jan 2019 16:33:47 +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 AA10D2A594 for ; Mon, 21 Jan 2019 16:33:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730151AbfAUQdq (ORCPT ); Mon, 21 Jan 2019 11:33:46 -0500 Received: from mx2.suse.de ([195.135.220.15]:46350 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730516AbfAUQdq (ORCPT ); Mon, 21 Jan 2019 11:33:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 93B13AFBF for ; Mon, 21 Jan 2019 16:33:44 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [192.168.1.254]) by mail.home.jeffm.io (Postfix) with ESMTPS id A319781AD3EE; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 42D06265DAF; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 6/7] btrfs/131: require support for free-space-tree Date: Mon, 21 Jan 2019 11:33:15 -0500 Message-Id: <20190121163316.20616-6-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney btrfs/131 tests the free space tree, which older kernels won't have. We shouldn't run there. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana --- tests/btrfs/131 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/btrfs/131 b/tests/btrfs/131 index 0da1e7be..3de7eef8 100755 --- a/tests/btrfs/131 +++ b/tests/btrfs/131 @@ -34,6 +34,7 @@ _supported_fs btrfs _supported_os Linux _require_scratch _require_btrfs_command inspect-internal dump-super +_require_btrfs_fs_feature free_space_tree mkfs_v1() { From patchwork Mon Jan 21 16:33:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Mahoney X-Patchwork-Id: 10774187 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 6FCEB1390 for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6099C29385 for ; Mon, 21 Jan 2019 16:33:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54EBB2972C; Mon, 21 Jan 2019 16:33:49 +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 EAD2729385 for ; Mon, 21 Jan 2019 16:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729870AbfAUQdr (ORCPT ); Mon, 21 Jan 2019 11:33:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:46356 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730522AbfAUQdq (ORCPT ); Mon, 21 Jan 2019 11:33:46 -0500 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 DBC09AFA3 for ; Mon, 21 Jan 2019 16:33:44 +0000 (UTC) Received: from starscream.home.jeffm.io (starscream-1.home.jeffm.io [IPv6:2001:559:c0d4::1fe]) by mail.home.jeffm.io (Postfix) with ESMTPS id A7CEC81AD3EF; Mon, 21 Jan 2019 11:31:58 -0500 (EST) Received: by starscream.home.jeffm.io (Postfix, from userid 1000) id 46C1A265DB1; Mon, 21 Jan 2019 11:33:42 -0500 (EST) From: jeffm@suse.com To: fstests@vger.kernel.org Cc: Jeff Mahoney Subject: [PATCH 7/7] check: move test exclusion handling to _prepare_test_list Date: Mon, 21 Jan 2019 11:33:16 -0500 Message-Id: <20190121163316.20616-7-jeffm@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190121163316.20616-1-jeffm@suse.com> References: <20190121163316.20616-1-jeffm@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jeff Mahoney In order to simplify combining excluded tests specified on the command line vs specified via config files, it makes sense to push the handling into _prepare_test_list. This means we start with a fresh $tmp.xlist and rebuild it each time _prepare_test_list is called. Signed-off-by: Jeff Mahoney --- check | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/check b/check index 77a06b00..17073c4e 100755 --- a/check +++ b/check @@ -230,7 +230,28 @@ _prepare_test_list() done fi - # Specified groups to exclude + :> $tmp.xlist + + # Per-fstype/generic/shared file of tests to exclude (-X) + for xfile in $XGROUP_FILES; do + for d in $SRC_GROUPS $FSTYP; do + [ -f $SRC_DIR/$d/$xfile ] || continue + for f in `sed "s/#.*$//" $SRC_DIR/$d/$xfile`; do + echo "$d/$f command line" >> $tmp.xlist + done + done + done + + # External file of tests to exclude (-E) + for xfile in $EXCLUDE_FILES; do + if [ -f $xfile ]; then + sed -e "s/#.*$//" \ + -e "s;$; file $xfile;" "$xfile" \ + >> $tmp.xlist + fi + done + + # Specified groups to exclude (-x) for xgroup in $XGROUP_LIST; do list=$(get_group_list $xgroup) if [ -z "$list" ]; then @@ -273,13 +294,8 @@ while [ $# -gt 0 ]; do XGROUP_LIST="$XGROUP_LIST ${xgroup//,/ }" ;; - -X) subdir_xfile=$2; shift ; - ;; - -E) xfile=$2; shift ; - if [ -f $xfile ]; then - sed "s/#.*$//" "$xfile" >> $tmp.xlist - fi - ;; + -X) XGROUP_FILES="$XGROUP_FILES $2" ; shift ;; + -E) EXCLUDE_FILES="$EXCLUDE_FILES $2" ; shift ;; -s) RUN_SECTION="$RUN_SECTION $2"; shift ;; -S) EXCLUDE_SECTION="$EXCLUDE_SECTION $2"; shift ;; -l) diff="diff" ;; @@ -320,15 +336,6 @@ if ! . ./common/rc; then exit 1 fi -if [ -n "$subdir_xfile" ]; then - for d in $SRC_GROUPS $FSTYP; do - [ -f $SRC_DIR/$d/$subdir_xfile ] || continue - for f in `sed "s/#.*$//" $SRC_DIR/$d/$subdir_xfile`; do - echo $d/$f >> $tmp.xlist - done - done -fi - # Process tests from command line now. if $have_test_arg; then while [ $# -gt 0 ]; do