summaryrefslogtreecommitdiffstats
path: root/lock
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2014-08-12 12:06:25 -0400
committerSteve Dickson <steved@redhat.com>2014-08-12 14:39:55 -0400
commit99eb35e09db27e797fbb0c0a0ab385ed683b0f9b (patch)
tree834c2115fcd526e8d3e49339421fb4d598b9d3a0 /lock
parent7cad253f514968a860afc34ccd9cecb0efada7df (diff)
downloadcthon04-99eb35e09db27e797fbb0c0a0ab385ed683b0f9b.tar.gz
cthon04-99eb35e09db27e797fbb0c0a0ab385ed683b0f9b.tar.xz
cthon04-99eb35e09db27e797fbb0c0a0ab385ed683b0f9b.zip
Add SMB/CIFS mounts support
The connectathon tests are also useful for testing SMB/CIFS filesystems but when running without unix extensions, some tests are expected to fail. Add a "CIFS mode" that skips tests that are known to fail when running on CIFS filesystems without POSIX extensions. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'lock')
-rwxr-xr-xlock/runtests4
-rw-r--r--lock/tlock.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/lock/runtests b/lock/runtests
index a25f101..006742e 100755
--- a/lock/runtests
+++ b/lock/runtests
@@ -41,6 +41,10 @@ then
TESTARGS="-v 2 $TESTARGS"
fi
+if [ "$CIFS" = "yes" ]; then
+ TESTARGS="-c $TESTARGS"
+fi
+
for i in $LOCKTESTS
do
echo ""
diff --git a/lock/tlock.c b/lock/tlock.c
index 3e0375d..de26ae0 100644
--- a/lock/tlock.c
+++ b/lock/tlock.c
@@ -105,6 +105,8 @@ static off_t maxeof;
#define DO_TEST(n) ((testnum == 0) || (testnum == (n)))
#define DO_RATE(n) ((ratetest > 0) || (testnum == (n)))
#define DO_MAND(n) ((mandtest > 0) || (testnum == (n)))
+/* exclude stuff known to fail on CIFS w/o unix extensions */
+#define DO_CIFS (!cifstest)
#define DO_UNLINK 1
#define JUST_CLOSE 0
@@ -119,6 +121,7 @@ static off_t maxeof;
static int ratetest = 0;
static int ratecount = 1000; /* test 8 */
static int mandtest = 0;
+static int cifstest = 0;
static int iorate_kb = 256; /* test 14 */
static int iorate_count = 10; /* test 14 */
@@ -1594,7 +1597,7 @@ runtests()
if (DO_MAND(9)) {
test9();
}
- if (DO_TEST(10)) {
+ if (DO_TEST(10) && DO_CIFS) {
test10();
}
if (DO_TEST(11)) {
@@ -1631,8 +1634,11 @@ main(argc, argv)
passcnt = 1; /* default, test for 1 pass */
- while ((c = getopt(argc, argv, "p:t:rmv:w:")) != -1) {
+ while ((c = getopt(argc, argv, "cp:t:rmv:w:")) != -1) {
switch (c) {
+ case 'c':
+ cifstest++;
+ break;
case 'p':
sscanf(optarg, "%d", &passcnt);
break;