Skip to content

Commit

Permalink
tests/hwloc_backends: fix on non-x86
Browse files Browse the repository at this point in the history
Blacklisting the x86 component on non-x86 hardware must fail.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Sep 24, 2018
1 parent 70e7e23 commit 7d4311e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/hwloc/hwloc_backends.c
Expand Up @@ -203,7 +203,12 @@ int main(void)
err = hwloc_topology_set_components(topology1, HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST, "xml");
assert(!err);
err = hwloc_topology_set_components(topology1, HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST, "x86");
#ifdef HWLOC_HAVE_X86_CPUID
assert(!err);
#else
assert(err == -1);
assert(errno == EINVAL);
#endif
#ifdef HWLOC_LINUX_SYS
err = hwloc_topology_set_components(topology1, HWLOC_TOPOLOGY_COMPONENTS_FLAG_BLACKLIST, "linux");
assert(!err);
Expand Down

0 comments on commit 7d4311e

Please sign in to comment.