Skip to content

Commit a720f86

Browse files
committed
tests/linux: remove a confusing warning
"Cannot force linux component first because HWLOC_COMPONENTS environment variable is already set to linux,stop" This was caused by us setting HWLOC_COMPONENTS to avoid lstopo --if fsroot letting the pci backend annotate things. Stop using --if fsroot and rely on envvars instead. Signed-off-by: Brice Goglin <[email protected]>
1 parent ecc13f1 commit a720f86

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests/hwloc/linux/test-topology.sh.in

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#
55
# Copyright © 2009 CNRS
6-
# Copyright © 2009-2019 Inria. All rights reserved.
6+
# Copyright © 2009-2020 Inria. All rights reserved.
77
# Copyright © 2009-2011 Université Bordeaux
88
# Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved.
99
# See COPYING in top-level directory.
@@ -25,9 +25,6 @@ export HWLOC_DONT_ADD_VERSION_INFO
2525
HWLOC_DEBUG_SORT_CHILDREN=1
2626
export HWLOC_DEBUG_SORT_CHILDREN
2727

28-
HWLOC_COMPONENTS=linux,stop
29-
export HWLOC_COMPONENTS
30-
3128
actual_output="$1"
3229

3330
# make sure we use default numeric formats (only XML outputs are dis-localized when supported)
@@ -57,7 +54,17 @@ test_topology ()
5754
opts="-v -"
5855
[ -r "$options" ] && opts=`cat $options`
5956

60-
if ! "$lstopo" -i "$dir" --if fsroot $opts \
57+
# Use HWLOC_COMPONENTS explicitly instead of passing --if fsroot because
58+
# we don't want the pci backend to annotate PCI vendor/device when supported.
59+
# We'll set HWLOC_FSROOT and HWLOC_DUMPED_HWDATA_DIR manually below.
60+
HWLOC_COMPONENTS=linux,stop
61+
export HWLOC_COMPONENTS
62+
HWLOC_FSROOT="$dir"
63+
export HWLOC_FSROOT
64+
HWLOC_DUMPED_HWDATA_DIR=/var/run/hwloc
65+
export HWLOC_DUMPED_HWDATA_DIR
66+
67+
if ! "$lstopo" $opts \
6168
| sed -e 's/ gp_index="[0-9]\+"//' \
6269
> "$output"
6370
# filtered gp_index because it depends on the insertiong order, which may depend on pciaccess version, etc

0 commit comments

Comments
 (0)