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
found.

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-hwloc-assembler.sh
   - 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/test-hwloc-calc.sh
   - runs various hwloc-calc commands and compares them to a known good
output
[x] hwloc-distances
   - tested by utils/test-hwloc-distances.sh
[x] hwloc-distrib
   - runs various hwloc-distrib commands and compares them to known good
output
[x] hwloc-gather-topology
   - tested by test-gather-topology.sh
   - 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/hwloc-ls.sh
[x] hwloc-ls
   - tested by utils/hwloc-ls.sh
[ ] 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
     acceptable.
[x] lstopo
   - tested by utils/hwloc-ls.sh
[x] lstopo-no-graphics
   - tested by utils/hwloc-ls.sh

= tests/linux/test-topology.sh =

"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
system.

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

= tests/xml/test-topology.sh =
   - 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
     program
   - 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

     hwloc_bitmap_string.c
        check hwloc_bitmap_asprintf(), hwloc_obj_cpuset_snprintf() and
hwloc_bitmap_sscanf()
    hwloc_get_closest_objs.c
        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
    hwloc_get_obj_covering_cpuset.c
        check hwloc_get_obj_covering_cpuset()
    hwloc_get_cache_covering_cpuset.c
        /* check hwloc_get_cache_covering_cpuset() */
    hwloc_get_largest_objs_inside_cpuset.c
        check hwloc_get_largest_objs_inside_cpuset()
        and hwloc_get_first_largest_obj_inside_cpuset()
    hwloc_get_next_obj_covering_cpuset.c
        check hwloc_get_next_obj_covering_cpuset*()
    hwloc_get_obj_inside_cpuset.c
        check hwloc_get_obj_inside_cpuset*()
    hwloc_get_shared_cache_covering_obj.c
        check hwloc_get_shared_cache_covering_obj()
    hwloc_get_obj_below_array_by_type.c
        check hwloc_get_obj_below_array_by_type()
    hwloc_bitmap_first_last_weight.c
        check hwloc_bitmap_first(), _last(), _next() and _weight()
    hwloc_bitmap_singlify.c
        check hwloc_bitmap_singlify()
    hwloc_type_depth.c
        check topo_get_type{,_or_above,_or_below}_depth()
        and hwloc_get_depth_type()
    hwloc_bind.c
        check the binding functions
    hwloc_get_last_cpu_location.c
        check that a bound process execs on a non-empty cpuset included
in the binding
    hwloc_object_userdata.c
        check that object userdata is properly initialized
    hwloc_synthetic.c
        check a synthetic topology
    hwloc_custom.c
        test inserting custom topology into global topology
    hwloc_backends.c
        mostly useful with valgrind, to check if backend cleanup properly
    hwloc_is_thissystem.c
        Check the is_thissystem flag behavior
    hwloc_distances.c
        test setting/retrieving distances
    hwloc_groups.c
        intensive testing of two grouping cases (2+1 and 2+2+1)
    hwloc_groups2.c
        testing of adding/replacing/removing distance matrices
        with set_distance_matrix or the environment,
        grouping with/without accuracy
    hwloc_insert_misc.c
        tests hwloc_topology_insert_misc_object_by_cpuset()
hwloc_topology_insert_misc_object_by_parent() among other things
    hwloc_topology_restrict.c
        test restricting topology
    hwloc_obj_infos.c
        check obj infos
    hwloc_iodevs.c
        check misc i/O device related stuff
    xmlbuffer.c
        test hwloc_topology_export_xmlbuffer() and ??

-- 
John Brier, RHCA, RHCVA, RHCX
Quality Assurance Engineer - NA
gpg: 1024D/251D9FF9 6F7B 242A 9375 F4CC BC6D  F453 60D8 35FF 251D 9FF9
http://opensource.com - Where Open Source Multiplies