Skip to content

Commit

Permalink
tests/lstopo: test archivemount of fsroot and cpuid
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 18, 2022
1 parent 80e8e5b commit 9cf276b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/hwloc.m4
Expand Up @@ -216,6 +216,7 @@ EOF])
;;
*-*-linux*)
AC_DEFINE(HWLOC_LINUX_SYS, 1, [Define to 1 on Linux])
AC_SUBST(HWLOC_HAVE_LINUX, 1)
hwloc_linux=yes
AC_MSG_RESULT([Linux])
hwloc_components="$hwloc_components linux"
Expand Down Expand Up @@ -1554,6 +1555,7 @@ return clGetDeviceIDs(0, 0, 0, NULL, NULL);
]])],
[AC_MSG_RESULT([yes])
AC_DEFINE(HWLOC_HAVE_X86_CPUID, 1, [Define to 1 if you have x86 cpuid])
AC_SUBST(HWLOC_HAVE_X86_CPUID, 1)
hwloc_have_x86_cpuid=yes],
[AC_MSG_RESULT([no])])
if test "x$hwloc_have_x86_cpuid" = xyes; then
Expand Down
21 changes: 19 additions & 2 deletions utils/lstopo/test-lstopo.sh.in
Expand Up @@ -3,7 +3,7 @@

#
# Copyright © 2009 CNRS
# Copyright © 2009-2020 Inria. All rights reserved.
# Copyright © 2009-2022 Inria. All rights reserved.
# Copyright © 2009, 2011 Université Bordeaux
# Copyright © 2020 Hewlett Packard Enterprise. All rights reserved.
# See COPYING in top-level directory.
Expand Down Expand Up @@ -128,5 +128,22 @@ echo "**** Import from synthetic so that we can check some exact outputs in $fil
$ls -i "node:4 pu:4" - --allow 0xf --flags disallowed -v
) > "$file"
@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $srcdir/test-lstopo.output "$file"
rm -rf "$tmp"

if test x@ARCHIVEMOUNT@ != x; then
if test x@HWLOC_HAVE_LINUX@ = x1; then
echo "**** Archivemount'ing a Linux fsroot archive ..."
file="$tmp/test-lstopo.archivemount.fsroot.output"
$ls -i $HWLOC_top_srcdir/tests/hwloc/linux/16amd64-8n2c.tar.bz2 -v - | egrep -v "^assuming " > "$file"
@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $HWLOC_top_srcdir/tests/hwloc/linux/16amd64-8n2c.output "$file"
fi
if test x@HWLOC_HAVE_X86_CPUID@ = x1; then
echo "**** Archivemount'ing a x86 CPUID archive ..."
file="$tmp/test-lstopo.archivemount.cpuid.output"
HWLOC_XML_EXPORT_SUPPORT=0
export HWLOC_XML_EXPORT_SUPPORT
$ls -i $HWLOC_top_srcdir/tests/hwloc/x86/Intel-Skylake-2xXeon6140.tar.bz2 --of xml - | sed -e 's/ gp_index="[0-9]*"//' | egrep -v "^assuming " > "$file"
@DIFF@ @HWLOC_DIFF_U@ @HWLOC_DIFF_W@ $HWLOC_top_srcdir/tests/hwloc/x86/Intel-Skylake-2xXeon6140.output "$file"
fi
fi

rm -rf "$tmp"

0 comments on commit 9cf276b

Please sign in to comment.