From patchwork Mon Nov 10 10:59:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 5265391 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 050279F2ED for ; Mon, 10 Nov 2014 11:00:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1AE2E20172 for ; Mon, 10 Nov 2014 11:00:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F22C32015D for ; Mon, 10 Nov 2014 11:00:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbaKJLAv (ORCPT ); Mon, 10 Nov 2014 06:00:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbaKJLAv (ORCPT ); Mon, 10 Nov 2014 06:00:51 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAAB0ogH028058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Nov 2014 06:00:51 -0500 Received: from localhost (vpn1-115-42.nay.redhat.com [10.66.115.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAAB0nTB030594; Mon, 10 Nov 2014 06:00:50 -0500 From: Eryu Guan To: fstests@vger.kernel.org Cc: linux-cifs@vger.kernel.org, Eryu Guan Subject: [PATCH] common: enable tests that require scratch device on CIFS Date: Mon, 10 Nov 2014 18:59:51 +0800 Message-Id: <1415617191-17246-1-git-send-email-eguan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Just like commit 76c5f3c common: re-enable tests that require scratch dev on NFS Enable tests that require scratch device on CIFS too to get a better test coverage. Signed-off-by: Eryu Guan --- Tested with samba server on localhost, the results are Ran: generic/001 generic/002 generic/005 generic/006 generic/007 generic/010 generic/011 generic/013 generic/014 generic/023 generic/024 generic/028 generic/029 generic/035 generic/036 generic/053 generic/069 generic/074 generic/075 generic/088 generic/089 generic/091 generic/100 generic/105 generic/112 generic/113 generic/120 generic/123 generic/124 generic/125 generic/126 generic/127 generic/128 generic/129 generic/130 generic/131 generic/132 generic/133 generic/135 generic/141 generic/169 generic/184 generic/192 generic/193 generic/198 generic/207 generic/208 generic/209 generic/210 generic/211 generic/212 generic/215 generic/221 generic/236 generic/237 generic/239 generic/241 generic/245 generic/246 generic/247 generic/248 generic/249 generic/257 generic/258 generic/263 generic/285 generic/286 generic/294 generic/306 generic/307 generic/308 generic/309 generic/310 generic/313 generic/314 generic/315 generic/317 generic/318 generic/319 generic/323 Not run: generic/003 generic/004 generic/008 generic/009 generic/012 generic/015 generic/016 generic/017 generic/018 generic/019 generic/020 generic/021 generic/022 generic/025 generic/026 generic/027 generic/030 generic/031 generic/032 generic/033 generic/034 generic/037 generic/062 generic/068 generic/070 generic/076 generic/077 generic/079 generic/083 generic/093 generic/097 generic/099 generic/117 generic/204 generic/213 generic/214 generic/219 generic/223 generic/224 generic/225 generic/226 generic/228 generic/230 generic/231 generic/232 generic/233 generic/234 generic/235 generic/240 generic/251 generic/255 generic/256 generic/260 generic/269 generic/270 generic/273 generic/274 generic/275 generic/277 generic/280 generic/288 generic/299 generic/300 generic/311 generic/312 generic/316 generic/320 generic/321 generic/322 generic/324 generic/325 shared/006 shared/032 shared/051 shared/272 shared/289 shared/298 Failures: generic/035 generic/074 generic/120 generic/184 generic/192 generic/193 generic/215 generic/237 generic/258 generic/294 generic/306 generic/307 generic/313 generic/317 generic/319 Failed 15 of 80 tests I haven't looked into the failures and filtered out unnecessary failures yet. common/rc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index d5e3aff..435f74f 100644 --- a/common/rc +++ b/common/rc @@ -571,7 +571,9 @@ _scratch_mkfs() _scratch_cleanup_files ;; cifs) - # do nothing for cifs + # unable to re-create CIFS, just remove all files in $SCRATCH_MNT to + # avoid EEXIST caused by the leftover files created in previous runs + _scratch_cleanup_files ;; udf) $MKFS_UDF_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null @@ -1053,7 +1055,13 @@ _require_scratch_nocheck() fi ;; cifs) - _notrun "requires a scratch device" + echo $SCRATCH_DEV | grep -q "//" > /dev/null 2>&1 + if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then + _notrun "this test requires a valid \$SCRATCH_DEV" + fi + if [ ! -d "$SCRATCH_MNT" ]; then + _notrun "this test requires a valid \$SCRATCH_MNT" + fi ;; tmpfs) if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ];