From 3802d0ce3efbf9ae70bcbf0790015d785397e0b8 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Thu, 21 Sep 2023 13:08:26 -0700 Subject: [PATCH] testsuite: ensure FLUX_HWLOC_XMLFILE works 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. --- t/t0001-basic.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t0001-basic.t b/t/t0001-basic.t index 038626bfcdb1..d1d10cff7ba3 100755 --- a/t/t0001-basic.t +++ b/t/t0001-basic.t @@ -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' '