| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
To better match the defined openbmc style.
Change-Id: I68cda43857768bae4c904c367942cb1f0efa3e0c
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Added the header inclusion order to the .clang-format file generated
these changes.
Change-Id: Ia31b21d7ea451cac0309828006bc17c27cbd5bd5
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: If1d6b1f04514367cc544c2507a845b3e9d6d3435
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
| |
Add cases uncovered by openbmc/openbmc#1025.
Change-Id: I680b95b2127d50837dccd3ea1ff655fc1eb19ec9
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I44d5195eba14c17f38cf2bf2b09eb071d54f59d8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
| |
Added test-cases for false r-value reference and l-values,
in addition to existing false value.
Change-Id: I36952f06d84f9da157a618fbe093a8ca63662ceb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
Both message/append and message/read were using the same
service name for testcases. Ensure they use different service
names to allow parallel execution of test cases.
Change-Id: I060c03f69db0484b863af7cb45578f183cdff331
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
| |
Thread functions (non-void) were missing a return.
Change-Id: Ib7804d92f79b96428285058101e64dceea7ad66e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I631046f3e6d46c299f5907ad811656be3d66ea60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I682275405e3c4f7c798317a60ea070b3b1a0846c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: If914032fa4f655af509ac58a5e0057968f71aa32
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I3b5510b8ba400cf4d3f936f01708cb17aa009e62
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I1820ee2213feb37fab10a491b1099032fd48c18d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I00f913695d0db75a07d1b0520f507ee7dc469129
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: Ida08a84e5a7844ed1afd80d3319d2dfc8b77c5e1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
| |
Change-Id: I29a03b146d5c050a13b4bab690d450612797f2ce
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
|
|
|
|
|
|
|
| |
Add C++ bindings for the sd_bus_(bus) class interfaces. This
binding creates a unique_ptr wrapper around sd_bus*, using the
appropriate sd_bus deref calls when the unique_ptr leaves scope.
Change-Id: I0bb3842e384217ac5606bb3bf350d7fc3babf1ad
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
Adds C++ binding to sd_bus_message_append* class functions. Uses
type deduction to identify all of the parameters passed to the
append function and, at compile-time, creates the appropriate dbus
type string.
Example:
sdbusplus::message::append(m, "asdf"s);
Is equal to:
sd_bus_message_append_basic(m, 's', ("asdf"s).c_str());
Rather than use a naive sequence of ..._append_basic calls, the
implementation will attempt to group multiple basic types into a
single sd_bus_message_append call.
Change-Id: I1341a0299573c61588fe225c07174b743cb3a282
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|