linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite
@ 2014-08-06 12:01 Pavel Shilovsky
  2014-08-06 12:01 ` [PATCH 1/5] tlock: munmap missed before close Pavel Shilovsky
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton

The goal of the series is to add support of testing various versions of SMB/CIFS protocol without Unix extensions. Also there are two patches that fixes problems in special and tlock tests.

With the patchset applied nounix SMB/CIFS servers and clients can be tested with "server -C" command.

Jeff Layton (2):
  tlock: munmap missed before close
  Add SMB/CIFS mounts support

Pavel Shilovsky (3):
  Add capability to test SMB 2.0 and higher verions
  Add SMB/CIFS section in tests.init
  special: fix op_unlk and op_ren tests output

 basic/runtests       |  8 +++++---
 lock/runtests        |  9 +++++++--
 lock/tlock.c         | 11 +++++++++--
 server               |  5 +++--
 special/op_ren.c     | 16 +++++++++++++---
 special/op_unlk.c    |  8 +++++---
 special/runtests.wrk | 11 ++++++++---
 tests.init           |  4 ++++
 8 files changed, 54 insertions(+), 18 deletions(-)

-- 
1.8.1.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/5] tlock: munmap missed before close
  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
  2014-08-06 12:01 ` [PATCH 2/5] Add SMB/CIFS mounts support Pavel Shilovsky
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton, Jeff Layton

From: Jeff Layton <jlayton@redhat.com>

test13 mmaps the testfile, but doesn't munmap it before returning.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
---
 lock/tlock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lock/tlock.c b/lock/tlock.c
index 39a6ad9..6e19a3d 100644
--- a/lock/tlock.c
+++ b/lock/tlock.c
@@ -1509,6 +1509,7 @@ test13()
 			FATAL);
 		test(13, 4, F_TLOCK, (off_t)mappedlen - 2, (off_t)END,
 			lock1err, WARN);
+		testmunmap();
 		close_testfile(DO_UNLINK);
 
 		childfree(0);
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/5] Add SMB/CIFS mounts support
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
  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 ` [PATCH 3/5] Add capability to test SMB 2.0 and higher verions Pavel Shilovsky
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton, Jeff Layton

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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/5] Add capability to test SMB 2.0 and higher verions
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
  2014-08-06 12:01 ` [PATCH 1/5] tlock: munmap missed before close Pavel Shilovsky
  2014-08-06 12:01 ` [PATCH 2/5] Add SMB/CIFS mounts support 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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton

Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
---
 lock/runtests        | 5 +++--
 special/runtests.wrk | 9 +++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lock/runtests b/lock/runtests
index 006742e..21b09a5 100644
--- a/lock/runtests
+++ b/lock/runtests
@@ -36,7 +36,7 @@ case $TESTARG in
 	-t)	TESTARGS="-r"	;;
 esac
 
-if echo "$mntopts" | grep vers=2 > /dev/null
+if [ "$CIFS" != "yes" ] && echo "$mntopts" | grep vers=2 > /dev/null
 then
 	TESTARGS="-v 2 $TESTARGS"
 fi
@@ -52,7 +52,8 @@ do
 		tlock)		echo 'Testing native pre-LFS locking';;
 		tlocklfs)	echo 'Testing native post-LFS locking';;
 		tlock64)
-			if echo "$mntopts" | grep vers=2 > /dev/null
+			if [ "$CIFS" != "yes" ] &&
+			   echo "$mntopts" | grep vers=2 > /dev/null
 			then
 			echo "64-bit locking not supported with NFS v2"
 				echo " "
diff --git a/special/runtests.wrk b/special/runtests.wrk
index a941d33..8f099fa 100644
--- a/special/runtests.wrk
+++ b/special/runtests.wrk
@@ -25,7 +25,12 @@ TMPDIR= ./op_unlk
 
 echo ""
 echo "check for proper open/rename operation"
-TMPDIR= ./op_ren
+if [ "$CIFS" = "yes" ] && echo $MNTOPTIONS | grep -E "vers=2|vers=3" > /dev/null
+then
+	echo "skipping test; not supported by SMB 2.0 and higher versions"
+else
+	TMPDIR= ./op_ren
+fi
 
 echo ""
 echo "check for proper open/chmod 0 operation"
@@ -93,7 +98,7 @@ echo "write/read" $size "MB file"
 
 echo ""
 echo "write/read at 2GB, 4GB edges"
-if echo $MNTOPTIONS | grep vers=2 > /dev/null
+if [ "$CIFS" != "yes" ] && echo $MNTOPTIONS | grep vers=2 > /dev/null
 then
 	echo "skipping test; not supported with v2"
 else
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/5] Add SMB/CIFS section in tests.init
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
                   ` (2 preceding siblings ...)
  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 5/5] special: fix op_unlk and op_ren tests output Pavel Shilovsky
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton

