hwmon module unit-tests -- first one

This patchset just starts the process of adding unit-tests
to the hwmon module.

Change-Id: I569aa97658b0ff56634ddf1a599fedb4caa95abe
Signed-off-by: Patrick Venture <venture@google.com>
5 files changed
tree: bd16de833ea75277aca274c86a620c3c3d3df2ce
  1. msl/
  2. test/
  3. tools/
  4. .gitignore
  5. argument.cpp
  6. argument.hpp
  7. bootstrap.sh
  8. configure.ac
  9. env.cpp
  10. env.hpp
  11. fan_pwm.cpp
  12. fan_pwm.hpp
  13. fan_speed.cpp
  14. fan_speed.hpp
  15. hwmon.cpp
  16. hwmon.hpp
  17. interface.hpp
  18. LICENSE
  19. mainloop.cpp
  20. mainloop.hpp
  21. Makefile.am
  22. readd.cpp
  23. README.iio.md
  24. README.md
  25. sensorset.cpp
  26. sensorset.hpp
  27. sysfs.cpp
  28. sysfs.hpp
  29. targets.hpp
  30. thresholds.hpp
  31. timer.cpp
  32. timer.hpp
  33. util.hpp
README.md

Exposes generic hwmon entries as DBus objects.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.

D-Bus bus names

To enable the use of Linux features like cgroups prioritization and
udev/systemd control, one instance of phosphor-hwmon is intended to
be run per hwmon sysfs class instance.

This requires an algorithm for selecting a stable, well-known D-Bus busname.

The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf
configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default),
ID is a std::hash of the /sys/devices path backing the hwmon class
instance, and N is the implemented phosphor-hwmon D-Bus API version.