Skip to content

Commit 08ccb1c

Browse files
committed
tests/linux/gather: ignore gp_index/obj IDs
Reading caches with opendir() from a sysdump dump can cause cache discovery to be reordered. Signed-off-by: Brice Goglin <[email protected]>
1 parent 5fa11e1 commit 08ccb1c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ export HWLOC_FSROOT=//
6262

6363
echo "Saving current system topology to XML..."
6464
# ignore DAXDevice info attr because it won't appear in save2.xml unless we pass --io to gather below
65-
if ! "$lstopo" --no-io -.xml | grep -v DAXDevice > "$tmpdir/save1.xml" ; then
65+
if ! "$lstopo" --no-io -.xml \
66+
| sed -e 's/ id="obj[0-9]*"//' \
67+
| sed -e 's/ gp_index="[0-9]*"//' \
68+
| grep -v DAXDevice \
69+
> "$tmpdir/save1.xml" ; then
6670
error "Failed"
6771
exit 1
6872
fi
@@ -85,7 +89,10 @@ export HWLOC_FSROOT="$tmpdir/save"
8589
rm -f "$tmpdir/save/proc/hwloc-nofile-info"
8690

8791
echo "Saving tarball topology to XML..."
88-
if ! "$lstopo" --no-io "$tmpdir/save2.xml" ; then
92+
if ! "$lstopo" --no-io -.xml \
93+
| sed -e 's/ id="obj[0-9]*"//' \
94+
| sed -e 's/ gp_index="[0-9]*"//' \
95+
> "$tmpdir/save2.xml" ; then
8996
error "Failed"
9097
exit 1
9198
fi

0 commit comments

Comments
 (0)