Skip to content

Commit dfbca80

Browse files
committed
testsuite: add shutdown to test personalities
Problem: test "personalites" like "job" and "kvs" select alternate rc1 and rc3 scripts, but not shutdown. Require that a personality define a shutdown script even if empty, and add them for "job" and "kvs".
1 parent 491e06b commit dfbca80

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

t/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ EXTRA_DIST= \
303303
rc/rc1-job \
304304
rc/rc3-kvs \
305305
rc/rc3-job \
306+
rc/shutdown-kvs \
307+
rc/shutdown-job \
306308
shell/input \
307309
shell/output \
308310
shell/initrc/tests \

t/rc/rc1-job

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,3 @@ if [ $RANK -eq 0 ]
6666
then
6767
flux module debug --setbit 0x2 sched-simple
6868
fi
69-
70-
test $RANK -ne 0 || flux admin cleanup-push <<-EOT
71-
flux queue stop --all --nocheckpoint
72-
flux cancel --all --states RUN
73-
flux queue idle
74-
EOT

t/rc/shutdown-job

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
flux queue stop --quiet --all --nocheckpoint
4+
flux cancel --user=all --quiet --states RUN
5+
flux queue idle --quiet

t/rc/shutdown-kvs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/sh

t/sharness.d/flux-sharness.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ test_under_flux() {
222222
if test "$personality" = "minimal"; then
223223
RC1_PATH=""
224224
RC3_PATH=""
225+
SHUTDOWN_PATH=""
225226
elif test "$personality" = "system"; then
226227
# Pre-create broker rundir so we know it in advance and
227228
# make_bootstrap_config() can use it for ipc:// socket paths.
@@ -234,11 +235,14 @@ test_under_flux() {
234235
unset root
235236
elif test "$personality" != "full"; then
236237
RC1_PATH=$FLUX_SOURCE_DIR/t/rc/rc1-$personality
238+
SHUTDOWN_PATH=$FLUX_SOURCE_DIR/t/rc/shutdown-$personality
237239
RC3_PATH=$FLUX_SOURCE_DIR/t/rc/rc3-$personality
238240
test -x $RC1_PATH || error "cannot execute $RC1_PATH"
241+
test -x $SHUTDOWN_PATH || error "cannot execute $SHUTDOWN_PATH"
239242
test -x $RC3_PATH || error "cannot execute $RC3_PATH"
240243
else
241244
unset RC1_PATH
245+
unset SHUTDOWN_PATH
242246
unset RC3_PATH
243247
fi
244248

@@ -267,6 +271,7 @@ test_under_flux() {
267271
${BROKER_RUNDIR+--test-rundir=${BROKER_RUNDIR}} \
268272
${BROKER_RUNDIR+--test-rundir-cleanup} \
269273
${RC1_PATH+-o -Sbroker.rc1_path=${RC1_PATH}} \
274+
${SHUTDOWN_PATH+-o -Sbroker.shutdown_path=${SHUTDOWN_PATH}} \
270275
${RC3_PATH+-o -Sbroker.rc3_path=${RC3_PATH}} \
271276
${sysopts} \
272277
${logopts} \

0 commit comments

Comments
 (0)