Skip to content

Commit

Permalink
tests/abi: check the PCI device attribute ABI
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
(cherry picked from commit 80ac332)
(cherry picked from commit 6815f23)
  • Loading branch information
bgoglin committed Nov 10, 2023
1 parent c1dee2d commit 86e251c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/hwloc/hwloc_topology_abi.c
@@ -1,5 +1,5 @@
/*
* Copyright © 2017-2020 Inria. All rights reserved.
* Copyright © 2017-2023 Inria. All rights reserved.
* See COPYING in top-level directory.
*/

Expand Down Expand Up @@ -141,6 +141,22 @@ int main(void)
size = sizeof(struct hwloc_info_s);
assert(size == 16);

#ifndef HWLOC_HAVE_32BITS_PCI_DOMAIN
size = sizeof(struct hwloc_pcidev_attr_s);
assert(size == 24);
offset = offsetof(struct hwloc_pcidev_attr_s, class_id);
assert(offset == 6);
offset = offsetof(struct hwloc_pcidev_attr_s, revision);
assert(offset == 16);
#else
size = sizeof(struct hwloc_pcidev_attr_s);
assert(size == 24);
offset = offsetof(struct hwloc_pcidev_attr_s, class_id);
assert(offset == 8);
offset = offsetof(struct hwloc_pcidev_attr_s, revision);
assert(offset == 18);
#endif

size = sizeof(struct hwloc_topology_support);
assert(size == 32);
size = sizeof(struct hwloc_topology_discovery_support);
Expand Down

0 comments on commit 86e251c

Please sign in to comment.