Skip to content

Commit

Permalink
testsuite: update resource exclude test
Browse files Browse the repository at this point in the history
Problem: flux-core is deprecating the capability to change
resource.exclude on the fly, but t1013-exclusion.t relies on
this capability.

Change the test to reload the resource module when the
configuration changes.

Note: "noverify = true" needed to be added to allow flux-core
resource to be restarted on rank 0 with fake resources, otherwise the
mismatched hostname causes rank 0 to be drained.
  • Loading branch information
garlick committed Jul 18, 2023
1 parent e0b4999 commit ee3ac4d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions t/t1013-exclusion.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,19 @@ excl_4N4B="${hwloc_basepath}/004N/exclusive/04-brokers-sierra2"

skip_all_unless_have jq

export FLUX_CONF_DIR=$(pwd)
cat >resource.toml <<-EOT
[resource]
exclude = "0-3"
EOT

export FLUX_SCHED_MODULE=none
test_under_flux 4
test_under_flux 4 full -o,--config-path=$(pwd)/resource.toml

test_expect_success 'exclusion: generate jobspecs' '
flux run --dry-run -N 4 -n 4 -c 44 -g 4 -t 1h sleep 3600 > basic.json &&
flux run --dry-run -N 1 -n 1 -c 44 -g 4 -t 1h sleep 3600 > 1N.json
'

test_expect_success 'exclusion: load config with resource exclusions' '
cat >resource.toml <<-EOF &&
[resource]
exclude = "0-3"
EOF
flux config reload
'

test_expect_success 'load test resources' '
load_test_resources ${excl_4N4B}
'
Expand All @@ -50,11 +45,15 @@ test_expect_success 'exclusion: removing fluxion modules' '
remove_resource
'
test_expect_success 'exclusion: reloading resource with a config file' '
flux module remove resource &&
cat >resource.toml <<-EOF &&
[resource]
exclude = "2-3"
noverify = true
EOF
flux config reload
flux config load resource.toml &&
flux module load resource &&
load_test_resources ${excl_4N4B}
'

test_expect_success 'exclusion: loading fluxion modules works' '
Expand Down

0 comments on commit ee3ac4d

Please sign in to comment.