Skip to content

Commit 9f8ef0b

Browse files
committed
tests/groups: check failing insert
Signed-off-by: Brice Goglin <[email protected]>
1 parent 90b508f commit 9f8ef0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/hwloc/hwloc_groups.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2011-2021 Inria. All rights reserved.
2+
* Copyright © 2011-2023 Inria. All rights reserved.
33
* See COPYING in top-level directory.
44
*/
55

@@ -31,6 +31,11 @@ int main(void)
3131
hwloc_topology_load(topology);
3232
root = hwloc_get_root_obj(topology);
3333
assert(hwloc_topology_get_depth(topology) == 3);
34+
/* insert without sets, fails */
35+
group = hwloc_topology_alloc_group_object(topology);
36+
assert(group);
37+
res = hwloc_topology_insert_group_object(topology, group);
38+
assert(res == NULL);
3439
/* insert a group identical to root, will be merged */
3540
group = hwloc_topology_alloc_group_object(topology);
3641
assert(group);

0 commit comments

Comments
 (0)