]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
- added a 1 node test
authorAndrew Tridgell <tridge@samba.org>
Thu, 30 Nov 2006 23:23:03 +0000 (10:23 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 30 Nov 2006 23:23:03 +0000 (10:23 +1100)
- only need 10 elements in test code, more just makes it hard to
  follow in a debugger

(This used to be ctdb commit 7df191112b10466a35a4ff130dade52a6c3c2646)

ctdb/ctdb_test.c
ctdb/tests/1node.txt [new file with mode: 0644]
ctdb/tests/test1.sh [new file with mode: 0755]

index 0d4df26f9f0b7600b99d632356106f5d5fe6b0c8..e6ccf339a08f409b274f49fe06d4a94d0bfdeade 100644 (file)
@@ -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 (file)
index 0000000..db4350c
--- /dev/null
@@ -0,0 +1 @@
+127.0.0.1:9001
diff --git a/ctdb/tests/test1.sh b/ctdb/tests/test1.sh
new file mode 100755 (executable)
index 0000000..c91899f
--- /dev/null
@@ -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