Skip to content

Commit

Permalink
testsuite: use flux-module reload where possible
Browse files Browse the repository at this point in the history
Switch tests that remove/load modules to `flux module reload`
  • Loading branch information
grondo committed Feb 12, 2020
1 parent ba95f90 commit ebfcade
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 35 deletions.
7 changes: 2 additions & 5 deletions t/t0015-cron.t
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,8 @@ test_expect_success 'flux-cron can set stop-on-failure' '
'

## Reload cron module with sync enabled
test_expect_success 'flux module remove cron' '
flux module remove cron
'
test_expect_success 'module load with sync' '
flux module load cron sync=cron.sync sync_epsilon=0.025
test_expect_success 'module reload with sync' '
flux module reload cron sync=cron.sync sync_epsilon=0.025
'
test_expect_success 'sync and sync_epsilon are set as expected' '
flux cron sync | grep "cron\.sync.*epsilon=0.025"
Expand Down
3 changes: 1 addition & 2 deletions t/t1003-kvs-stress.t
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ test_expect_success 'kvs: test that KVS_NO_MERGE works with kvs_commit()' '
# transaction-merge option test
test_expect_success 'kvs: transaction-merge disabling works' '
THREADS=64 &&
flux module remove kvs &&
flux module load kvs transaction-merge=0 &&
flux module reload kvs transaction-merge=0 &&
OUTPUT=`${FLUX_BUILD_DIR}/t/kvs/transactionmerge ${THREADS} $(basename ${SHARNESS_TEST_FILE})` &&
test "$OUTPUT" = "${THREADS}"
'
Expand Down
12 changes: 4 additions & 8 deletions t/t2200-job-ingest.t
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ test_expect_success 'submit request with empty payload fails with EPROTO(71)' '
'

test_expect_success 'job-ingest: test validator with version 1 enforced' '
flux exec -r all flux module remove job-ingest &&
flux exec -r all flux module load job-ingest \
flux exec -r all flux module reload job-ingest \
validator=${BINDINGS_VALIDATOR} validator-args="--require-version,1"
'

Expand All @@ -162,8 +161,7 @@ test_expect_success 'job-ingest: v1 jobspecs accepted with v1 requirement' '
'

test_expect_success 'job-ingest: test non-python validator' '
flux exec -r all flux module remove job-ingest &&
flux exec -r all flux module load job-ingest \
flux exec -r all flux module reload job-ingest \
validator=${FAKE_VALIDATOR}
'

Expand All @@ -172,8 +170,7 @@ test_expect_success 'job-ingest: submit succeeds with non-python validator' '
'

test_expect_success 'job-ingest: test python jsonschema validator' '
flux exec -r all flux module remove job-ingest &&
flux exec -r all flux module load job-ingest \
flux exec -r all flux module reload job-ingest \
validator=${JSONSCHEMA_VALIDATOR} validator-args=--schema,${SCHEMA}
'

Expand All @@ -190,8 +187,7 @@ test_expect_success 'job-ingest: invalid jobs rejected by jsonschema validator'
'

test_expect_success 'job-ingest: validator unexpected exit is handled' '
flux exec -r all flux module remove job-ingest &&
flux exec -r all flux module load job-ingest \
flux exec -r all flux module reload job-ingest \
validator=${BAD_VALIDATOR} &&
test_must_fail flux job submit basic.json 2>badvalidator.out &&
grep "unexpectedly exited" badvalidator.out
Expand Down
6 changes: 2 additions & 4 deletions t/t2202-job-manager.t
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ test_expect_success 'job-manager: that job is now the first job' '
'

test_expect_success 'job-manager: reload the job manager' '
flux module remove job-manager &&
flux module load job-manager
flux module reload job-manager
'

test_expect_success 'job-manager: queue was successfully reconstructed' '
Expand Down Expand Up @@ -229,8 +228,7 @@ test_expect_success 'job-manager: no jobs in the queue' '
'

test_expect_success 'job-manager: reload the job manager' '
flux module remove job-manager &&
flux module load job-manager
flux module reload job-manager
'

test_expect_success 'job-manager: still no jobs in the queue' '
Expand Down
3 changes: 1 addition & 2 deletions t/t2203-job-manager-dummysched.t
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ test_expect_success 'job-manager: canceled job has exception, free events' '

test_expect_success 'job-manager: reload sched-dummy --cores=4' '
flux dmesg -C &&
flux module remove sched-dummy &&
flux module load ${SCHED_DUMMY} --cores=4 &&
flux module reload ${SCHED_DUMMY} --cores=4 &&
flux dmesg | grep "hello_cb:" >hello.dmesg
'

Expand Down
12 changes: 4 additions & 8 deletions t/t2204-job-info.t
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,7 @@ wait_inactive() {
}

test_expect_success 'reload the job-info module' '
flux exec -r all flux module remove job-info &&
flux exec -r all flux module load job-info &&
flux exec -r all flux module reload job-info &&
wait_inactive
'

Expand Down Expand Up @@ -435,8 +434,7 @@ test_expect_success 'flux job lists full path for job name if first argument not
'

test_expect_success 'reload the job-info module' '
flux exec -r all flux module remove job-info &&
flux exec -r all flux module load job-info
flux exec -r all flux module reload job-info
'

test_expect_success 'verify job names preserved across restart' '
Expand Down Expand Up @@ -471,8 +469,7 @@ test_expect_success 'flux job list outputs ntasks correctly (4 tasks)' '
'

test_expect_success 'reload the job-info module' '
flux exec -r all flux module remove job-info &&
flux exec -r all flux module load job-info
flux exec -r all flux module reload job-info
'

test_expect_success 'verify task count preserved across restart' '
Expand Down Expand Up @@ -525,8 +522,7 @@ test_expect_success 'flux job list outputs nnodes/ranks correctly (5 tasks, / 3
'

test_expect_success 'reload the job-info module' '
flux exec -r all flux module remove job-info &&
flux exec -r all flux module load job-info
flux exec -r all flux module reload job-info
'

test_expect_success 'verify nnodes preserved across restart' '
Expand Down
9 changes: 3 additions & 6 deletions t/t2300-sched-simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ list_R() {
}

test_expect_success 'sched-simple: reload ingest module with lax validator' '
flux exec -r all flux module remove job-ingest &&
flux exec -r all flux module load job-ingest validator-args="--schema,${SCHEMA}" \
flux exec -r all flux module reload job-ingest validator-args="--schema,${SCHEMA}" \
validator=${JSONSCHEMA_VALIDATOR}
'
test_expect_success 'sched-simple: generate jobspec for simple test job' '
Expand Down Expand Up @@ -103,8 +102,7 @@ test_expect_success 'sched-simple: cancel all jobs' '
test "$($query)" = "rank[0-1]/core[0-1]"
'
test_expect_success 'sched-simple: reload in best-fit mode' '
flux module remove sched-simple &&
flux module load sched-simple mode=best-fit
flux module reload sched-simple mode=best-fit
'
test_expect_success 'sched-simple: submit 5 more jobs' '
flux job submit basic.json >job6.id &&
Expand Down Expand Up @@ -161,8 +159,7 @@ test_expect_success 'sched-simple: check allocations for running jobs' '
test_cmp first-fit-allocs.expected first-fit-allocs.out
'
test_expect_success 'sched-simple: reload with outstanding allocations' '
flux module remove sched-simple &&
flux module load sched-simple &&
flux module reload sched-simple &&
flux dmesg | grep "hello: alloc rank0/core0" &&
test "$($query)" = ""
'
Expand Down

0 comments on commit ebfcade

Please sign in to comment.