diff options
-rw-r--r-- | source3/utils/torture.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/utils/torture.c b/source3/utils/torture.c index 049a414eb9..c7fded6b3f 100644 --- a/source3/utils/torture.c +++ b/source3/utils/torture.c @@ -116,7 +116,8 @@ static BOOL rw_torture(struct cli_state *c, int numops) int fnum; int fnum2; int pid2, pid = getpid(); - int i; + int i, j; + char buf[1024]; fnum2 = cli_open(c, lockfname, O_RDWR | O_CREAT | O_EXCL, DENY_NONE); @@ -149,6 +150,14 @@ static BOOL rw_torture(struct cli_state *c, int numops) printf("write failed (%s)\n", cli_errstr(c)); } + for (j=0;j<50;j++) { + if (cli_write(c, fnum, (char *)buf, + sizeof(pid)+(j*sizeof(buf)), + sizeof(buf)) != sizeof(buf)) { + printf("write failed (%s)\n", cli_errstr(c)); + } + } + pid2 = 0; if (cli_read(c, fnum, (char *)&pid2, 0, sizeof(pid)) != sizeof(pid)) { |