[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 3.4.2-ctdb-12-13-g5fb50b5
Michael Adam
obnox at samba.org
Tue Nov 24 16:22:57 MST 2009
The branch, v3-4-ctdb has been updated
via 5fb50b51268e80ce755116b1c62957f6069c3741 (commit)
via 18359910687a1981621f994971f7588929b9bc80 (commit)
from dd28b38220f1ed09f4af8caccca9246ea2c12eab (commit)
http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-4-ctdb
- Log -----------------------------------------------------------------
commit 5fb50b51268e80ce755116b1c62957f6069c3741
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Nov 24 10:36:52 2009 +0100
s3:dbwrap_torture: use timeval_current/timeval_elapsed instead of start_timer/end_timer
metze
commit 18359910687a1981621f994971f7588929b9bc80
Author: Michael Adam <obnox at samba.org>
Date: Tue Nov 24 11:43:56 2009 +0100
s3:fix the merged build of bin/smbtorture4
Michael
-----------------------------------------------------------------------
Summary of changes:
source3/torture/denytest.c | 2 +-
source3/torture/mangle_test.c | 2 +-
source3/torture/nbio.c | 2 +-
source3/torture/{torture.h => proto.h} | 0
source3/torture/scanner.c | 2 +-
source3/torture/torture.c | 2 +-
source3/torture/utable.c | 2 +-
source3/utils/dbwrap_torture.c | 19 +++----------------
8 files changed, 9 insertions(+), 22 deletions(-)
rename source3/torture/{torture.h => proto.h} (100%)
Changeset truncated at 500 lines:
diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c
index bee8cc0..da467df 100644
--- a/source3/torture/denytest.c
+++ b/source3/torture/denytest.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "torture.h"
+#include "torture/proto.h"
extern bool torture_showall;
diff --git a/source3/torture/mangle_test.c b/source3/torture/mangle_test.c
index 3ce866b..0b0cd8f 100644
--- a/source3/torture/mangle_test.c
+++ b/source3/torture/mangle_test.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "torture.h"
+#include "torture/proto.h"
extern int torture_numops;
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 3414f2d..227a2c2 100644
--- a/source3/torture/nbio.c
+++ b/source3/torture/nbio.c
@@ -20,7 +20,7 @@
*/
#include "includes.h"
-#include "torture.h"
+#include "torture/proto.h"
#define MAX_FILES 1000
diff --git a/source3/torture/torture.h b/source3/torture/proto.h
similarity index 100%
rename from source3/torture/torture.h
rename to source3/torture/proto.h
diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c
index 2356685..9698b40 100644
--- a/source3/torture/scanner.c
+++ b/source3/torture/scanner.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "torture.h"
+#include "torture/proto.h"
#define VERBOSE 0
#define OP_MIN 0
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 96dcdd6..92ebfe4 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -19,7 +19,7 @@
#include "includes.h"
#include "wbc_async.h"
-#include "torture.h"
+#include "torture/proto.h"
extern char *optarg;
extern int optind;
diff --git a/source3/torture/utable.c b/source3/torture/utable.c
index 69b79cf..2ea6563 100644
--- a/source3/torture/utable.c
+++ b/source3/torture/utable.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "torture.h"
+#include "torture/proto.h"
bool torture_utable(int dummy)
{
diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c
index 2077eea..a6e2d2b 100644
--- a/source3/utils/dbwrap_torture.c
+++ b/source3/utils/dbwrap_torture.c
@@ -33,20 +33,6 @@
extern bool AllowDebugChange;
-static struct timeval tp1,tp2;
-
-static void start_timer(void)
-{
- gettimeofday(&tp1,NULL);
-}
-
-static double end_timer(void)
-{
- gettimeofday(&tp2,NULL);
- return (tp2.tv_sec + (tp2.tv_usec*1.0e-6)) -
- (tp1.tv_sec + (tp1.tv_usec*1.0e-6));
-}
-
#define DEFAULT_DB_NAME "transaction.tdb"
static int timelimit = 10;
@@ -138,12 +124,13 @@ static void test_store_records(struct db_context *db, struct tevent_context *ev)
TDB_DATA key;
uint32_t *counters;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
+ struct timeval start;
key.dptr = (unsigned char *)discard_const("testkey");
key.dsize = strlen((const char *)key.dptr)+1;
- start_timer();
- while ((timelimit == 0) || (end_timer() < timelimit)) {
+ start = timeval_current();
+ while ((timelimit == 0) || (timeval_elapsed(&start) < timelimit)) {
struct db_record *rec;
TDB_DATA data;
int ret;
--
SAMBA-CTDB repository
More information about the samba-cvs
mailing list