From: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> To: Steve Dickson <SteveD-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Subject: [PATCH 2/5] Add SMB/CIFS mounts support Date: Wed, 6 Aug 2014 16:01:09 +0400 [thread overview] Message-ID: <1407326472-13853-3-git-send-email-pshilovsky@samba.org> (raw) In-Reply-To: <1407326472-13853-1-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> From: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Signed-off-by: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> --- basic/runtests | 8 +++++--- lock/runtests | 4 ++++ lock/tlock.c | 10 ++++++++-- server | 5 +++-- special/runtests.wrk | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/basic/runtests b/basic/runtests index 32e1d85..16b2402 100644 --- a/basic/runtests +++ b/basic/runtests @@ -37,10 +37,12 @@ echo "" # Setattr, getattr and lookup tests echo "" -./test4 $TESTARG +if [ "$CIFS" != "yes" ]; then + ./test4 $TESTARG # Getattr and lookup tests -# echo "" -# ./test4a $TESTARG +else + ./test4a $TESTARG +fi # Write and read tests echo "" diff --git a/lock/runtests b/lock/runtests index a25f101..006742e 100644 --- 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 6e19a3d..8c837a8 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 */ @@ -1600,7 +1603,7 @@ runtests() if (DO_MAND(9)) { test9(); } - if (DO_TEST(10)) { + if (DO_TEST(10) && DO_CIFS) { test10(); } if (DO_TEST(11)) { @@ -1637,8 +1640,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; diff --git a/server b/server index 0a76f33..439c96f 100755 --- a/server +++ b/server @@ -19,7 +19,7 @@ Program=`basename $0` InitFile="./tests.init" -USAGE="usage: $Program [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name" +USAGE="usage: $Program [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h|-C] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name" # defaults . $InitFile @@ -27,7 +27,7 @@ export PATH CFLAGS LIBS MOUNT UMOUNT MNTOPTIONS passes="1" -set - `getopt abcfglhm:N:no:p:st $*` +set - `getopt abcCfglhm:N:no:p:st $*` if [ $? != 0 ] then @@ -40,6 +40,7 @@ do -a|-b|-g|-s|-l) TEST=$c; shift ;; -f|-n|-t) TESTARG=$c; shift ;; -c) cachefs="yes"; shift ;; + -C) CIFS="yes"; export CIFS; shift ;; -h) HARDLINKS=n; export HARDLINKS; shift ;; -m) USRMNTPOINT=$2; shift; shift ;; -o) MNTOPTIONS=$2; export MNTOPTIONS; diff --git a/special/runtests.wrk b/special/runtests.wrk index 9543761..a941d33 100644 --- a/special/runtests.wrk +++ b/special/runtests.wrk @@ -64,7 +64,7 @@ echo "" echo "test holey file support" ./holey -if [ "$HARDLINKS"o != no ] +if [ "$HARDLINKS"o != no -a "$CIFS" != "yes" ] then echo "" echo "second check for lost reply on non-idempotent requests" -- 1.8.1.2
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Shilovsky <pshilovsky@samba.org> To: Steve Dickson <SteveD@redhat.com> Cc: linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, Jeff Layton <jlayton@samba.org>, Jeff Layton <jlayton@redhat.com> Subject: [PATCH 2/5] Add SMB/CIFS mounts support Date: Wed, 6 Aug 2014 16:01:09 +0400 [thread overview] Message-ID: <1407326472-13853-3-git-send-email-pshilovsky@samba.org> (raw) In-Reply-To: <1407326472-13853-1-git-send-email-pshilovsky@samba.org> From: Jeff Layton <jlayton@redhat.com> 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> --- basic/runtests | 8 +++++--- lock/runtests | 4 ++++ lock/tlock.c | 10 ++++++++-- server | 5 +++-- special/runtests.wrk | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/basic/runtests b/basic/runtests index 32e1d85..16b2402 100644 --- a/basic/runtests +++ b/basic/runtests @@ -37,10 +37,12 @@ echo "" # Setattr, getattr and lookup tests echo "" -./test4 $TESTARG +if [ "$CIFS" != "yes" ]; then + ./test4 $TESTARG # Getattr and lookup tests -# echo "" -# ./test4a $TESTARG +else + ./test4a $TESTARG +fi # Write and read tests echo "" diff --git a/lock/runtests b/lock/runtests index a25f101..006742e 100644 --- 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 6e19a3d..8c837a8 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 */ @@ -1600,7 +1603,7 @@ runtests() if (DO_MAND(9)) { test9(); } - if (DO_TEST(10)) { + if (DO_TEST(10) && DO_CIFS) { test10(); } if (DO_TEST(11)) { @@ -1637,8 +1640,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; diff --git a/server b/server index 0a76f33..439c96f 100755 --- a/server +++ b/server @@ -19,7 +19,7 @@ Program=`basename $0` InitFile="./tests.init" -USAGE="usage: $Program [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name" +USAGE="usage: $Program [-a|-b|-g|-s|-l|-c] [-f|-t|-n|-h|-C] [-o mnt_options] [-p server_path] [-m mntpoint] [-N passes] server_name" # defaults . $InitFile @@ -27,7 +27,7 @@ export PATH CFLAGS LIBS MOUNT UMOUNT MNTOPTIONS passes="1" -set - `getopt abcfglhm:N:no:p:st $*` +set - `getopt abcCfglhm:N:no:p:st $*` if [ $? != 0 ] then @@ -40,6 +40,7 @@ do -a|-b|-g|-s|-l) TEST=$c; shift ;; -f|-n|-t) TESTARG=$c; shift ;; -c) cachefs="yes"; shift ;; + -C) CIFS="yes"; export CIFS; shift ;; -h) HARDLINKS=n; export HARDLINKS; shift ;; -m) USRMNTPOINT=$2; shift; shift ;; -o) MNTOPTIONS=$2; export MNTOPTIONS; diff --git a/special/runtests.wrk b/special/runtests.wrk index 9543761..a941d33 100644 --- a/special/runtests.wrk +++ b/special/runtests.wrk @@ -64,7 +64,7 @@ echo "" echo "test holey file support" ./holey -if [ "$HARDLINKS"o != no ] +if [ "$HARDLINKS"o != no -a "$CIFS" != "yes" ] then echo "" echo "second check for lost reply on non-idempotent requests" -- 1.8.1.2
next prev parent reply other threads:[~2014-08-06 12:01 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky [not found] ` <1407326472-13853-1-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> 2014-08-06 12:01 ` [PATCH 1/5] tlock: munmap missed before close Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky [this message] 2014-08-06 12:01 ` [PATCH 2/5] Add SMB/CIFS mounts support Pavel Shilovsky 2014-08-06 12:01 ` [PATCH 3/5] Add capability to test SMB 2.0 and higher verions Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky 2014-08-06 12:01 ` [PATCH 4/5] Add SMB/CIFS section in tests.init Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky 2014-08-06 12:01 ` [PATCH 5/5] special: fix op_unlk and op_ren tests output Pavel Shilovsky 2014-08-06 12:01 ` Pavel Shilovsky [not found] ` <1407326472-13853-6-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> 2014-08-12 16:44 ` Steve Dickson 2014-08-12 16:44 ` Steve Dickson [not found] ` <53EA4450.1060900-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org> 2014-08-13 7:45 ` Pavel Shilovsky 2014-08-13 7:45 ` Pavel Shilovsky 2014-08-12 7:20 ` [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky 2014-08-12 7:20 ` Pavel Shilovsky [not found] ` <CAKywueQjWzfUCw0r=Nnx2ehaOOv++76iRV2HZwFKZZYr=SD84g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-08-12 10:57 ` Steve Dickson 2014-08-12 10:57 ` Steve Dickson 2014-08-12 18:21 ` Steve Dickson 2014-08-12 18:21 ` Steve Dickson
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=1407326472-13853-3-git-send-email-pshilovsky@samba.org \ --to=pshilovsky-eunubhrolfbytjvyw6ydsg@public.gmane.org \ --cc=SteveD-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \ --cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \ --cc=jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \ --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.