Skip to content

Commit 8faf5e9

Browse files
committed
testsuite: update shell taskmap tests
Problem: No tests in the testsuite check that a taskmap which changes task counts amongst nodes works with the job shell. Also, one expected failure now succeeds because this type of taskmap is now allowed. Remove the failing test. Add a test that assigns 3 tasks to rank 0 and one task on other nodes.
1 parent b9afbb9 commit 8faf5e9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

t/t2616-job-shell-taskmap.t

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ test_expect_success 'taskmap=manual works' '
136136
| jq -e ".context.taskmap.map == [[1,3,4,1],[0,1,4,1]]" &&
137137
test_check_taskmap $id
138138
'
139+
test_expect_success 'taskmap=manual can redistribute tasks amongst nodes' '
140+
# put 2 extra tasks on rank 0
141+
id=$(flux submit \
142+
--taskmap=manual:"[[0,1,3,1],[1,3,1,1]]" \
143+
-N4 -n6 ./map.sh) &&
144+
flux job wait-event -p exec -f json $id shell.start \
145+
| jq -e ".context.taskmap.map == [[0,1,3,1],[1,3,1,1]]" &&
146+
test_check_taskmap $id
147+
'
139148
test_expect_success 'taskmap=manual with unknown taskmap fails' '
140149
test_must_fail_or_be_terminated \
141150
flux run --taskmap="manual:[]" true
@@ -149,8 +158,7 @@ test_expect_success 'invalid manual taskmaps fail predictably' '
149158
-N4 --tasks-per-node=4 true ::: \
150159
"{}" \
151160
"[[1,3,4,1]]" \
152-
"[[1,3,4,1],[0,1,3,1]]" \
153-
"[[3,1,1,1],[0,3,5,1]]") &&
161+
"[[1,3,4,1],[0,1,3,1]]") &&
154162
for id in $ids; do
155163
test_must_fail_or_be_terminated flux job attach $id
156164
done

0 commit comments

Comments
 (0)