tests: eliminate a floating point exception by requiring -n option to ctdb_bench
[metze/ctdb/wip.git] / 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 */