svn commit: samba r21139 - in
branches/SAMBA_4_0/source/torture/raw: .
tridge at samba.org
tridge at samba.org
Mon Feb 5 03:04:02 GMT 2007
Author: tridge
Date: 2007-02-05 03:04:01 +0000 (Mon, 05 Feb 2007)
New Revision: 21139
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21139
Log:
make the RAW-MUX test fail if the locking subsystem doesn't trigger
early byte range lock retries (ie. PENDING locks in brlock)
Modified:
branches/SAMBA_4_0/source/torture/raw/mux.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/mux.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/mux.c 2007-02-04 23:39:08 UTC (rev 21138)
+++ branches/SAMBA_4_0/source/torture/raw/mux.c 2007-02-05 03:04:01 UTC (rev 21139)
@@ -206,6 +206,7 @@
BOOL ret = True;
struct smbcli_request *req;
struct smb_lock_entry lock[1];
+ struct timeval t;
printf("TESTING MULTIPLEXED LOCK/LOCK/UNLOCK\n");
@@ -238,6 +239,7 @@
CHECK_STATUS(status, NT_STATUS_FILE_LOCK_CONFLICT);
printf("this will too, but we'll unlock while waiting\n");
+ t = timeval_current();
req = smb_raw_lock_send(cli->tree, &io);
printf("unlock the first range\n");
@@ -252,6 +254,12 @@
status = smbcli_request_simple_recv(req);
CHECK_STATUS(status, NT_STATUS_OK);
+ printf("async lock took %.2f msec\n", timeval_elapsed(&t) * 1000);
+ if (timeval_elapsed(&t) > 0.1) {
+ printf("failed to trigger early lock retry\n");
+ return False;
+ }
+
printf("reopening with an exit\n");
smb_raw_exit(cli->session);
fnum = smbcli_open(cli->tree, BASEDIR "\\write.dat", O_RDWR | O_CREAT, DENY_NONE);
More information about the samba-cvs
mailing list