summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Emit adding/removing interfaces for object serverHEADmasterLei YU2020-02-133-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The object server currently either creats the objects and interfaces, or defer the signal by not adding objects. In practice, we have situations that the code would like to add interfaces to an existing object, and it's not supported, or needs tricky code to workaround. Exmaples: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-bmc-code-mgmt/+/5820 https://gerrit.openbmc-project.xyz/c/openbmc/openpower-pnor-code-mgmt/+/5346 This commit adds the support by: 1. Adding emit_added() in interface.hpp and the generated server.hpp 2. Adding a enum class in object's constructor to indicate which action to do, to create the object, or adding the interface, or defer signal as before. So the user of object<> could pass `action::emit_interface_added` to the constructor to tell the object server *only* emit interface added to DBus, without emitting object added. The previous code stays the same behavior: * If `true` is passed in object's constructor, it defers emitting object added signal; * If no extra parameter is passed in object's constructor, it emits object added signal as before. Tested: 1. Make sure the openbmc builds fine with https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/25089 because phosphor-logging uses its own server.hpp for interface, the above patch removes that. 2. Manually write a small service to verify the interfaces are added and removed by using the `emit_interface_added` action. 3. Added the unit test cases for object.hpp to check the ctor/dtor with different actions. Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I178c5bed3c9ff39ee2ac8d143fbe9131b0753dfa
* Add valgrind suppressionLei YU2020-01-152-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On latest OpenBMC, sdbusplus CI fails due to valgrind check like below on ppc64le systems: ==5290== Syscall param epoll_ctl(event) points to uninitialised byte(s) ==5290== at 0x4F2FB08: epoll_ctl (syscall-template.S:79) ==5290== by 0x493A8F7: UnknownInlinedFun (sd-event.c:961) ==5290== by 0x493A8F7: sd_event_add_time (sd-event.c:1019) ==5290== by 0x190BB3: phosphor::Timer::Timer(sd_event*, std::function<void ()>) (timer.hpp:62) ==5290== by 0x192B93: TimerTest::TimerTest() (timer.cpp:25) ==5290== by 0x193A13: TimerTest_timerExpiresAfter2seconds_Test::TimerTest_timerExpiresAfter2seconds_Test() (timer.cpp:85) ==5290== by 0x19E11F: testing::internal::TestFactoryImpl<TimerTest_timerExpiresAfter2seconds_Test>::CreateTest() (gtest-internal.h:472) ==5290== by 0x4A52D3B: HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*> (gtest.cc:2447) ==5290== by 0x4A52D3B: testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test * (testing::internal::TestFactoryBase::*)(), char const*) (gtest.cc:2483) ==5290== by 0x4A40BCB: Run (gtest.cc:2693) ==5290== by 0x4A40BCB: testing::TestInfo::Run() (gtest.cc:2676) ==5290== by 0x4A40DC3: Run (gtest.cc:2825) ==5290== by 0x4A40DC3: testing::TestCase::Run() (gtest.cc:2810) ==5290== by 0x4A414AF: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:5216) ==5290== by 0x4A5329B: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2447) ==5290== by 0x4A5329B: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl:: *)(), char const*) (gtest.cc:2483) ==5290== by 0x4A416AF: testing::UnitTest::Run() (gtest.cc:4824) ==5290== by 0x4A90917: RUN_ALL_TESTS (gtest.h:2370) ==5290== by 0x4A90917: main (gmock_main.cc:69) ==5290== Address 0x1fff00eafc is on thread 1's stack ==5290== in frame #0, created by epoll_ctl (syscall-template.S:78) ==5290== The root cause is: 1. GCC has a bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77992, that the padding bytes are not initialized. 2. In systemd, the code in [libsystemd/sd-event/sd-event.c][1] using epoll_event hit the above bug: typedef union epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } epoll_data_t; struct epoll_event { uint32_t events; /* Epoll events */ epoll_data_t data; /* User data variable */ } __EPOLL_PACKED; In glibc, on x86, `__EPOLL_PACKED` is defined as `__attribute__ ((__packed__))`[2], so it's packed and there are no internal padding bytes; On other architectures (e.g. ppc64le), __EPOLL_PACKED is not defined and thus there are 4 internal padding bytes between `events` and `data`, that are not initialized. 3. When epoll_ctl() is invoked, in [Linux kernel][3], it does a copy_from_user() to copy the whole struct into kernel space. That's why Valgrind reports "epoll_ctl(event) points to uninitialised byte(s)", only for non-x86 platforms. 4. The timer test in this repo invokes sd_event_add_time() and eventually hit the above code. The GCC bug is not resolved from 2016. The systemd code is actually correct. There is a [PR][4] sent to systemd trying to workaround the issue, and it is being discussed. Before GCC bug is resolved or systemd PR is accepted, suppress the valgrind error to make it pass the CI. [1]: https://github.com/systemd/systemd/blob/v242/src/libsystemd/sd-event/sd-event.c#L961 [2]: https://github.com/bminor/glibc/blob/f1a0eb5b6762b315517469da47735c51bde6f4ad/sysdeps/unix/sysv/linux/x86/bits/epoll.h#L29 [3]: https://github.com/torvalds/linux/blob/d1eef1c619749b2a57e514a3fa67d9a516ffa919/fs/eventpoll.c#L2095 [4]: https://github.com/systemd/systemd/pull/14353 Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I3a29fd0e28e5c7b69037a7ef2ef9571f93d80df7
* Fix vtable CI errorLei YU2020-01-152-22/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CI reports failure in VtableTest.SameContent, where the case is comparing the binary of example vtables constructed from sdbusplus and macros defined in systemd. The root cause has two parts. Part I: When systemd is updated, the members in struct sd_bus_vtable is updated, e.g. * From v239 to v242, sd_bus_vtable.x.start is updated from struct { size_t element_size; } start; to: struct { size_t element_size; uint64_t features; } start; and sd_bus_vtable.x.method is updated from struct { const char *member; const char *signature; const char *result; sd_bus_message_handler_t handler; size_t offset; } method; to: struct { const char *member; const char *signature; const char *result; sd_bus_message_handler_t handler; size_t offset; const char *names; } method; * From v242 to v243, sd_bus_vtable.x.start is updated to struct { size_t element_size; uint64_t features; const unsigned *vtable_format_reference; } start; The code in vtable.hpp only assign the members in v239, the new members are intialized with 0, so it differs from the vtable constructed from macros defined by systemd. The fix is to use macros from systemd in vtable.hpp as well, which is suggested by systemd: > Please do not initialize this structure directly, use the > macros below instead Part II: The `const char *names` in struct method and signal introduced between systemd v239 and v242 is a pointer to const strings. By default they are "empty" strings, but there is no guarantee that the compiler will use the same pointer for the same string. So the test case can not assume the binaries are the same for two vtables even they are constructed with the same parameters. Update the test case to use real `const char*` and handler/get/set functions and check each member of the struct instead of comparing the binary data by memcmp. Tested: Verify the CI passes. Change-Id: I9e94ff16075dd3f12d73e96438c0d864203bdcf4 Signed-off-by: Lei YU <mine260309@gmail.com>
* native_types: Fix string_wrapper overloadsWilliam A. Kennington III2019-06-141-0/+19
| | | | | | | | | | We should only coalesce to an r-value reference to our internal string if our object is a move reference. This fixes ambiguous overloads with gcc9. This also ensures that const references cannot be ambiguous with move references by requiring a const volatile reference. Change-Id: I31ed529c015cc311c9933acbc0f0a4aa50fed3a6 Signed-off-by: William A. Kennington III <wak@google.com>
* std::variant: Remove uses of the variant_nsWilliam A. Kennington III2019-04-052-22/+20
| | | | | | | | | | | Now that we are using std::variant we should reference it directly instead of using our own namespace alias. Tested: Built and ran through unit tests. Change-Id: Ic3fd62ea74cf808b85ad7b7ffcce8c0a0bfb125d Signed-off-by: William A. Kennington III <wak@google.com>
* autotools: Fix for autoconf-archive 2019.01.19William A. Kennington III2019-03-151-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: Ibb95188264f3fece4a18dbcb98f3e90f8350ff21 Signed-off-by: William A. Kennington III <wak@google.com>
* bus: Only close connections we ownWilliam A. Kennington III2019-01-141-1/+1
| | | | | | | | | | | | | | | | | | | If we have multiple code segments in the same thread acquiring the default bus, we end up with the potential for one of those handles to be destroyed, calling sd_event_flush_close_unref(). This terminates the bus for all users of the same reference. Any of the reference which still exist after the first destroy will then return ENOTCONN for all bus operations since it is now closed. This behavior is undesirable as we expect to be able to have transient bus references. However, we do want to make sure we clean up any buses created by sd_bus_open(). See openbmc/phosphor-time-manager@4e84539349dac086ce2a58e5b9900ed4e40a2eaf for a specific example of this behavior being unwanted. Change-Id: I8aad7e282e9d66993b63e85532dce37c179ad5dc Signed-off-by: William A. Kennington III <wak@google.com>
* message: Fix variant api usageWilliam A. Kennington III2018-10-052-6/+10
| | | | | | | | | | | This makes our use of the mapbox variant consistent with std::variant. We need this cleanup for the conversion to std::variant. Tested: Ran unit tests to make sure they still pass. Change-Id: I990013eaaa2ec27f2fda71bfadd9a5369d50c187 Signed-off-by: William A. Kennington III <wak@google.com>
* exception: Add .get_errno() methodAdriana Kobylak2018-09-211-0/+9
| | | | | | | | | | | | | | | | | Add the .get_errno() method to provide the errno value from SdBusError. Closes openbmc/sdbusplus#22 Tested: Added check for the new method to the exception unit test suite. Also verified external callers get the right errno value with: catch (const SdBusError& e) { int errno = e.get_errno()); } Change-Id: Idddfa7f1bd9cfabfaf89e4d6c83146b4b9af211f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* add common timer.hpp unit testsVernon Mauery2018-09-172-1/+267
| | | | | | | | Add unit tests for timer.hpp class. These are the unit tests copied from the phosphor-host-ipmid/softoff/test directory. Change-Id: I9d74c6eb528f652965f43a3a4b973368ed782bf0 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* clang-format: Fix pointer alignmentWilliam A. Kennington III2018-08-312-55/+54
| | | | | | | | | | Oenbmc documentation specifies a left alignment for pointers. Our current format tries to left align if neither alignment is strictly followed, but will allow right aligned files to exist. Lets make this more strict so that all of our files are consistent. Change-Id: I3a50043d28a9c25d0cf1ffb752800d05eb7615e1 Signed-off-by: William A. Kennington III <wak@google.com>
* clang-format: always break template declarationsPatrick Venture2018-08-313-3/+6
| | | | | | | To better match the defined openbmc style. Change-Id: I68cda43857768bae4c904c367942cb1f0efa3e0c Signed-off-by: Patrick Venture <venture@google.com>
* update .clang-format header inclusion orderPatrick Venture2018-08-3110-15/+28
| | | | | | | | Added the header inclusion order to the .clang-format file generated these changes. Change-Id: Ia31b21d7ea451cac0309828006bc17c27cbd5bd5 Signed-off-by: Patrick Venture <venture@google.com>
* clang-format-6.0 bump fixesPatrick Venture2018-08-311-1/+1
| | | | | | | The bump to use clang-format-6.0 now reports these issues. Change-Id: Ice27766e161356f08c98923a256a98af787ac8a2 Signed-off-by: Patrick Venture <venture@google.com>
* Spelling fixesGunnar Mills2018-08-141-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I99921bb9541fb37cb8999337a72d540494fbb4d7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Remove multiple inheritance from SdBusErrorVernon Mauery2018-08-061-13/+17
| | | | | | | | | | | SdBusError now has a direct line of inheritance down to std::exception and will behave better when trying to catch it as a std::exception. Add test cases to check that SdBusError is actually caught by std::exception and all its other base classes. Change-Id: I83e614219a1c47ec874ee0b4f14096a5e69ac17d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* tests: Add valgrind memcheck supportWilliam A. Kennington III2018-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to build sdbusplus test cases and run them through valgrind using the build system. Simply run: `make check-valgrind` and the test cases will be run through valgrind NOTE: This leaves out drd, helgrind, and sgcheck support as they would requires extensive test refactoring. We don't really use threading in the library code anyway so they are really only useful for proving the test cases don't have any races. Tested: sdbusplus can still be built without valgrind and tests will still execute normally. If `./configure --enable-valgrind` is passed the configure script fails if valgrind is not present. Even with valgrind, tests are only run through valgrind with `make check-valgrind`. This succeeds as expected. Change-Id: I08972feef2f32cf3ef912da4658e2d8920fb0275 Signed-off-by: William A. Kennington III <wak@google.com>
* test/message/read: Test that our error handling cases workWilliam A. Kennington III2018-07-091-6/+236
| | | | | | | | | | | | This improves our test coverage of sd_bus_message read functionality to 100%. Tested: Ran through the usual unit test scripts including valgrind and code coverage. Change-Id: Ifa849d05364349e27e39c6dda5e4cab4efa35476 Signed-off-by: William A. Kennington III <wak@google.com>
* test/message/read: Add missing variant skipWilliam A. Kennington III2018-07-091-0/+18
| | | | | | | | | | | | | We were missing a test of the variant code which is used when the type of the variant provided by the caller does not contain the type needed at runtime to store the data in the message. This tests to make sure that the skip is issued correctly when we can't read out the member. Tested: Unit tests still build and pass Change-Id: I41fdc3e40589f1feedfadc3ab33fe808ff3a6d16 Signed-off-by: William A. Kennington III <wak@google.com>
* test/message/read: Use googletest and mocksWilliam A. Kennington III2018-07-092-435/+301
| | | | | | | | | | | | | | | | Similar to the append test, this test case relied on an ad-hoc system using a separate daemon thread for echoing the messages back to each of the unit tests. We don't want to depend on a system dbus instance if we can avoid it. Instead, use the mocking system to make sure the correct dbus calls are made when reading messages and ensure the resulting output is built as expected. Tested: Build still works and all test cases pass. Ensured that the coverage of the tests is the same as the old test cases. Change-Id: I8d71c031391b962f1de6684d927b81e132c0886d Signed-off-by: William A. Kennington III <wak@google.com>
* test/message/append: Use googletest and mocksWilliam A. Kennington III2018-07-092-606/+306
| | | | | | | | | | | | | | | | | | | | | The current test case depends on the system running a dbus daemon that our test case can register and run a service with. It runs in multiple threads and requires using raw sd_bus_message calls to determine if the appends worked correctly. When systemd 237 becomes the minimum version we could rely on message sealing and other new public members to deal with the daemon issues. However, it will be a while before we can make that the default version. Lets mock out the expectations for the underlying sd_bus_message calls to validate that we will build correct objects when using our message.append() calls. Tested: Converted the tests from the old test cases to this new format keeping very similar test functionality. Tests still pass. Change-Id: Iafc8662389fe60ca2d519abfe472c61292f3239a Signed-off-by: William A. Kennington III <wak@google.com>
* test/type_traits: Convert to gtestWilliam A. Kennington III2018-07-092-12/+17
| | | | | | | | | This is a fairly minimal and non-invasive change. This test doesn't really require the googletest framework since it is just using static_asserts. However, this moves us toward uniform testing. Change-Id: I35d507cf6c97384146120d4f8f1b5a2e52834a6d Signed-off-by: William A. Kennington III <wak@google.com>
* SdBusError: Add test casesWilliam A. Kennington III2018-07-092-0/+157
| | | | | | | | | | | | This adds basic unit testing to the SdBusError class so we have full coverage of all the functionality. Tested: Ran through the unit test suite including the changes that build valgrind runs and code coverage suppport. Change-Id: I6d3bdbd2e0332ae5372796cb2a380ccddbee10ec Signed-off-by: William A. Kennington III <wak@google.com>
* test: Support mocking with googletestWilliam A. Kennington III2018-07-091-2/+3
| | | | | | | | | | | | | | We should include gmock in our gtest dependencies so that we can use it in future test cases. There is no harm in adding this depdency as we should always build it with googletest and doesnt interfere with current gtests. Tested: All of the tests still pass and newer tests using gmock will now work. Change-Id: Ie53f63f4926b88178c384cc1150b98555dafd7ec Signed-off-by: William A. Kennington III <wak@google.com>
* tests: Add code coverageWilliam A. Kennington III2018-07-091-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | We want to be able to measure code coverage for our test cases. This patch adds initial support for measuring the coverage of all of the files in the repo when running the test cases. Simply run: `make check-code-coverage` and an lcov report will be generated NOTE: This doesn't yet add any filtering to throw out the results for system headers and tests cases, but the list of results isn't long so it is easy to see the relevant coverage results and we don't want to add any false negatives. Tested: Sdbuplus plus still builds fine without the code coverage utilities by default. sdbusplus now builds with `./configure --enable-code-coverage` and corrects the libs and cflags accordingly to enable coverage. Make then succeeds to generate a report when run with `make check-code-coverage` Change-Id: I7f640b82e771bc9043abf381d14393be54c3e672 Signed-off-by: William A. Kennington III <wak@google.com>
* tests: Write our own assert()William A. Kennington III2018-06-272-152/+177
| | | | | | | | | | | | | | | | The cassert `assert()` function is only provided when NDEBUG is not defined. Otherwise `assert()` becomes a no-op breaking our test cases. Since we rely on the behavior of assert to validate the tests, we always want to provide one for the test implementation. This functionality will be useful once code coverage is added since that forces NDEBUG to be passed to the preprocessor. Tested: Test cases still work correctly if unmodified, and any changes that should cause the asserts to fail still fail as expected. Change-Id: I8d4132058308566310c58b7ae3e121eae55d37f5 Signed-off-by: William A. Kennington III <wak@google.com>
* tests: Makefile flags cleanupWilliam A. Kennington III2018-06-271-24/+16
| | | | | | | | | | | | | | | This makes sure the correct flags are passed for each stage of compilation and simplifies the logic for each different test case by providing uniform flags for all of them. This also makes us link against libsdbusplus instead of the individual object files so that we don't need to track object implementation details from the source base of the project. Tested: Test cases still build and pass. Change-Id: I8474d93d2c3f72a4b500c93016f3b7d7afe07b3c Signed-off-by: William A. Kennington III <wak@google.com>
* configure: Make gtest detection more flexibleWilliam A. Kennington III2018-06-271-2/+2
| | | | | | | | | | This modifies the configure script to pull the googletest information from pkgconfig. Now we don't have to manually configure GTEST specific flags, we gain the correct library and header paths automatically. It still understands how to detect googletest without pkgconfig if needed. Change-Id: I7add3ee3073252adac7199415154c6805221e362 Signed-off-by: William A. Kennington III <wak@google.com>
* tests: Fix memory leak from sd_bus callsWilliam A. Kennington III2018-06-272-4/+13
| | | | | | | | | | | | Some of the calls into sd_bus leak memory because they never unreference the bus or messages. Fix this so we can eventually enable leak checking from valgrind. Tested: Ran through valgrind and the errors went away. Change-Id: Icc3d5d0860b3852401219c1ca511a1bc26aa1c48 Signed-off-by: William A. Kennington III <wak@google.com>
* test: Makefile.am: add missing exception dependencyPatrick Venture2018-06-271-4/+11
| | | | | | | | The read header includes references to the SdBusError object but doesn't link against anything providing it. Change-Id: Id3e9f88557c1b4eeaedd095cb50515f08055e685 Signed-off-by: Patrick Venture <venture@google.com>
* Fix test/Makefile.am to pass build on x86-64 SDKLei YU2018-05-291-3/+11
| | | | | | | | | | | | | | Modify test/Makefile.am to link against pthread, otherwise it gets link failures related to pthread. Add OESDK flags, otherwise the binaries fails to execute on host. Tested: Building the tests well on x86-64 SDK. Executing of the tests are OK. But several test cases fail or stuck at running. Change-Id: I649d7ec566a44fe51d2b8c852cb20d8769b28d30 Signed-off-by: Lei YU <mine260309@gmail.com>
* sdbusplus::message::message Add sdbus interface injectionPatrick Venture2018-05-291-4/+4
| | | | | | | | | | | | By default message will use the sdbus singleton that points to the real library calls, however you can now pass in an interface pointer for it to use instead. This is handled automatically when the message is created by the sdbusplus::bus::bus as it will pass in its own interface upon creation (via a later CL). Note: This was originally part of another patchset. Change-Id: Iad49164f1a648e6d3af7d288a8953b5a5ab051bf Signed-off-by: Patrick Venture <venture@google.com>
* Allow reading and appending of more complex typesEd Tanous2018-03-072-0/+191
| | | | | | | | | | | | | | | | | | | | | This commit makes sdbusplus compatible with most containers that meet a few requirements. This includes: std::unordered_map std::array std::set boost::flat_set boost::flat_map Read requires a container to support emplace or emplace_back methods. Append requires a container to suport a const iterator Tested: The top level OpenBMC compiles properly, and the sdbusplus unit tests compile and pass, and unit tests have been updated with a few new types to ensure we see any breakages. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I5eb1cf7dc07bacc7aca62d87844794223ad4de80 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Update repo to conform to openbmc code standardAndrew Geissler2018-02-059-143/+112
| | | | | Change-Id: If1d6b1f04514367cc544c2507a845b3e9d6d3435 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
* match: add string constructorsPatrick Williams2017-05-021-3/+3
| | | | | Change-Id: Ifb6527c5bc686f65fea28679bc653f0509de4aec Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* match: add utilities for match-rulesPatrick Williams2017-05-021-8/+9
| | | | | Change-Id: I47a8c6044f7275994b124e90984cbd8dbef0f0ed Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* match: allow message callbacksPatrick Williams2017-05-011-2/+49
| | | | | | | | | | | The original match constructor only allowed sd_bus_message_handler_t functions, which does not allow for sdbusplus::message::message's to be passed in. Add a constructor that allows functions of the following type: void(*)(sdbusplus::message::message&) Change-Id: Idc006250777c5cc1a5fe48fc411da24339ca165e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* build: use LDADD/LIBADDPatrick Williams2017-05-011-11/+11
| | | | | | | | | | | Rather than manipulate LDFLAGS directly, the correct way to pass additional linked-to libraries is via the LDADD and LIBADD variables for executables and libraries respectively. Convert all cases of -lfoo to LDADD/LIBADD. Change-Id: Id5fb8539b3fa875430f297de37ad0f3e4ecc3726 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* test: add test for bus::matchPatrick Williams2017-05-012-0/+55
| | | | | Change-Id: Ia45c659a6d88e8a688bcdc92a084a8edc7455ba8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* test: convert message_native_types to gtestPatrick Williams2017-05-022-12/+29
| | | | | Change-Id: I8aa9e996505d3083ff5650c3fa5107d4143ff482 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* test: convert message_types to gtestPatrick Williams2017-05-022-21/+28
| | | | | Change-Id: Ifb5d2b9f4cb5c6700f5c0164466cc5289ee40a26 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* test: convert tuple_to_array to gtestPatrick Williams2017-05-022-7/+10
| | | | | Change-Id: Ie110fba8f1961ba0e1a46c670d98a2351a46d061 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* test: convert vtable to gtestPatrick Williams2017-05-022-7/+10
| | | | | Change-Id: Ic54957df1c8d08c5461b262628fd1cc5c27217d7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* bus: add wrapper for sd_bus_list_namesPatrick Williams2017-05-022-0/+55
| | | | | Change-Id: I94467376e89cc813e270cbbe27b83c4415bb9d85 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message-append: Add more string test casesPatrick Williams2017-02-151-4/+45
| | | | | | | Add cases uncovered by openbmc/openbmc#1025. Change-Id: I680b95b2127d50837dccd3ea1ff655fc1eb19ec9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Allow implicit string_wrapper conversionsBrad Bishop2017-01-301-0/+10
| | | | | | | | | | | | | Add comparison operators to allow string_wrappers to be implicity converted to strings for comparisons to cut down on casting and/or str member access. Do not allow std::string to be impliclitly converted to object_path to avoid a temporary string copy. Change-Id: I2e45a4fc3ee07d1df55f6fab2cfa35da205c150e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message: allow obj-path and sig in STL containersPatrick Williams2017-01-101-0/+12
| | | | | | | | Allow object_path and signatures to be used in std::vector, std::map, and std::unordered_map. Change-Id: Ieb592aa518bfae08da393632a1dd0ed0dd684c7a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message-read: support obj-path and signaturePatrick Williams2017-01-091-0/+28
| | | | | Change-Id: Iafc2f26a10f0c5c84805e1d28bea8f17eaadc03c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message-append: support obj-path and signaturePatrick Williams2017-01-091-0/+27
| | | | | Change-Id: I44d5195eba14c17f38cf2bf2b09eb071d54f59d8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* message-types: support obj-path and signaturePatrick Williams2017-01-091-0/+7
| | | | | Change-Id: I7cb1563af3375f2a8b22c78ac59f7e69f176933f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
OpenPOWER on IntegriCloud