svn commit: samba r6869 - in branches/SAMBA_4_0/source/torture: .
tridge at samba.org
tridge at samba.org
Tue May 17 22:34:38 GMT 2005
Author: tridge
Date: 2005-05-17 22:34:38 +0000 (Tue, 17 May 2005)
New Revision: 6869
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6869
Log:
removed completely bogus BASE-RW2 test
Modified:
branches/SAMBA_4_0/source/torture/torture.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c 2005-05-17 21:46:16 UTC (rev 6868)
+++ branches/SAMBA_4_0/source/torture/torture.c 2005-05-17 22:34:38 UTC (rev 6869)
@@ -330,105 +330,7 @@
return ret;
}
-static BOOL rw_torture3(struct smbcli_state *c, const char *lockfname)
-{
- int fnum = -1;
- uint_t i = 0;
- uint8_t buf[131072];
- uint8_t buf_rd[131072];
- uint_t count;
- uint_t countprev = 0;
- ssize_t sent = 0;
- BOOL correct = True;
- for (i = 0; i < sizeof(buf); i += sizeof(uint32_t))
- {
- SIVAL(buf, i, random());
- }
-
- if (procnum == 0)
- {
- fnum = smbcli_open(c->tree, lockfname, O_RDWR | O_CREAT | O_EXCL,
- DENY_NONE);
- if (fnum == -1) {
- printf("first open read/write of %s failed (%s)\n",
- lockfname, smbcli_errstr(c->tree));
- return False;
- }
- }
- else
- {
- for (i = 0; i < 500 && fnum == -1; i++)
- {
- fnum = smbcli_open(c->tree, lockfname, O_RDONLY,
- DENY_NONE);
- msleep(10);
- }
- if (fnum == -1) {
- printf("second open read-only of %s failed (%s)\n",
- lockfname, smbcli_errstr(c->tree));
- return False;
- }
- }
-
- i = 0;
- for (count = 0; count < sizeof(buf); count += sent)
- {
- if (count >= countprev) {
- printf("%d %8d\r", i, count);
- fflush(stdout);
- i++;
- countprev += (sizeof(buf) / 20);
- }
-
- if (procnum == 0)
- {
- sent = ((uint_t)random()%(20))+ 1;
- if (sent > sizeof(buf) - count)
- {
- sent = sizeof(buf) - count;
- }
-
- if (smbcli_write(c->tree, fnum, 0, buf+count, count, (size_t)sent) != sent) {
- printf("write failed (%s)\n", smbcli_errstr(c->tree));
- correct = False;
- }
- }
- else
- {
- sent = smbcli_read(c->tree, fnum, buf_rd+count, count,
- sizeof(buf)-count);
- if (sent < 0)
- {
- printf("read failed offset:%d size:%d (%s)\n",
- count, sizeof(buf)-count,
- smbcli_errstr(c->tree));
- correct = False;
- sent = 0;
- }
- if (sent > 0)
- {
- if (memcmp(buf_rd+count, buf+count, sent) != 0)
- {
- printf("read/write compare failed\n");
- printf("offset: %d req %d recvd %d\n",
- count, sizeof(buf)-count, sent);
- correct = False;
- break;
- }
- }
- }
-
- }
-
- if (NT_STATUS_IS_ERR(smbcli_close(c->tree, fnum))) {
- printf("close failed (%s)\n", smbcli_errstr(c->tree));
- correct = False;
- }
-
- return correct;
-}
-
static BOOL rw_torture2(struct smbcli_state *c1, struct smbcli_state *c2)
{
const char *lockfname = "\\torture2.lck";
@@ -542,20 +444,6 @@
return (test1 && test2);
}
-static BOOL run_readwritemulti(struct smbcli_state *cli, int dummy)
-{
- BOOL test;
-
- test = rw_torture3(cli, "\\multitest.txt");
-
- if (!torture_close_connection(cli)) {
- test = False;
- }
-
- return test;
-}
-
-
/*
this checks to see if a secondary tconx can use open files from an
earlier tconx
@@ -2304,7 +2192,6 @@
{"BASE-TCONDEV", run_tcon_devtype_test, 0},
{"BASE-VUID", run_vuidtest, 0},
{"BASE-RW1", run_readwritetest, 0},
- {"BASE-RW2", NULL, run_readwritemulti},
{"BASE-OPEN", run_opentest, 0},
{"BASE-DEFER_OPEN", NULL, run_deferopen},
{"BASE-XCOPY", run_xcopy, 0},
More information about the samba-cvs
mailing list