Skip to content

Commit

Permalink
testsuite: use flux resource reload in sched tests
Browse files Browse the repository at this point in the history
Update tests to use 'flux resource reload' instead of unloading
and reloading the resource module.
  • Loading branch information
garlick committed Oct 16, 2020
1 parent fc249aa commit 72a2086
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
14 changes: 5 additions & 9 deletions t/t2300-sched-simple.t
Expand Up @@ -40,13 +40,10 @@ test_expect_success 'sched-simple: reload ingest module with lax validator' '
test_expect_success 'sched-simple: generate jobspec for simple test job' '
flux jobspec srun -n1 hostname >basic.json
'
test_expect_success 'sched-simple: load default resource.R' '
flux kvs put resource.R="$(echo $hwloc_by_rank)" &&
flux kvs get resource.R
'
test_expect_success 'sched-simple: reload sched-simple' '
test_expect_success 'sched-simple: reload sched-simple with default resources' '
flux module unload sched-simple &&
flux module reload resource monitor-force-up noverify &&
echo $hwloc_by_rank >R
flux resource reload R &&
flux module load sched-simple &&
flux dmesg 2>&1 >reload.dmesg.log &&
grep "ready:.*rank\[0-1\]/core\[0-1\]" reload.dmesg.log &&
Expand Down Expand Up @@ -156,9 +153,8 @@ test_expect_success 'sched-simple: PUs now treated as cores' '
'
test_expect_success 'sched-simple: reload in first-fit mode' '
flux module remove sched-simple &&
flux module remove resource &&
flux kvs put resource.R="$(echo $hwloc_by_rank_first_fit)" &&
flux module load resource noverify &&
echo $hwloc_by_rank_first_fit >R_first_fit &&
flux resource reload R_first_fit &&
flux module load sched-simple mode=first-fit &&
flux dmesg | grep "ready:.*rank0/core\[0-1\] rank1/core0"
'
Expand Down
9 changes: 3 additions & 6 deletions t/t2302-sched-simple-up-down.t
Expand Up @@ -41,13 +41,10 @@ test_expect_success 'sched-simple: reload ingest module with lax validator' '
validator-args="--schema,${SCHEMA}" \
validator=${JSONSCHEMA_VALIDATOR}
'
test_expect_success 'sched-simple: load default resource.R' '
flux kvs put resource.R="$(echo $hwloc_by_rank)" &&
flux kvs get resource.R
'
test_expect_success 'sched-simple: reload sched-simple' '
test_expect_success 'sched-simple: reload sched-simple with test resources' '
flux module unload sched-simple &&
flux module reload resource monitor-force-up noverify &&
echo $hwloc_by_rank >R &&
flux resource reload R &&
flux module load sched-simple &&
flux dmesg 2>&1 >reload.dmesg.log &&
test_debug "grep sched-simple reload.dmesg.log" &&
Expand Down

0 comments on commit 72a2086

Please sign in to comment.