svn commit: samba r23139 - in
branches/SAMBA_4_0/source/torture/raw: .
tridge at samba.org
tridge at samba.org
Fri May 25 10:43:07 GMT 2007
Author: tridge
Date: 2007-05-25 10:43:06 +0000 (Fri, 25 May 2007)
New Revision: 23139
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23139
Log:
use echo operations once a second in lockbench and openbench to ensure
we detect IP takeover on servers
Modified:
branches/SAMBA_4_0/source/torture/raw/lockbench.c
branches/SAMBA_4_0/source/torture/raw/openbench.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/lockbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/lockbench.c 2007-05-25 10:42:29 UTC (rev 23138)
+++ branches/SAMBA_4_0/source/torture/raw/lockbench.c 2007-05-25 10:43:06 UTC (rev 23139)
@@ -257,6 +257,16 @@
printf("\r");
fflush(stdout);
event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+
+ /* send an echo on each interface to ensure it stays alive - this helps
+ with IP takeover */
+ for (i=0;i<nprocs;i++) {
+ struct smb_echo p;
+ p.in.repeat_count = 0;
+ p.in.size = 0;
+ p.in.data = NULL;
+ smb_raw_echo_send(state[i].tree->session->transport, &p);
+ }
}
/*
Modified: branches/SAMBA_4_0/source/torture/raw/openbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/openbench.c 2007-05-25 10:42:29 UTC (rev 23138)
+++ branches/SAMBA_4_0/source/torture/raw/openbench.c 2007-05-25 10:43:06 UTC (rev 23139)
@@ -297,6 +297,16 @@
printf("\r");
fflush(stdout);
event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
+
+ /* send an echo on each interface to ensure it stays alive - this helps
+ with IP takeover */
+ for (i=0;i<nprocs;i++) {
+ struct smb_echo p;
+ p.in.repeat_count = 0;
+ p.in.size = 0;
+ p.in.data = NULL;
+ smb_raw_echo_send(state[i].tree->session->transport, &p);
+ }
}
/*
@@ -355,6 +365,7 @@
state[i].fnum = smbcli_open(state[i].tree,
fnames[state->file_num],
O_RDWR|O_CREAT, DENY_ALL);
+ state[i].old_fnum = state[i].fnum;
state[i].stage = OPEN_OPEN;
next_operation(&state[i]);
}
More information about the samba-cvs
mailing list