From patchwork Thu Oct 9 18:27:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 5060241 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E0C3EC11AC for ; Thu, 9 Oct 2014 18:27:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D6CC20200 for ; Thu, 9 Oct 2014 18:27:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 050DE20114 for ; Thu, 9 Oct 2014 18:27:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbaJIS1t (ORCPT ); Thu, 9 Oct 2014 14:27:49 -0400 Received: from mx12.netapp.com ([216.240.18.77]:31553 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbaJIS1t (ORCPT ); Thu, 9 Oct 2014 14:27:49 -0400 X-IronPort-AV: E=Sophos;i="5.04,686,1406617200"; d="scan'208";a="202329482" Received: from vmwexchts03-prd.hq.netapp.com ([10.122.105.31]) by mx12-out.netapp.com with ESMTP; 09 Oct 2014 11:27:48 -0700 Received: from smtp2.corp.netapp.com (10.57.159.114) by VMWEXCHTS03-PRD.hq.netapp.com (10.122.105.31) with Microsoft SMTP Server id 15.0.995.29; Thu, 9 Oct 2014 11:26:59 -0700 Received: from davros.com (davros.ocarinaproject.vpn.netapp.com [10.63.236.166]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id s99IRka9011460; Thu, 9 Oct 2014 11:27:47 -0700 (PDT) From: Anna Schumaker To: , CC: , , Subject: [PATCH] common: Re-enable testing over NFS Date: Thu, 9 Oct 2014 14:27:45 -0400 Message-ID: <1412879265-32385-1-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.1.2 MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 83ef157 (common: Check fs consistency on TEST_DEV only when needed) has _require_test unconditionally return _notrun when testing on an NFS filesystem, essentially disabling NFS. This patch changes the code to validate $TEST_DEV and only call _notrun if validation fails. Signed-off-by: Anna Schumaker --- common/rc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index 34d7c19..868007f 100644 --- a/common/rc +++ b/common/rc @@ -1086,8 +1086,14 @@ _require_test() { case "$FSTYP" in nfs*) - _notrun "requires a test device" - ;; + echo $TEST_DEV | grep -q ":/" > /dev/null 2>&1 + if [ -z "$TEST_DEV" -o "$?" != "0" ]; then + _notrun "this test requires a valid \$TEST_DIR" + fi + if [ ! -d "$TEST_DIR" ]; then + _notrun "this test requires a valid \$TEST_DIR" + fi + ;; cifs) echo $TEST_DEV | grep -q "//" > /dev/null 2>&1 if [ -z "$TEST_DEV" -o "$?" != "0" ]; then