All of lore.kernel.org
 help / color / mirror / Atom feed
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>
Subject: [PATCH 5/5] special: fix op_unlk and op_ren tests output
Date: Wed,  6 Aug 2014 16:01:12 +0400	[thread overview]
Message-ID: <1407326472-13853-6-git-send-email-pshilovsky@samba.org> (raw)
In-Reply-To: <1407326472-13853-1-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

Signed-off-by: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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>
Subject: [PATCH 5/5] special: fix op_unlk and op_ren tests output
Date: Wed,  6 Aug 2014 16:01:12 +0400	[thread overview]
Message-ID: <1407326472-13853-6-git-send-email-pshilovsky@samba.org> (raw)
In-Reply-To: <1407326472-13853-1-git-send-email-pshilovsky@samba.org>

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


  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   ` [PATCH 2/5] Add SMB/CIFS mounts support 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
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   ` Pavel Shilovsky [this message]
2014-08-06 12:01     ` [PATCH 5/5] special: fix op_unlk and op_ren tests output 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-6-git-send-email-pshilovsky@samba.org \
    --to=pshilovsky-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=SteveD-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: link
Be 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.