summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* autotools: RemoveWilliam A. Kennington III2019-04-261-62/+0
| | | | | | | Meson is now used to build this package in all of the necessary places. Change-Id: Ic5155621967fa94ec03eced2193e0d453b174eba Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Use declare_dependency for librariesWilliam A. Kennington III2019-04-031-3/+1
| | | | | | | | | Now example binaries and tests don't have to be aware of the nuances for configuring the build to use the library. This makes the project library look like any other system dependency. Change-Id: Ife3bcd3dcbd423f08c513f9a05fc8cabff41e2f6 Signed-off-by: William A. Kennington III <wak@google.com>
* internal/utils: performCallback should preserve argument referencesWilliam A. Kennington III2019-03-291-0/+17
| | | | | | | | Arguments including the function are now passed with reference types forwarded. Change-Id: I32cf4704737faa6c140d16352528ceb0d738f5b8 Signed-off-by: William A. Kennington III <wak@google.com>
* source/base: Remove unused ref constructorWilliam A. Kennington III2019-03-291-22/+0
| | | | | | | | | | | | We don't ever use this constructor and it was effectively package private. Remove it as we don't ever need to add references to our sd_event_source*. Tested: Built and run through unit test suite. Change-Id: I1ca9fd4ecfdef1a3fd5aa2ca214be657c1a04b94 Signed-off-by: William A. Kennington III <wak@google.com>
* internal/sdref: Remove in favor of stdplus/handleWilliam A. Kennington III2019-03-294-249/+9
| | | | | | | | | | | We no longer need to roll our own managed handle type now that stdplus implements a generic one. Tested: Built and run through unit tests. Change-Id: Id34cd8d3ffacf7901d49cac335fa93f744f0e310 Signed-off-by: William A. Kennington III <wak@google.com>
* autotools: Fix for autoconf-archive 2019.01.19William A. Kennington III2019-03-181-1/+0
| | | | | | | | | The code coverage macros from the archive changed in a backward incompatible way. This adds a workaround to autodetect either version and do the right thing Change-Id: Ic010ed59fb332e19e5c76f60e55f864f8f4a43f8 Signed-off-by: William A. Kennington III <wak@google.com>
* clang-tidy: Basic configurationWilliam A. Kennington III2018-12-132-2/+9
| | | | | | | | | | | This also cleans up some outstanding issues detected by the configuration. Tested: Ran through unit test scripts. Change-Id: I3357a2280a681a87532d6d72315260db2ab73e87 Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Add alternative build systemWilliam A. Kennington III2018-12-131-0/+25
| | | | | | | | For now both autotools and meson will be maintained side by side. Eventually we should remove the autotools build system. Change-Id: I04382b17d5267ee218e2658fc163da17853f637a Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Implement callback settingWilliam A. Kennington III2018-10-301-0/+7
| | | | | | | | | | | All of the other classes that take callbacks support having the callback updated. Tested: Builds and passed through the unit test suite. Change-Id: I0efcd074523fa6ec0cc84c7a930346dd9340f7ec Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Make movableWilliam A. Kennington III2018-10-291-0/+41
| | | | | | | | | | | | Now that we can update the callbacks of our sources, we can move the timer object freely by updating the callback when moved. Tested: Unit tests pass, and we no longer see any valgrind issues when moving the timer object. Change-Id: I15baf97538459ca8b9c48b75dba77d09b7b5075b Signed-off-by: William A. Kennington III <wak@google.com>
* source/*: Make updating callbacks possibleWilliam A. Kennington III2018-10-295-0/+21
| | | | | | | | | | | | Sometimes callers want to be able to update the callback used when the source is acted upon. This is needed for updating references stored in the callback. Tested: Run through the unit test suite. Change-Id: I78bda32569287964bfc9d49501869d3a2b497f3d Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Make it possible to get the EventWilliam A. Kennington III2018-10-181-0/+1
| | | | | | | | | | | | Other event sources expose the ability to get th event used for constructing the source. Since our timer is basically just a time source, we should be able to trivially get the event object. Tested: Built and run through unit tests Change-Id: I4b4192797652a903cba90d6e73771014df7702d6 Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Implement oneshot timersWilliam A. Kennington III2018-09-261-16/+166
| | | | | | | | | | | | | | | This change is meant to enable users of the old openbmc timer class to trivially use the timer if they only want single executions. It also makes setting up the timer less verbose if you do not already know the timeout interval. Tested: Run through unit tests and did a sample integration with phosphor-watchdog and phosphor-networkd. Verified that the new oneshot example works as expected. Change-Id: I2cd006d1f19fff99bce3f732a16eac9ca9553666 Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Callback should pass in the timerWilliam A. Kennington III2018-09-251-1/+1
| | | | | | | | | | | | | | This makes the timer better resemble the other source types, and makes it easier to access timer properties from the callback. Since we do not yet have any committed users of this API it is safe to change it. Tested: Unit tests were run and builds work fine. Change-Id: I9ecb24a20bc822b2ab55900e47a7cae834ba873d Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: ImplementWilliam A. Kennington III2018-09-192-0/+268
| | | | | | | | | | | | | We often need a continually ticking timer for our daemons. This utility wraps an sd_event time source as a convenience. This is meant to be a usable replacement for the timer.hpp found in other openbmc projects. Tested: New tests pass with full coverage. Changes to the phosphor-watchdog that rely on this utility work as expected. Change-Id: Id12aed9e5b018e7eca825c4a7ac7b4f46e2f04c6 Signed-off-by: William A. Kennington III <wak@google.com>
* test: Build test cases with their respective c++ filesWilliam A. Kennington III2018-09-191-8/+8
| | | | | | | | | | | | The current build situation places the test wrappers and logs into the top level test directory. We can actually build and run these binaries ink the subdirectories containing the test sources. Do this. Tested: Run through the unit test suite and all test still show up and pass. Change-Id: Ia5c9957242ae4df88dca6433682dc66bbbc3d684 Signed-off-by: William A. Kennington III <wak@google.com>
* Upgrade to C++17William A. Kennington III2018-09-111-4/+5
| | | | | Change-Id: I0efd11f488ceee9b1a03ffaa1522cf0182ae1aca Signed-off-by: William A. Kennington III <wak@google.com>
* source/base: Improve some method typesWilliam A. Kennington III2018-07-231-6/+7
|
* event: Fix watchdog typesWilliam A. Kennington III2018-07-231-15/+18
|
* source/event: Rename Event to EventBaseWilliam A. Kennington III2018-07-231-9/+15
|
* source/io: Temporarily remove {get,set}_fd_ownWilliam A. Kennington III2018-07-231-31/+0
| | | | | | | These functions were implemented only in newer systemd 237+. We often deal with older verisons so lets add them back after some time passes. We could also make them an optional autodetected feature to work around the issue.
* source/child: ImplementWilliam A. Kennington III2018-07-222-0/+168
|
* source/signal: ImplementWilliam A. Kennington III2018-07-222-0/+165
|
* source/io: ImplementWilliam A. Kennington III2018-07-222-0/+263
|
* test/source/event: Add missing <type_traits>William A. Kennington III2018-07-221-0/+1
|
* source/event: Implement event_handler style sourcesWilliam A. Kennington III2018-07-222-0/+157
|
* test/time: Missing functionalWilliam A. Kennington III2018-07-221-0/+1
|
* test/time: Validate callbackWilliam A. Kennington III2018-07-221-0/+2
|
* source/time: ImplementWilliam A. Kennington III2018-07-192-0/+209
|
* source/base: Make callback handling genericWilliam A. Kennington III2018-07-171-1/+3
|
* internal/utils: Errors now have namesWilliam A. Kennington III2018-07-171-5/+7
|
* source/base: Refactor out callback routineWilliam A. Kennington III2018-07-173-30/+57
| | | | | The callback mechanism will be used by other callback methods in the same fashion, so we can template and re-use this functionality
* source/base: Support automatically configuring userdataWilliam A. Kennington III2018-07-171-1/+30
| | | | | This makes callbacks work correctly as the systemd callback functions need to know where to look for the object storing the real callback.
* test/source/base: Clean up duplicated codeWilliam A. Kennington III2018-07-171-192/+110
|
* source/base: Implement movingWilliam A. Kennington III2018-07-171-0/+162
|
* source/base: Make it possible to get the prepare callbackWilliam A. Kennington III2018-07-171-0/+8
|
* source/base: Make it possible to get the underlying sd_event_sourceWilliam A. Kennington III2018-07-171-6/+9
|
* source/base: Only disable the event if it existsWilliam A. Kennington III2018-07-171-0/+10
| | | | | This shouldn't happen in practice but will be needed to supporting moving.
* source/base: Take an event directly instead of sdeventWilliam A. Kennington III2018-07-171-13/+46
| | | | Also expose a mechanism for retrieving our internal event.
* event: Add trivial functionsWilliam A. Kennington III2018-07-171-0/+127
|
* clock: Add class for future useWilliam A. Kennington III2018-07-172-0/+63
|
* event: Allow extracting the event and sdevent implWilliam A. Kennington III2018-07-171-0/+8
|
* sdref: Moves should actually invalidate the referenceWilliam A. Kennington III2018-07-171-0/+41
| | | | | This also makes it possible to use in boolean expressions to check validity.
* test/event: Fix extraneous Event creationWilliam A. Kennington III2018-07-171-3/+1
|
* source/base: Add the prepare callback functionalityWilliam A. Kennington III2018-07-171-0/+70
|
* source/base: Expose trivial built in methodsWilliam A. Kennington III2018-07-171-4/+155
|
* Large refactoringWilliam A. Kennington III2018-07-176-96/+105
|
* makefile: Clean up compiler flagsWilliam A. Kennington III2018-07-171-8/+6
|
* event: Add watchdog functionsWilliam A. Kennington III2018-07-171-8/+60
|
* source: Add classWilliam A. Kennington III2018-07-172-0/+44
|
OpenPOWER on IntegriCloud