Skip to content

Commit

Permalink
tests/shmem: cleanup the enabling of specific distance checks
Browse files Browse the repository at this point in the history
Add a custom info attr instead on relaying on the existing
SyntheticDescription (which will exist in some upcoming XML
topology tests).

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Feb 3, 2021
1 parent 5a361d1 commit 5cf8a51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/hwloc/shmem.c
@@ -1,5 +1,5 @@
/*
* Copyright © 2011-2018 Inria. All rights reserved.
* Copyright © 2011-2021 Inria. All rights reserved.
* See COPYING in top-level directory.
*/

Expand Down Expand Up @@ -130,7 +130,7 @@ static int test(hwloc_topology_t orig, const char *callname) {
unsigned long forced_addr;
unsigned long fileoffset;
size_t shmem_length;
int synthetic_with_distances = (hwloc_obj_get_info_by_name(hwloc_get_root_obj(orig), "SyntheticDescription") != NULL);
int synthetic_with_distances = (hwloc_obj_get_info_by_name(hwloc_get_root_obj(orig), "ShmemSyntheticWithDistances") != NULL);
char tmpname[] = "/tmp/hwloc_test_shmem.XXXXXX";
char cmd[512];
struct stat st;
Expand Down Expand Up @@ -258,6 +258,8 @@ int main(int argc, char *argv[])
assert(!err);
err = hwloc_topology_load(orig);
assert(!err);
err = hwloc_obj_add_info(hwloc_get_root_obj(orig), "ShmemSyntheticWithDistances", "1");
assert(!err);

printf("adding distance matrix\n");
for(i=0; i<3; i++) {
Expand Down

0 comments on commit 5cf8a51

Please sign in to comment.