diff --git a/src/cmd/flux-start.c b/src/cmd/flux-start.c index 7211f68ca3cd..c0496b350e60 100644 --- a/src/cmd/flux-start.c +++ b/src/cmd/flux-start.c @@ -208,6 +208,8 @@ int main (int argc, char *argv[]) status = exec_broker (command, len, broker_path); break; case BOOTSTRAP_SELFPMI: + if (!optparse_hasopt (ctx.opts, "size")) + log_msg_exit ("--size must be specified for --bootstrap=selfpmi"); status = start_session (command, len, broker_path); break; default: diff --git a/t/t0001-basic.t b/t/t0001-basic.t index 7bd96c460868..9e52f948c9e4 100755 --- a/t/t0001-basic.t +++ b/t/t0001-basic.t @@ -69,6 +69,9 @@ test_expect_success 'flux-start with size 2 has a peer' " test_expect_success 'flux-start --size=1 --bootstrap=selfpmi works' " flux start ${ARGS} --size=1 --bootstrap=selfpmi /bin/true " +test_expect_success 'flux-start --bootstrap=selfpmi fails (no size specified)' " + test_must_fail flux start ${ARGS} --bootstrap=selfpmi /bin/true +" test_expect_success 'flux-start --size=1 --boostrap=pmi fails' " test_must_fail flux start ${ARGS} --size=1 --bootstrap=pmi /bin/true "