Skip to content

Commit

Permalink
testsuite: fix FLUX_HWLOC_XMLFILE test under flux-run(1)
Browse files Browse the repository at this point in the history
Problem: When used under flux-run(1), the FLUX_HWLOC_XMLFILE test in
t0001-basic.t may fail due to CPU affinity.

Add the resource.norestrict option to the test instance. This removes any
influence of the test's current cpu affinity.
  • Loading branch information
grondo committed Dec 20, 2023
1 parent 879a9c2 commit 833879b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions t/t0001-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,13 @@ test_expect_success 'flux-start dies gracefully when run from removed dir' '
command -v hwloc-ls >/dev/null && test_set_prereq HWLOC_LS
test_expect_success HWLOC_LS 'FLUX_HWLOC_XMLFILE works' '
hwloc-ls --of xml -i "numa:2 core:3 pu:1" >test.xml &&
FLUX_HWLOC_XMLFILE=test.xml flux start -s 2 flux resource info \
>rinfo.out &&
cat <<-EOF >norestrict.conf &&
[resource]
norestrict = true
EOF
FLUX_HWLOC_XMLFILE=test.xml \
flux start -s2 -o,--conf=norestrict.conf \
flux resource info >rinfo.out &&
test_debug "cat rinfo.out" &&
grep "12 Cores" rinfo.out
'
Expand Down

0 comments on commit 833879b

Please sign in to comment.