Skip to content

Commit

Permalink
testsuite: adjust sharness tests for resource integration
Browse files Browse the repository at this point in the history
Update test cases as the resource integration
created more complex dependencies between
resource, sched-simple, sched-fluxion-resource
and sched-fluxion-qmanager.

Add proper unloading order for sched-fluxion-resource
and sched-fluxion-qmanager. Now that qmanager requires
a response from sched-fluxion-resource.notify,
unloading qmanager fails if sched-fluxion-resource
is unloaded first.

Rename test rc scripts (just symlinks to the number
prefixed fluxion rc scripts)

Remove custom, on-the-fly-generated rc support
for t1005-qmanager-conf.t.
Fluxion depends on flux-core's
resource module which has a complicated dependencies
on other flux-core modules, it didn't seem to
make a whole lot of sense to create test-only
rc scripts like what was embedded
in t1005-qmanager-conf.t.
Instead we now use the default rc scripts
which should have all of the module dependencies
set correctly.
  • Loading branch information
dongahn committed Jun 17, 2020
1 parent 251b200 commit 5e63622
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 25 deletions.
1 change: 1 addition & 0 deletions t/rc/rc1.d/01-sched-fluxion-resource-start
1 change: 1 addition & 0 deletions t/rc/rc1.d/02-sched-fluxion-qmanager-start
1 change: 0 additions & 1 deletion t/rc/rc1.d/sched-fluxion-qmanager-start

This file was deleted.

1 change: 0 additions & 1 deletion t/rc/rc1.d/sched-fluxion-resource-start

This file was deleted.

1 change: 1 addition & 0 deletions t/rc/rc3.d/01-sched-fluxion-qmanager-stop
1 change: 1 addition & 0 deletions t/rc/rc3.d/02-sched-fluxion-resource-stop
1 change: 0 additions & 1 deletion t/rc/rc3.d/sched-fluxion-qmanager-stop

This file was deleted.

1 change: 0 additions & 1 deletion t/rc/rc3.d/sched-fluxion-resource-stop

This file was deleted.

27 changes: 9 additions & 18 deletions t/t1005-qmanager-conf.t
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,24 @@ ORIG_HOME=${HOME}
HOME=${ORIG_HOME}

conf_base=${SHARNESS_TEST_SRCDIR}/conf.d
unset FLUXION_RESOURCE_RC_NOOP
unset FLUXION_QMANAGER_RC_NOOP

if test -z "${FLUX_SCHED_TEST_INSTALLED}" || test -z "${FLUX_SCHED_CO_INST}"
then
export FLUX_RC_EXTRA="${SHARNESS_TEST_SRCDIR}/rc"
fi

# Run broker with specified config file and qmanager options.
# Usage: start_qmanager config-path [module options] >outfile
start_qmanager () {
local config=$1; shift
QMANAGER_OPTIONS=$* flux broker \
-Sbroker.rc1_path=./rc1 -Sbroker.rc3_path=./rc3 \
FLUXION_QMANAGER_OPTIONS=$* flux broker \
--config-path=${config} \
flux dmesg
}
start_qmanager_noconfig () {
QMANAGER_OPTIONS=$* flux broker \
-Sbroker.rc1_path=./rc1 -Sbroker.rc3_path=./rc3 \
FLUXION_QMANAGER_OPTIONS=$* flux broker \
flux dmesg
}
# Usage: check_enforced_policy outfile expected
Expand All @@ -50,20 +55,6 @@ check_policy_params() {
check_params $1 $2 "policy params"
}

test_expect_success 'qmanager: create rc1/rc3 for qmanager test' '
cat <<-EOT >rc1 &&
flux module load kvs
flux module load job-manager
flux module load sched-fluxion-qmanager \$QMANAGER_OPTIONS
EOT
cat <<-EOT >rc3 &&
flux module remove -f sched-fluxion-qmanager
flux module remove -f job-manager
flux module remove -f kvs
EOT
chmod +x rc1 rc3
'

test_expect_success 'qmanager: load qmanager works with no config' '
outfile=noconfig.out &&
start_qmanager_noconfig >${outfile} &&
Expand Down
2 changes: 1 addition & 1 deletion t/t1007-recovery-full.t
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ test_expect_success 'recovery: submit to occupy resources fully (rv1)' '
'

test_expect_success 'recovery: cancel one running job without fluxion' '
remove_resource &&
remove_qmanager &&
remove_resource &&
flux job cancel ${jobid1} &&
flux job wait-event -t 2 ${jobid1} release
'
Expand Down
4 changes: 2 additions & 2 deletions t/t2001-tree-real.t
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ test_expect_success 'flux-tree: works with quoted jobscript argument' '
'

test_expect_success 'flux-tree: removing qmanager/resource works' '
remove_resource &&
remove_qmanager
remove_qmanager &&
remove_resource
'

test_done
1 change: 1 addition & 0 deletions t/t4000-match-params.t
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ load-format=hwloc prune-filters=ALL:core

test_expect_success 'loading resource module with no option works' '
unload_resource &&
flux module remove sched-simple &&
load_resource prune-filters=ALL:core
'

Expand Down
1 change: 1 addition & 0 deletions t/t4004-match-hwloc.t
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ test_expect_success 'resource-query works with whitelist' '

# Test using the full resource matching service
test_expect_success 'loading resource module with a tiny hwloc xml file works' '
flux module remove sched-simple &&
load_resource load-file=${hwloc_4core}
'

Expand Down
1 change: 1 addition & 0 deletions t/t4009-match-update.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ test_expect_success 'update: hwloc reload works' '
'

test_expect_success 'update: loading sched-fluxion-resource works' '
flux module remove sched-simple &&
load_resource load-whitelist=node,core,gpu match-format=rv1
'

Expand Down

0 comments on commit 5e63622

Please sign in to comment.