Skip to content

Commit

Permalink
testsuite: cover module unload error
Browse files Browse the repository at this point in the history
Problem: the broker fails when a module is not unloaded, but
there are no tests that explicitly check for that.

Add a test to t0003-module.t and ensure that the error message
is appropriate and helpful.
  • Loading branch information
garlick committed Sep 16, 2023
1 parent e3a1173 commit 70e32c4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion t/t0003-module.t
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,16 @@ test_expect_success 'module: configuration object is cached' '
test_expect_success 'module: remove testmod if loaded' '
flux module remove -f testmod
'

test_expect_success 'module: load without unload causes broker failure' '
test_must_fail flux start \
-o,-Sbroker.rc1_path=,-Sbroker.rc3_path= \
flux module load content 2>nounload.err
'
test_expect_success 'module: socket leak is called out' '
grep "socket leak" nounload.err
'
test_expect_success 'module: leaked module name is called out' '
grep ".content. was not properly shut down" nounload.err
'

test_done

0 comments on commit 70e32c4

Please sign in to comment.