Skip to content

Commit

Permalink
testsuite: fix lingering processes after make check
Browse files Browse the repository at this point in the history
Problem: There are often a couple orphaned Flux instances that remain
after a run of `make -j N check`. The instances appear to be blocked
in rc3 with a sleep job in CLEANUP which can never exit because the
scheduler module has already been unloaded. The root cause of this
situation is unknown, but probably the affected tests can be improved
to reduce the probability of the issue.

The affected tests include t2800-jobs-recursive.t and t2802-uri-cmd.t,
each of which start a nested instance of one or more levels with
sleep jobs.

Attempt to terminate the affected batch jobs cleanly rather than
leaving it to the test instance rc3 script. This should reduce or
eliminate stray processes after running make check or the individual
test.
  • Loading branch information
grondo committed Mar 19, 2024
1 parent 2bfe617 commit 596a4cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/t2800-jobs-recursive.t
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,8 @@ test_expect_success 'flux jobs --json works with recursive jobs' '
test_expect_success FLUX_SECURITY 'cancel alternate user job' '
flux cancel $(cat altid)
'
test_expect_success 'cancel recursive job safely' '
flux proxy $rid flux cancel --all &&
flux job wait-event -vt 30 $rid clean
'
test_done
4 changes: 4 additions & 0 deletions t/t2802-uri-cmd.t
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ test_expect_success 'flux uri resolves hierarchical jobids with ?local' '
test_debug "echo ${jobid}/${jobid2}?local is ${uri}"
'
test_expect_success 'terminate batch job cleanly' '
flux proxy ${jobid} flux cancel --all &&
flux job wait-event -vt 30 ${jobid} clean
'
test_expect_success 'flux uri jobid returns error for non-instance job' '
id=$(flux submit sleep 600) &&
test_expect_code 1 flux uri $id
Expand Down

0 comments on commit 596a4cc

Please sign in to comment.