From fc9065b3606cbe1b11fe009b117195abbcf07fad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 12 Apr 1998 02:53:17 +0000 Subject: some hacks to the torture code (This used to be commit 02786747ee6774f617d95b08a5c5912bf86e7586) --- source3/utils/torture.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/utils') 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)) { -- cgit