From 833879b34cd7f3666ea890030e90cb6aef4160d7 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Tue, 19 Dec 2023 16:49:47 -0800 Subject: [PATCH] testsuite: fix FLUX_HWLOC_XMLFILE test under flux-run(1) 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. --- t/t0001-basic.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/t0001-basic.t b/t/t0001-basic.t index de188788ff5c..c08d11aa81ba 100755 --- a/t/t0001-basic.t +++ b/t/t0001-basic.t @@ -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 '