---
 tests.init | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests.init b/tests.init
index 4d16e1b..4b574fc 100644
--- a/tests.init
+++ b/tests.init
@@ -33,6 +33,10 @@ MOUNTCMD='./domount -o $MNTOPTIONS $SERVER\:$SERVPATH $MNTPOINT'
 #	DG/UX
 #MOUNTCMD='./domount -t nfs -o $MNTOPTIONS $SERVER\:$SERVPATH $MNTPOINT'
 
+# Use this mount command if using:
+#	SMB/CIFS
+#MOUNTCMD='./domount -t cifs -o $MNTOPTIONS //$SERVER/$SERVPATH $MNTPOINT'
+
 UMOUNTCMD='./domount -u $MNTPOINT'
 
 # Use the next two lines if using:
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/5] special: fix op_unlk and op_ren tests output
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
                   ` (3 preceding siblings ...)
  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-12 16:44   ` Steve Dickson
  2014-08-12  7:20 ` [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
  2014-08-12 18:21 ` Steve Dickson
  6 siblings, 1 reply; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-06 12:01 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, linux-nfs, Jeff Layton

Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
---
 special/op_ren.c  | 16 +++++++++++++---
 special/op_unlk.c |  8 +++++---
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/special/op_ren.c b/special/op_ren.c
index 348b4f9..93b02c5 100644
--- a/special/op_ren.c
+++ b/special/op_ren.c
@@ -32,6 +32,8 @@
 
 #define TBUFSIZ 100
 static char wbuf[TBUFSIZ], rbuf[TBUFSIZ];
+static char bufa[BUFSIZ];
+static char bufb[BUFSIZ];
 #define TMSG "This is a test message written to the target file\n"
 
 static void
@@ -120,13 +122,19 @@ main(argc, argv)
 #endif /* O_RDWR */
 
 	printf("nfsjunk files before rename:\n  ");
-	system("ls -al .nfs*");
+	sprintf(bufa, "ls -al %s", taname);
+	sprintf(bufb, "ls -al %s", tbname);
+	system(bufa);
+	printf("  ");
+	system(bufb);
 	ret = rename(taname, tbname);
 	printf("%s open; rename ret = %d\n", tbname, ret);
 	if (ret)
 		xxit(" unlink");
 	printf("nfsjunk files after rename:\n  ");
-	system("ls -al .nfs*");
+	system(bufa);
+	printf("  ");
+	system(bufb);
 	strcpy(wbuf, TMSG);
 	if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) {
 		fprintf(stderr, "write ret %d; expected %d\n", ret, TBUFSIZ);
@@ -165,7 +173,9 @@ main(argc, argv)
 	}
 
 	printf("nfsjunk files after close:\n  ");
