FS/XFS testing framework
 help / color / mirror / Atom feed
From: Pavel Shilovsky <pshilovsky@samba.org>
To: fstests@vger.kernel.org
Cc: linux-cifs@vger.kernel.org, samba-technical@samba.org,
	David Disseldorp <ddiss@suse.de>,
	Steve French <smfrench@gmail.com>
Subject: [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts
Date: Wed, 27 Aug 2014 00:28:38 +0400	[thread overview]
Message-ID: <1409084918-17764-4-git-send-email-pshilovsky@samba.org> (raw)
In-Reply-To: <1409084918-17764-1-git-send-email-pshilovsky@samba.org>

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 <smfrench@gmail.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
---
 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
 
-- 
1.9.1


  parent reply	other threads:[~2014-08-26 20:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 20:28 [PATCH v2 0/3] CIFS support for XFS test suite Pavel Shilovsky
2014-08-26 20:28 ` [PATCH v2 1/3] generic/013: encapsulate remount during cleanup Pavel Shilovsky
2014-08-28 17:08   ` Christoph Hellwig
2014-08-28 18:50     ` Pavel Shilovsky
2014-08-26 20:28 ` [PATCH v2 2/3] common: add cifs support Pavel Shilovsky
2014-08-28 17:18   ` Christoph Hellwig
2014-08-28 19:08     ` Pavel Shilovsky
2014-08-26 20:28 ` Pavel Shilovsky [this message]
2014-08-27 15:58   ` [PATCH v2 3/3] cifs: skip tests that need POSIX support for nounix mounts Christoph Hellwig
2014-08-27 16:17     ` Steve French
2014-08-27 19:49     ` Pavel Shilovsky
2014-08-27 22:50       ` Christoph Hellwig
2014-08-28  7:25         ` Pavel Shilovsky
2014-08-27  6:59 ` [PATCH v2 0/3] CIFS support for XFS test suite Pavel Shilovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409084918-17764-4-git-send-email-pshilovsky@samba.org \
    --to=pshilovsky@samba.org \
    --cc=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=samba-technical@samba.org \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox