Skip to content

Commit

Permalink
Merge pull request #1168 from chu11/issue1026
Browse files Browse the repository at this point in the history
cmd/flux-start: Add input error check
  • Loading branch information
garlick authored Aug 29, 2017
2 parents a52a9c2 + dbbc9da commit 0c87cfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/flux-start.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions t/t0001-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -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
"
Expand Down

0 comments on commit 0c87cfa

Please sign in to comment.