Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pavel Shilovsky <pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Subject: Re: [PATCH 5/5] special: fix op_unlk and op_ren tests output
Date: Tue, 12 Aug 2014 12:44:00 -0400	[thread overview]
Message-ID: <53EA4450.1060900@RedHat.com> (raw)
In-Reply-To: <1407326472-13853-6-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

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-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) {
> 
--
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

  parent reply	other threads:[~2014-08-12 16:44 UTC|newest]

Thread overview: 11+ 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
     [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   ` [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
     [not found]     ` <1407326472-13853-6-git-send-email-pshilovsky-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
2014-08-12 16:44       ` Steve Dickson [this message]
     [not found]         ` <53EA4450.1060900-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
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
     [not found]     ` <CAKywueQjWzfUCw0r=Nnx2ehaOOv++76iRV2HZwFKZZYr=SD84g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-12 10:57       ` 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=53EA4450.1060900@RedHat.com \
    --to=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 \
    --cc=pshilovsky-eUNUBHrolfbYtjvyW6yDsg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox