Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: [hwloc-devel] hwloc testing review
From: John Brier (jbrier_at_[hidden])
Date: 2012-11-06 15:48:42

Hi folks. I've been using Linux since 2000 and supporting it with Red
Hat since 2007 and now I'm a Red Hat Quality Assurance Engineer.

At Red Hat we use the 'make check' build target to test hwloc. I did a
review of what that target tests and what it doesn't and this is what I

Did I miss anything?
Are there are additional things that should be tested?

For the binaries it would be useful for Red Hat (and maybe others) if we
could use the existing 'make check' build target to test *system
installed* binaries (aka the ones from our RPM) and not the source
distributed built ones. Does that seem like a feature that would be
useful for others and is it possible to add that support to the
associated autotools files?

note the comments about untested binaries below

= Binaries =

[x] hwloc-assembler
   - tested by utils/
   - test combines three XML files into one and compares it to a known
     good XML output
[ ] hwloc-assembler-remote
   - not tested but I can see why (requires more than one system)
[ ] hwloc-bind
   - not tested. This seems important enough to test.
[x] hwloc-calc
   - tested by utils/
   - runs various hwloc-calc commands and compares them to a known good
[x] hwloc-distances
   - tested by utils/
[x] hwloc-distrib
   - runs various hwloc-distrib commands and compares them to known good
[x] hwloc-gather-topology
   - tested by
   - uses lstopo to save the topology to an xml file
     uses hwlog-gather-topology to save system topology to a tarball
     extracts said tarball
     runs lstopo with HWLOC_FSROOT= set to the path of the tarball
     HWLOC_FSROOT= switches to reading the topology from the specified
     Linux filesystem root instead of the main file-system root
     compares the first xml file to the last xml file
[x] hwloc-info
   - tested by utils/
[x] hwloc-ls
   - tested by utils/
[ ] hwloc-ps
   - isn't tested and that seems like it would be easy to test. I would
     be willing to take a stab at adding that support if that is
[x] lstopo
   - tested by utils/
[x] lstopo-no-graphics
   - tested by utils/

= tests/linux/ =

"This directory contains tarballs of Linux sysfs hierarchies collected on
various systems. Each tarball `xyz.tar.bz2' comes with the corresponding
`xyz.output', which gives the expected output of "lstopo -v -" for that

Together with the `HWLOC_FSROOT' environment variable, these are
used by `' to check for any regression introduced in
hwloc detection logic."

= tests/xml/ =
   - uses lstopo to read in known XML files and output them in XML
   - compares them to ensure output matches input

= doc/hwloc-hello =
   - hwloc-hello is the binary of hwloc-hello.c
   - hwloc-hello-cpp is the binary of the hwloc-hello-cpp.cpp source
   - hwloc-hello.c and hwloc-hello-cpp.cpp contain the same C source
     code and are a demonstration of the hwloc C API which is described
     in the docs
   - for testing, the code is compiled and executed

= tests/Makefile check_PROGRAMS =
   - the following C programs test various functions of the C API

        check hwloc_bitmap_asprintf(), hwloc_obj_cpuset_snprintf() and
        check hwloc_get_closest_objs()
        get the last object of the last level
        get all closest objects
        get the common ancestor of last level and its less close object.
        check that the ancestor is the system level
        check hwloc_get_obj_covering_cpuset()
        /* check hwloc_get_cache_covering_cpuset() */
        check hwloc_get_largest_objs_inside_cpuset()
        and hwloc_get_first_largest_obj_inside_cpuset()
        check hwloc_get_next_obj_covering_cpuset*()
        check hwloc_get_obj_inside_cpuset*()
        check hwloc_get_shared_cache_covering_obj()
        check hwloc_get_obj_below_array_by_type()
        check hwloc_bitmap_first(), _last(), _next() and _weight()
        check hwloc_bitmap_singlify()
        check topo_get_type{,_or_above,_or_below}_depth()
        and hwloc_get_depth_type()
        check the binding functions
        check that a bound process execs on a non-empty cpuset included
in the binding
        check that object userdata is properly initialized
        check a synthetic topology
        test inserting custom topology into global topology
        mostly useful with valgrind, to check if backend cleanup properly
        Check the is_thissystem flag behavior
        test setting/retrieving distances
        intensive testing of two grouping cases (2+1 and 2+2+1)
        testing of adding/replacing/removing distance matrices
        with set_distance_matrix or the environment,
        grouping with/without accuracy
        tests hwloc_topology_insert_misc_object_by_cpuset()
hwloc_topology_insert_misc_object_by_parent() among other things
        test restricting topology
        check obj infos
        check misc i/O device related stuff
        test hwloc_topology_export_xmlbuffer() and ??

Quality Assurance Engineer - NA
gpg: 1024D/251D9FF9 6F7B 242A 9375 F4CC BC6D  F453 60D8 35FF 251D 9FF9 - Where Open Source Multiplies