Skip to content

Commit

Permalink
debug/temporary: cat outfile and dmesg in t4010
Browse files Browse the repository at this point in the history
Also reload s-f-feasibility during resource load
  • Loading branch information
jacobtkeio committed Dec 19, 2024
1 parent c131a44 commit 93b13a6
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions t/t4010-match-conf.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ start_resource () {
"flux module reload -f sched-fluxion-resource ${RESOURCE_OPTIONS} && "\
"flux module reload -f sched-fluxion-qmanager && "\
"flux module stats sched-fluxion-qmanager && "\
"flux ion-resource params >${outfile}"
"flux module reload -f sched-fluxion-feasibility && "\
"flux ion-resource params >${outfile} && "\
"flux dmesg"
}
start_resource_noconfig () {
local outfile=$1; shift
Expand All @@ -34,7 +36,9 @@ start_resource_noconfig () {
"flux module reload -f sched-fluxion-resource ${RESOURCE_OPTIONS} && "\
"flux module reload -f sched-fluxion-qmanager && "\
"flux module stats sched-fluxion-qmanager && "\
"flux ion-resource params >${outfile}"
"flux module reload -f sched-fluxion-feasibility && "\
"flux ion-resource params >${outfile} && "\
"flux dmesg"
}
check_load_file(){
test $(jq '.params."load-file"' ${1}) = ${2}
Expand Down Expand Up @@ -71,7 +75,8 @@ test_expect_success 'resource: sched-fluxion-resource loads with no config' '
check_match_format ${outfile} "\"rv1_nosched\"" &&
check_match_subsystems ${outfile} "\"containment\"" &&
check_reserve_vtx_vec ${outfile} 0 &&
check_prune_filters ${outfile} "\"ALL:core\""
check_prune_filters ${outfile} "\"ALL:core\"" &&
cat ${outfile}
'

test_expect_success 'resource: sched-fluxion-resource loads with valid toml' '
Expand All @@ -80,12 +85,14 @@ test_expect_success 'resource: sched-fluxion-resource loads with valid toml' '
start_resource ${conf_base}/${conf_name} ${outfile} &&
check_load_file ${outfile} null &&
check_load_format ${outfile} "\"rv1exec\"" &&
check_load_allowlist ${outfile} "\"node,core,gpu\"" &&
cat ${outfile} &&
check_load_allowlist ${outfile} "\"node,core,gpu\"" ||
flux dmesg &&
check_match_policy ${outfile} "\"lonodex\"" &&
check_match_format ${outfile} "\"rv1_nosched\"" &&
check_match_subsystems ${outfile} "\"containment\"" &&
check_reserve_vtx_vec ${outfile} 200000 &&
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\""
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\"" &&
'

test_expect_success 'resource: module load options take precedence' '
Expand All @@ -100,7 +107,8 @@ test_expect_success 'resource: module load options take precedence' '
check_match_format ${outfile} "\"rv1\"" &&
check_match_subsystems ${outfile} "\"containment\"" &&
check_reserve_vtx_vec ${outfile} 200000 &&
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\""
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\"" &&
cat ${outfile}
'

test_expect_success 'resource: sched-fluxion-resource loads with no keys' '
Expand All @@ -114,7 +122,8 @@ test_expect_success 'resource: sched-fluxion-resource loads with no keys' '
check_match_format ${outfile} "\"rv1_nosched\"" &&
check_match_subsystems ${outfile} "\"containment\"" &&
check_reserve_vtx_vec ${outfile} 0 &&
check_prune_filters ${outfile} "\"ALL:core\""
check_prune_filters ${outfile} "\"ALL:core\"" &&
cat ${outfile}
'

test_expect_success 'resource: sched-fluxion-resource loads with extra keys' '
Expand All @@ -128,14 +137,16 @@ test_expect_success 'resource: sched-fluxion-resource loads with extra keys' '
check_match_format ${outfile} "\"rv1_nosched\"" &&
check_match_subsystems ${outfile} "\"containment\"" &&
check_reserve_vtx_vec ${outfile} 200000 &&
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\""
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\"" &&
cat ${outfile}
'

test_expect_success 'resource: load must tolerate an invalid policy' '
conf_name="09-invalid-policy" &&
outfile=${conf_name}.out &&
start_resource ${conf_base}/${conf_name} ${outfile} &&
check_match_policy ${outfile} "\"first\""
check_match_policy ${outfile} "\"first\"" &&
cat ${outfile}
'

test_expect_success 'resource: load must fail on a bad value' '
Expand Down

0 comments on commit 93b13a6

Please sign in to comment.