summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2014-08-12 14:16:08 -0400
committerSteve Dickson <steved@redhat.com>2014-08-12 14:39:55 -0400
commitcff0e9f58c3d5dc652c2b3455f57b7e4d4332a52 (patch)
treef104bd4c5190f128a58658c26236e15bbef10d68
parent0bb61b7cd0066a317b952d1c524597a26ce4f66e (diff)
downloadcthon04-cff0e9f58c3d5dc652c2b3455f57b7e4d4332a52.tar.gz
cthon04-cff0e9f58c3d5dc652c2b3455f57b7e4d4332a52.tar.xz
cthon04-cff0e9f58c3d5dc652c2b3455f57b7e4d4332a52.zip
special: fix op_unlk and op_ren tests output
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--special/op_ren.c16
-rw-r--r--special/op_unlk.c8
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) {