summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* hwmon module unit-tests -- first onePatrick Venture2018-04-243-0/+33
| | | | | | | | 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>
* test: moved to toolsPatrick Venture2018-04-246-246/+0
| | | | | | | | | | | Moved the current test folder to tools and started a new test folder. This will allow for rapid introduction of new unit-tests into phosphor-hwmon. The tools folder contains small tools to aid in phosphor-hwmon configuration and misc. This folder will go under review at another time. Change-Id: Ice18ffb5cdcbd519d49088e233a8082a9410b03e Signed-off-by: Patrick Venture <venture@google.com>
* Add findHwmonFromDevPath()Matt Spinler2018-03-071-0/+6
| | | | | | | | | | | | | | | | | | This function can find the hwmon path from a /devices path. This path is similar to what udev lists as the device path, but with the /hwmon/hwmonN directories removed from the end. In addition, any ':' characters in the path have been converted to '--', so the code needs to convert them back. This is done because some devices are not in the device tree, and hence wouldn't have the open firmware device path that the code previously only supported. Tested: Tested with the new /devices path. Change-Id: Ic26646c6f609323cff86d4cd10bbe0a44d7d61ac Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Rename functionMatt Spinler2018-03-051-1/+1
| | | | | | | | | | | A future commit will add a new function to find the hwmon device from a different type of path, so clarify the current function name in preparation. Tested: Compiled Change-Id: I3c990f4a91b12e592e22818b085dcd3736e5fcde Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* sysfs IO enhancementsBrad Bishop2017-09-081-2/+7
| | | | | | | | | | | | | | | | | | Add retries for some sysfs IO errors: EIO: Tolerate intermittant device or bus failures. ETIMEDOUT: Tolerate intermittant timeouts. EAGAIN: Tolerate drivers that do not block. ENXIO: Tolerate momentarily unplugged devices on busses that don't support hotplug. EBADMSG: Tolerate CRC errors. Flush stdio buffers after writes. Remove redundant retry and delay constants. Resolves: openbmc/openbmc#2262 Change-Id: I2104139bf7ced96bb10f7450b42ca36e61c84287 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* test: Add a number of test applicationsBrad Bishop2017-08-315-1/+163
| | | | | | | Add a number of applications for testing. Change-Id: I2d85c33d0d85f2a551e644a722107bb78250b2cd Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* mainloop: Cache devpath at startupBrad Bishop2017-08-311-0/+1
| | | | | | | | | | Currently the devpath is determined after a bus error to make a callout. Finding the path at startup is less prone to race conditions around ENOENT on driver unload in the event of a callout. Change-Id: I8ce8d9f630c8b7ecc398082002aa113ab352d3cb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Build: Autotools usage improvementsBrad Bishop2017-03-081-3/+8
| | | | | | | | | | | Use libtool defaults. Define CXXFLAGS rather than CFLAGS. Add libraries via LIBADD rather than LDFLAGS. This allows --as-needed to drop unnecessary libs if present. Don't bother with PIC objects for convenience library. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I4a6079402a01ad5f6ccfb71ca9fca44c567ec62d
* Link to libphosphor_dbusBrad Bishop2017-02-161-2/+2
| | | | | | | Remove manually generated server bindings. Change-Id: I77ccda7f669d58f55e86ee5887dbbb380c673390 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Test: Remove unnecessary server_thread methodBrad Bishop2017-01-171-10/+6
| | | | | | | | | std::thread allows any callback signature so remove the usual pthread void * foo(void *) wrapper when starting the server thread. Change-Id: I3b9e705da97258933a0c6b294c2c3bbdb8f98a27 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Avoid unnecessary move operationBrad Bishop2017-01-171-4/+4
| | | | | Change-Id: I7fcdbb653b36cfd1bb2566bf59861867d368c9df Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Grab DBus connectionBrad Bishop2017-01-131-0/+1
| | | | | | | | Connect to DBus and own a busname. Create a freedesktop ObjectManager. Change-Id: I186dadc5a5172f44edf9cfc8d0a338677636de04 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add config optionsBrad Bishop2017-01-131-1/+3
| | | | | | | | Obtain the DBus service name prefix and sensors namespace root path from the configure script. Change-Id: I5c48882b62b09a466b3b7b30b3935d65ccc58326 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add testcaseBrad Bishop2017-01-133-0/+68
Add a basic test that simply runs the server. Change-Id: Ie682df8cf4dd755852e4fb07ccbc83e8bb13d629 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud