From: Andrew Tridgell Date: Thu, 30 Nov 2006 23:23:03 +0000 (+1100) Subject: - added a 1 node test X-Git-Tag: tevent-0.9.20~348^2~3007 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e21f51b0592ca3ccd858f2c67d314fe28222d02;p=thirdparty%2Fsamba.git - added a 1 node test - only need 10 elements in test code, more just makes it hard to follow in a debugger (This used to be ctdb commit 7df191112b10466a35a4ff130dade52a6c3c2646) --- diff --git a/ctdb/ctdb_test.c b/ctdb/ctdb_test.c index 0d4df26f9f0..e6ccf339a08 100644 --- a/ctdb/ctdb_test.c +++ b/ctdb/ctdb_test.c @@ -169,7 +169,7 @@ int main(int argc, const char *argv[]) key.dsize = strlen("test")+1; /* add some random data */ - for (i=0;i<100;i++) { + for (i=0;i<10;i++) { int v = random() % 1000; data.dptr = (uint8_t *)&v; data.dsize = sizeof(v); @@ -191,7 +191,7 @@ int main(int argc, const char *argv[]) printf("%3d\n", ((int *)data.dptr)[i]); } talloc_free(data.dptr); - + /* shut it down */ talloc_free(ctdb); return 0; diff --git a/ctdb/tests/1node.txt b/ctdb/tests/1node.txt new file mode 100644 index 00000000000..db4350c0c07 --- /dev/null +++ b/ctdb/tests/1node.txt @@ -0,0 +1 @@ +127.0.0.1:9001 diff --git a/ctdb/tests/test1.sh b/ctdb/tests/test1.sh new file mode 100755 index 00000000000..c91899fb380 --- /dev/null +++ b/ctdb/tests/test1.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +killall -q ctdb_test +bin/ctdb_test --nlist tests/1node.txt --listen 127.0.0.1:9001 +killall ctdb_test