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 d83fe61 commit 0b12e5b
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 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,21 +75,32 @@ 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' '
conf_name="01-default" &&
outfile=${conf_name}.out &&
cat ${outfile} &&
start_resource ${conf_base}/${conf_name} ${outfile} &&
cat ${outfile} &&
check_load_file ${outfile} null &&
cat ${outfile} &&
check_load_format ${outfile} "\"rv1exec\"" &&
cat ${outfile} &&
check_load_allowlist ${outfile} "\"node,core,gpu\"" &&
cat ${outfile} &&
check_match_policy ${outfile} "\"lonodex\"" &&
cat ${outfile} &&
check_match_format ${outfile} "\"rv1_nosched\"" &&
cat ${outfile} &&
check_match_subsystems ${outfile} "\"containment\"" &&
cat ${outfile} &&
check_reserve_vtx_vec ${outfile} 200000 &&
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\""
cat ${outfile} &&
check_prune_filters ${outfile} "\"ALL:core,ALL:gpu\"" &&
cat ${outfile}
'

test_expect_success 'resource: module load options take precedence' '
Expand All @@ -100,7 +115,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 +130,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 +145,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 0b12e5b

Please sign in to comment.