From patchwork Tue Aug 26 20:28:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 4783871 Return-Path: X-Original-To: patchwork-cifs-client@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 B888B9F2E8 for ; Tue, 26 Aug 2014 20:29:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E422220176 for ; Tue, 26 Aug 2014 20:29:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1FE62015A for ; Tue, 26 Aug 2014 20:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753543AbaHZU3l (ORCPT ); Tue, 26 Aug 2014 16:29:41 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:46336 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbaHZU3k (ORCPT ); Tue, 26 Aug 2014 16:29:40 -0400 Received: by mail-la0-f54.google.com with SMTP id hz20so15742797lab.13 for ; Tue, 26 Aug 2014 13:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=wVnfptPsMYYtpGyNE/vStxtaRrTjDY/Qx+c4CMIcxE0=; b=L32R3VTJNs1ej0bR6j9UfUnEOhwX+mcBJ0d4MBX+svsmT2DCF6Zy+Q96X4s2vuDYoF FvIhvhhLX/IcNXx6cpnnuIlChu9lFqQzxlz5rcD5Eq2zx2Knnw+OpDztG/QZ+D9+4hyE PaUnAeZj/7J+H5S+QsxekVPAZHubm01IOr/IT6E06VZMDrW/8Ebfl6eXWINdX1Acp7pw JYXaOQRifg99WuT3Az16dNv4sDYBMxbSgVVoHcXLUau3Nnt3RSNE3DNUuVlphRbFpXQm QTHq+yQnwTQ3zrLLpt7JRDu/9NHzyxTszQiHWdZqzLTA26a/aVOXK+ZXHomqI7rwfNIH PS7A== X-Received: by 10.153.11.162 with SMTP id ej2mr29485530lad.15.1409084979033; Tue, 26 Aug 2014 13:29:39 -0700 (PDT) Received: from localhost.localdomain ([92.43.3.63]) by mx.google.com with ESMTPSA id n11sm6837126lbl.13.2014.08.26.13.29.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Aug 2014 13:29:38 -0700 (PDT) From: Pavel Shilovsky To: fstests@vger.kernel.org Cc: linux-cifs@vger.kernel.org, samba-technical@samba.org, David Disseldorp , Steve French Subject: [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts Date: Wed, 27 Aug 2014 00:28:38 +0400 Message-Id: <1409084918-17764-4-git-send-email-pshilovsky@samba.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409084918-17764-1-git-send-email-pshilovsky@samba.org> References: <1409084918-17764-1-git-send-email-pshilovsky@samba.org> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 CIFS/SMB protocol without POSIX extensions doesn't support operations with symbolic links and advisory byte-range locks from the same process. Add a check for nounix mounts and use it in generic tests that require such operations. Reviewed-by: Steve French Signed-off-by: Pavel Shilovsky --- common/rc | 7 +++++++ tests/generic/005 | 1 + tests/generic/023 | 1 + tests/generic/024 | 1 + tests/generic/025 | 1 + tests/generic/131 | 1 + 6 files changed, 12 insertions(+) diff --git a/common/rc b/common/rc index 8b427fc..191f7ff 100644 --- a/common/rc +++ b/common/rc @@ -2374,6 +2374,13 @@ _require_btrfs_fs_feature() _notrun "Feature $feat not supported by the available btrfs version" } +_require_test_posix_ext() +{ + [ "$FSTYP" != "cifs" ] && return 0 + cat /proc/mounts | grep $TEST_DEV | grep cifs | grep -q nounix && \ + _notrun "Require POSIX extensions enabled" +} + _get_total_inode() { if [ -z "$1" ]; then diff --git a/tests/generic/005 b/tests/generic/005 index d78e43f..0c2b51f 100755 --- a/tests/generic/005 +++ b/tests/generic/005 @@ -67,6 +67,7 @@ _touch() # real QA test starts here _supported_fs generic _require_test +_require_test_posix_ext # IRIX UDF does not support symlinks if [ $FSTYP == 'udf' ]; then diff --git a/tests/generic/023 b/tests/generic/023 index 114485c..91b8a37 100755 --- a/tests/generic/023 +++ b/tests/generic/023 @@ -45,6 +45,7 @@ _supported_os Linux _require_test _requires_renameat2 +_require_test_posix_ext # real QA test starts here diff --git a/tests/generic/024 b/tests/generic/024 index 8945191..1248e78 100755 --- a/tests/generic/024 +++ b/tests/generic/024 @@ -45,6 +45,7 @@ _supported_os Linux _require_test _requires_renameat2 +_require_test_posix_ext rename_dir=$TEST_DIR/$$ mkdir $rename_dir diff --git a/tests/generic/025 b/tests/generic/025 index 6b6c8ab..d06136c 100755 --- a/tests/generic/025 +++ b/tests/generic/025 @@ -45,6 +45,7 @@ _supported_os Linux _require_test _requires_renameat2 +_require_test_posix_ext rename_dir=$TEST_DIR/$$ mkdir $rename_dir diff --git a/tests/generic/131 b/tests/generic/131 index b4e3ff0..9736963 100755 --- a/tests/generic/131 +++ b/tests/generic/131 @@ -45,6 +45,7 @@ _cleanup() _supported_fs generic _supported_os Linux _require_test +_require_test_posix_ext TESTFILE=$TEST_DIR/lock_file