tests: eliminate a floating point exception by requiring -n option to ctdb_bench
authorMichael Adam <obnox@samba.org>
Mon, 15 Mar 2010 15:34:43 +0000 (16:34 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 11 May 2010 09:29:45 +0000 (11:29 +0200)
Michael

tests/src/ctdb_bench.c

index 52e5b509a0b5437438b7b11065da86e3b23cdffd..453761d5a140e31e54e2d255b65d30f351e1d209 100644 (file)
@@ -214,6 +214,11 @@ int main(int argc, const char *argv[])
                while (extra_argv[extra_argc]) extra_argc++;
        }
 
+       if (num_nodes == 0) {
+               printf("You must specify the number of nodes\n");
+               exit(1);
+       }
+
        ev = event_context_init(NULL);
 
        /* initialise ctdb */