Skip to content

Commit ac0cf84

Browse files
committed
hwloc_type_sscanf: fix test when host has several levels with same type
This refines 26e6be0 ("hwloc_type_sscanf: fix test when host has several levels with same type") to still check against HWLOC_TYPE_DEPTH_MULTIPLE when we have the object depth that should be enough to disambiguate levels. Signed-off-by: Samuel Thibault <[email protected]> (cherry picked from commit 80448f2)
1 parent 26e6be0 commit ac0cf84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/hwloc/hwloc_type_sscanf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void _check(hwloc_topology_t topology, hwloc_obj_t obj, const char *buffe
3737

3838
err = hwloc_type_sscanf_as_depth(buffer, NULL, topology, &depth);
3939
assert(!err);
40-
assert(depth == HWLOC_TYPE_DEPTH_MULTIPLE || depth == (int) obj->depth);
40+
assert((depth == HWLOC_TYPE_DEPTH_MULTIPLE && !checkattrs) || depth == (int) obj->depth);
4141
}
4242

4343
static void check(hwloc_topology_t topology, hwloc_obj_t obj)

0 commit comments

Comments
 (0)