Skip to content

Commit

Permalink
testsuite: ensure FLUX_HWLOC_XMLFILE works
Browse files Browse the repository at this point in the history
Problem: No tests ensure that FLUX_HWLOC_XMLFILE works to cause the
resource module to use an XML file instead of topology load when
doing dynamic discovery.

Add a test to t0001-basic.t that ensures an instance started by
flux-start sees fake resources in an XML file when FLUX_HWLOC_XMLFILE
is set.
  • Loading branch information
grondo committed Sep 21, 2023
1 parent 1f1326d commit 3802d0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t0001-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ test_expect_success 'flux-start dies gracefully when run from removed dir' '
test_must_fail flux start /bin/true )
'

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 &&
test_debug "cat rinfo.out" &&
grep "12 Cores" rinfo.out
'

# too slow under ASAN
test_expect_success NO_ASAN 'test_under_flux works' '
Expand Down

0 comments on commit 3802d0c

Please sign in to comment.