-	system("ls -al .nfs*");
+	system(bufa);
+	printf("  ");
+	system(bufb);
 
 	if ((ret = close(fd)) == 0) {
 		errcount++;
diff --git a/special/op_unlk.c b/special/op_unlk.c
index 93a09b0..d92aa22 100644
--- a/special/op_unlk.c
+++ b/special/op_unlk.c
@@ -33,6 +33,7 @@
 
 #define TBUFSIZ 100
 static char wbuf[TBUFSIZ], rbuf[TBUFSIZ];
+static char buf[BUFSIZ];
 #define TMSG "This is a test message written to the unlinked file\n"
 
 static void
@@ -78,13 +79,14 @@ main(argc, argv)
 #ifndef WIN32
 	/* For WIN you can not delete the file if it is open */
 	printf("nfsjunk files before unlink:\n  ");
-	system("ls -al .nfs*");
+	sprintf(buf, "ls -al %s", tname);
+	system(buf);
 	ret = unlink(tname);
 	printf("%s open; unlink ret = %d\n", tname, ret);
 	if (ret)
 		xxit(" unlink");
 	printf("nfsjunk files after unlink:\n  ");
-	system("ls -al .nfs*");
+	system(buf);
 #endif
 	strcpy(wbuf, TMSG);
 	if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) {
@@ -137,7 +139,7 @@ main(argc, argv)
 
 #ifndef WIN32
 	printf("nfsjunk files after close:\n  ");
-	system("ls -al .nfs*");
+	system(buf);
 #endif
 
 	if ((ret = close(fd)) == 0) {
-- 
1.8.1.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
                   ` (4 preceding siblings ...)
  2014-08-06 12:01 ` [PATCH 5/5] special: fix op_unlk and op_ren tests output Pavel Shilovsky
@ 2014-08-12  7:20 ` Pavel Shilovsky
  2014-08-12 10:57   ` Steve Dickson
  2014-08-12 18:21 ` Steve Dickson
  6 siblings, 1 reply; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-12  7:20 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, Linux NFS Mailing list, Jeff Layton

2014-08-06 16:01 GMT+04:00 Pavel Shilovsky <pshilovsky@samba.org>:
> The goal of the series is to add support of testing various versions of SMB/CIFS protocol without Unix extensions. Also there are two patches that fixes problems in special and tlock tests.
>
> With the patchset applied nounix SMB/CIFS servers and clients can be tested with "server -C" command.
>
> Jeff Layton (2):
>   tlock: munmap missed before close
>   Add SMB/CIFS mounts support
>
> Pavel Shilovsky (3):
>   Add capability to test SMB 2.0 and higher verions
>   Add SMB/CIFS section in tests.init
>   special: fix op_unlk and op_ren tests output
>
>  basic/runtests       |  8 +++++---
>  lock/runtests        |  9 +++++++--
>  lock/tlock.c         | 11 +++++++++--
>  server               |  5 +++--
>  special/op_ren.c     | 16 +++++++++++++---
>  special/op_unlk.c    |  8 +++++---
>  special/runtests.wrk | 11 ++++++++---
>  tests.init           |  4 ++++
>  8 files changed, 54 insertions(+), 18 deletions(-)
>
> --
> 1.8.1.2
>

Any comments on this series?

-- 
Best regards,
Pavel Shilovsky.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite
  2014-08-12  7:20 ` [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
@ 2014-08-12 10:57   ` Steve Dickson
  0 siblings, 0 replies; 11+ messages in thread
From: Steve Dickson @ 2014-08-12 10:57 UTC (permalink / raw)
  To: Pavel Shilovsky; +Cc: linux-cifs, Linux NFS Mailing list, Jeff Layton



On 08/12/2014 03:20 AM, Pavel Shilovsky wrote:
> 2014-08-06 16:01 GMT+04:00 Pavel Shilovsky <pshilovsky@samba.org>:
>> The goal of the series is to add support of testing various versions of SMB/CIFS protocol without Unix extensions. Also there are two patches that fixes problems in special and tlock tests.
>>
>> With the patchset applied nounix SMB/CIFS servers and clients can be tested with "server -C" command.
>>
>> Jeff Layton (2):
>>   tlock: munmap missed before close
>>   Add SMB/CIFS mounts support
>>
>> Pavel Shilovsky (3):
>>   Add capability to test SMB 2.0 and higher verions
>>   Add SMB/CIFS section in tests.init
>>   special: fix op_unlk and op_ren tests output
>>
>>  basic/runtests       |  8 +++++---
>>  lock/runtests        |  9 +++++++--
>>  lock/tlock.c         | 11 +++++++++--
>>  server               |  5 +++--
>>  special/op_ren.c     | 16 +++++++++++++---
>>  special/op_unlk.c    |  8 +++++---
>>  special/runtests.wrk | 11 ++++++++---
>>  tests.init           |  4 ++++
>>  8 files changed, 54 insertions(+), 18 deletions(-)
>>
>> --
>> 1.8.1.2
>>
> 
> Any comments on this series?
> 
Yes... I took a look... They look fine... 
Its on my TODO list... 

thanks!

steved.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/5] special: fix op_unlk and op_ren tests output
  2014-08-06 12:01 ` [PATCH 5/5] special: fix op_unlk and op_ren tests output Pavel Shilovsky
@ 2014-08-12 16:44   ` Steve Dickson
  2014-08-13  7:45     ` Pavel Shilovsky
  0 siblings, 1 reply; 11+ messages in thread
From: Steve Dickson @ 2014-08-12 16:44 UTC (permalink / raw)
  To: Pavel Shilovsky; +Cc: linux-cifs, linux-nfs, Jeff Layton

Hello,

Just curious... what is wrong with the output of these
two tests? 

steved.

On 08/06/2014 08:01 AM, Pavel Shilovsky wrote:
> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
> ---
>  special/op_ren.c  | 16 +++++++++++++---
>  special/op_unlk.c |  8 +++++---
>  2 files changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/special/op_ren.c b/special/op_ren.c
> index 348b4f9..93b02c5 100644
> --- a/special/op_ren.c
> +++ b/special/op_ren.c
> @@ -32,6 +32,8 @@
>  
>  #define TBUFSIZ 100
>  static char wbuf[TBUFSIZ], rbuf[TBUFSIZ];
> +static char bufa[BUFSIZ];
> +static char bufb[BUFSIZ];
>  #define TMSG "This is a test message written to the target file\n"
>  
>  static void
> @@ -120,13 +122,19 @@ main(argc, argv)
>  #endif /* O_RDWR */
>  
>  	printf("nfsjunk files before rename:\n  ");
> -	system("ls -al .nfs*");
> +	sprintf(bufa, "ls -al %s", taname);
> +	sprintf(bufb, "ls -al %s", tbname);
> +	system(bufa);
> +	printf("  ");
> +	system(bufb);
>  	ret = rename(taname, tbname);
>  	printf("%s open; rename ret = %d\n", tbname, ret);
>  	if (ret)
>  		xxit(" unlink");
>  	printf("nfsjunk files after rename:\n  ");
> -	system("ls -al .nfs*");
> +	system(bufa);
> +	printf("  ");
> +	system(bufb);
>  	strcpy(wbuf, TMSG);
>  	if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) {
>  		fprintf(stderr, "write ret %d; expected %d\n", ret, TBUFSIZ);
> @@ -165,7 +173,9 @@ main(argc, argv)
>  	}
>  
>  	printf("nfsjunk files after close:\n  ");
> -	system("ls -al .nfs*");
> +	system(bufa);
> +	printf("  ");
> +	system(bufb);
>  
>  	if ((ret = close(fd)) == 0) {
>  		errcount++;
> diff --git a/special/op_unlk.c b/special/op_unlk.c
> index 93a09b0..d92aa22 100644
> --- a/special/op_unlk.c
> +++ b/special/op_unlk.c
> @@ -33,6 +33,7 @@
>  
>  #define TBUFSIZ 100
>  static char wbuf[TBUFSIZ], rbuf[TBUFSIZ];
> +static char buf[BUFSIZ];
>  #define TMSG "This is a test message written to the unlinked file\n"
>  
>  static void
> @@ -78,13 +79,14 @@ main(argc, argv)
>  #ifndef WIN32
>  	/* For WIN you can not delete the file if it is open */
>  	printf("nfsjunk files before unlink:\n  ");
> -	system("ls -al .nfs*");
> +	sprintf(buf, "ls -al %s", tname);
> +	system(buf);
>  	ret = unlink(tname);
>  	printf("%s open; unlink ret = %d\n", tname, ret);
>  	if (ret)
>  		xxit(" unlink");
>  	printf("nfsjunk files after unlink:\n  ");
> -	system("ls -al .nfs*");
> +	system(buf);
>  #endif
>  	strcpy(wbuf, TMSG);
>  	if ((ret = write(fd, wbuf, TBUFSIZ)) != TBUFSIZ) {
> @@ -137,7 +139,7 @@ main(argc, argv)
>  
>  #ifndef WIN32
>  	printf("nfsjunk files after close:\n  ");
> -	system("ls -al .nfs*");
> +	system(buf);
>  #endif
>  
>  	if ((ret = close(fd)) == 0) {
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite
  2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
                   ` (5 preceding siblings ...)
  2014-08-12  7:20 ` [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
@ 2014-08-12 18:21 ` Steve Dickson
  6 siblings, 0 replies; 11+ messages in thread
From: Steve Dickson @ 2014-08-12 18:21 UTC (permalink / raw)
  To: Pavel Shilovsky; +Cc: linux-cifs, linux-nfs, Jeff Layton



On 08/06/2014 08:01 AM, Pavel Shilovsky wrote:
> The goal of the series is to add support of testing various versions of SMB/CIFS protocol without Unix extensions. Also there are two patches that fixes problems in special and tlock tests.
> 
> With the patchset applied nounix SMB/CIFS servers and clients can be tested with "server -C" command.
> 
> Jeff Layton (2):
>   tlock: munmap missed before close
>   Add SMB/CIFS mounts support
> 
> Pavel Shilovsky (3):
>   Add capability to test SMB 2.0 and higher verions
>   Add SMB/CIFS section in tests.init
>   special: fix op_unlk and op_ren tests output
> 
>  basic/runtests       |  8 +++++---
>  lock/runtests        |  9 +++++++--
>  lock/tlock.c         | 11 +++++++++--
>  server               |  5 +++--
>  special/op_ren.c     | 16 +++++++++++++---
>  special/op_unlk.c    |  8 +++++---
>  special/runtests.wrk | 11 ++++++++---
>  tests.init           |  4 ++++
>  8 files changed, 54 insertions(+), 18 deletions(-)
> 
All five patches have been committed... 

steved.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 5/5] special: fix op_unlk and op_ren tests output
  2014-08-12 16:44   ` Steve Dickson
@ 2014-08-13  7:45     ` Pavel Shilovsky
  0 siblings, 0 replies; 11+ messages in thread
From: Pavel Shilovsky @ 2014-08-13  7:45 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-cifs, Linux NFS Mailing list, Jeff Layton

2014-08-12 20:44 GMT+04:00 Steve Dickson <SteveD@redhat.com>:
> Hello,
>
> Just curious... what is wrong with the output of these
> two tests?

These tests call 'ls' command for the path names that doesn't exists -
".nfs*". Previously we create file names through "tempnam(".",
"nfsa")" command and have "nfs*" style file names (without the first
dot symbol). So, the proposed patch fixes the output in the way we
already have in op_chmod.c.

-- 
Best regards,
Pavel Shilovsky.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-08-13  7:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-06 12:01 [PATCH 0/5] SMB/CIFS nounix support for Connectathon test suite Pavel Shilovsky
2014-08-06 12:01 ` [PATCH 1/5] tlock: munmap missed before close Pavel Shilovsky
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 ` [PATCH 4/5] Add SMB/CIFS section in tests.init Pavel Shilovsky
2014-08-06 12:01 ` [PATCH 5/5] special: fix op_unlk and op_ren tests output Pavel Shilovsky
2014-08-12 16:44   ` Steve Dickson
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 10:57   ` Steve Dickson
2014-08-12 18:21 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).