Skip to content

Commit 6f4c1b9

Browse files
committed
testsuite: cover subprocess kill error code
Problem: there is no test coverage the ensures a subprocess kill RPC fails with ESRCH when the pid cannot be found. Add a test to t0005-rexec.t.
1 parent 764327c commit 6f4c1b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

t/t0005-rexec.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,9 @@ test_expect_success NO_CHAIN_LINT 'ps, kill fail remotely on rank 0' '
278278
wait_rexec_process_count 0 0
279279
'
280280

281+
test_expect_success NO_CHAIN_LINT 'kill fails with ESRCH when pid is unknown' '
282+
test_must_fail $rexec_script kill 15 12345678 2>kill.err &&
283+
grep "No such process" kill.err
284+
'
285+
281286
test_done

0 commit comments

Comments
 (0)