From patchwork Thu Sep 22 09:05:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 9344819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D98360CDC for ; Thu, 22 Sep 2016 09:06:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D1012A8DE for ; Thu, 22 Sep 2016 09:06:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2E832A8E8; Thu, 22 Sep 2016 09:06:15 +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=-6.9 required=2.0 tests=BAYES_00,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 D38EC2A8E8 for ; Thu, 22 Sep 2016 09:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756746AbcIVJGH (ORCPT ); Thu, 22 Sep 2016 05:06:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbcIVJGG (ORCPT ); Thu, 22 Sep 2016 05:06:06 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 25EC86CB33 for ; Thu, 22 Sep 2016 09:06:06 +0000 (UTC) Received: from localhost (dhcp-13-153.nay.redhat.com [10.66.13.153]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8M964l6010510; Thu, 22 Sep 2016 05:06:05 -0400 From: Eryu Guan To: fstests@vger.kernel.org Cc: Eryu Guan Subject: [PATCH] fstests: require scratch dev in tests using dm targets Date: Thu, 22 Sep 2016 17:05:53 +0800 Message-Id: <1474535153-15183-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 22 Sep 2016 09:06:06 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We build dm device on top of scratch dev so we require $SCRATCH_DEV to be a valid block device in _require_dm_target(). And we need to _require_scratch before _require_dm_target, otherwise test fails if there's no SCRATCH_DEV defined, where it should _notrun. +Usage: _require_block_device So add _require_scratch_nocheck to generic/347 (we do the fs check on thinp device), move _require_scratch before _require_dm_target in xfs/006 and xfs/264. Signed-off-by: Eryu Guan Reviewed-by: Dave Chinner --- tests/generic/347 | 1 + tests/xfs/006 | 2 +- tests/xfs/264 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/generic/347 b/tests/generic/347 index 7e6b5e6..3adc674 100755 --- a/tests/generic/347 +++ b/tests/generic/347 @@ -70,6 +70,7 @@ _workout() _supported_fs generic _supported_os Linux +_require_scratch_nocheck _require_dm_target thin-pool _setup_thin diff --git a/tests/xfs/006 b/tests/xfs/006 index d8674f4..982a161 100755 --- a/tests/xfs/006 +++ b/tests/xfs/006 @@ -49,8 +49,8 @@ rm -f $seqres.full # real QA test starts here _supported_fs xfs _supported_os Linux -_require_dm_target error _require_scratch +_require_dm_target error _require_fs_sysfs error/fail_at_unmount _scratch_mkfs > $seqres.full 2>&1 diff --git a/tests/xfs/264 b/tests/xfs/264 index d3e920c..245b0ad 100755 --- a/tests/xfs/264 +++ b/tests/xfs/264 @@ -49,8 +49,8 @@ rm -f $seqres.full # real QA test starts here _supported_fs xfs _supported_os Linux -_require_dm_target error _require_scratch +_require_dm_target error _require_fs_sysfs error/fail_at_unmount _require_fs_sysfs error/metadata/EIO/max_retries _require_fs_sysfs error/metadata/EIO/retry_timeout_seconds