#
88c6a823 |
| 10-Sep-2024 |
Lei YU <yulei.sh@bytedance.com> |
message: Fix unpack void type
The template unpack<void> is deduced as one argument instead of 0, and results in below compile error: ``` error: variable or field ‘r’ declared void error: return-stat
message: Fix unpack void type
The template unpack<void> is deduced as one argument instead of 0, and results in below compile error: ``` error: variable or field ‘r’ declared void error: return-statement with a value, in function returning ‘void’ [-fpermissive] ```
Fix this by checking void if `sizeof...(Args) == 1` and return void. Also add a unit test case to make sure the code compiles.
Change-Id: I74cca180783645496863393be37215f1d6f4ca02 Signed-off-by: Lei YU <yulei.sh@bytedance.com>
show more ...
|
#
5f1c0bd5 |
| 28-Nov-2023 |
Patrick Williams <patrick@stwcx.xyz> |
test: message: read: add structured binding test for unpack
Add test case for structured binding syntax from unpack, which might be used as a example in implementations.
Signed-off-by: Patrick Will
test: message: read: add structured binding test for unpack
Add test case for structured binding syntax from unpack, which might be used as a example in implementations.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I342fffebad3d6e9a58fe5ab57bbf13019e1b0e6f
show more ...
|
#
7770d2b9 |
| 25-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
test: message: read: add test for unix_fd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I602b3d2d44dbd74916aa73d018b37ff0cafb210d
|
#
cb2fbeb9 |
| 06-Jan-2023 |
Ed Tanous <edtanous@google.com> |
Remove some extra semi-colons in tests
These snuck in here and cause clang warnings. Fix them.
Change-Id: I526cfee1ebc799eae48b92e790273f31462c655f Signed-off-by: Ed Tanous <edtanous@google.com>
|
#
9cde21ff |
| 29-Aug-2022 |
Patrick Williams <patrick@stwcx.xyz> |
message: add unpack method
Add an unpack method that allows reading from the message as r-values. This simplifies the pattern:
``` foo f{}; bar b{}; msg.read(f,b);
// Can now be w
message: add unpack method
Add an unpack method that allows reading from the message as r-values. This simplifies the pattern:
``` foo f{}; bar b{}; msg.read(f,b);
// Can now be written as...
auto [f, b] = msg.unpack<foo, bar>(); ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic2ae7f2c52d41702b8c7c3af6a2efb21558a7579
show more ...
|
#
10d7aa12 |
| 19-Nov-2021 |
Patrick Williams <patrick@stwcx.xyz> |
message: shorten message type Create an alias `sdbusplus::message_t` to `sdbusplus::message::message` to reduce duplication. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
message: shorten message type Create an alias `sdbusplus::message_t` to `sdbusplus::message::message` to reduce duplication. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib400b12fe4a412c0c0c3d26a88f3fae46445cfa8
show more ...
|
#
b98bdc6f |
| 16-Jun-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add support for 'set' Add 'set' as a supported type to `sdbus++` and set as `std::set`. The use of ordered-set is to match 'dict' as `std::map` and because 'struct' is `std:
sdbus++: add support for 'set' Add 'set' as a supported type to `sdbus++` and set as `std::set`. The use of ordered-set is to match 'dict' as `std::map` and because 'struct' is `std::tuple`, which has `operator<=>` but not `std::hash`. This ensures better compatiblilty with possible property type choices by users. Also, add a few test cases to ensure `std::set` and `std::unordered_set` are well-covered. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I59605db1b22d54f783d807eda1e1ec1f9eb6792f
show more ...
|
#
127b8abe |
| 21-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: sync from docs master .clang-format Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8077816a5ddf7a067bdf537cb46e4e32f5c4ef65
|
#
4274c117 |
| 26-Nov-2018 |
William A. Kennington III <wak@google.com> |
std::variant: Remove uses of the variant_ns Now that we are using std::variant we should reference it directly instead of using our own namespace alias. Tested: Built an
std::variant: Remove uses of the variant_ns 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>
show more ...
|
#
81fa02ee |
| 04-Oct-2018 |
William A. Kennington III <wak@google.com> |
message: Fix variant api usage This makes our use of the mapbox variant consistent with std::variant. We need this cleanup for the conversion to std::variant. Tested: Ra
message: Fix variant api usage 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>
show more ...
|
#
e0d6965e |
| 31-Aug-2018 |
William A. Kennington III <wak@google.com> |
clang-format: Fix pointer alignment Oenbmc documentation specifies a left alignment for pointers. Our current format tries to left align if neither alignment is strictly followed, bu
clang-format: Fix pointer alignment 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>
show more ...
|
#
2b238afb |
| 31-Aug-2018 |
Patrick Venture <venture@google.com> |
clang-format: always break template declarations To better match the defined openbmc style. Change-Id: I68cda43857768bae4c904c367942cb1f0efa3e0c Signed-off-by: Patrick Venture <
clang-format: always break template declarations To better match the defined openbmc style. Change-Id: I68cda43857768bae4c904c367942cb1f0efa3e0c Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
95269dbc |
| 31-Aug-2018 |
Patrick Venture <venture@google.com> |
update .clang-format header inclusion order Added the header inclusion order to the .clang-format file generated these changes. Change-Id: Ia31b21d7ea451cac0309828006bc17c27cbd5
update .clang-format header inclusion order Added the header inclusion order to the .clang-format file generated these changes. Change-Id: Ia31b21d7ea451cac0309828006bc17c27cbd5bd5 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
13367e49 |
| 26-Jun-2018 |
William A. Kennington III <wak@google.com> |
test/message/read: Test that our error handling cases work This improves our test coverage of sd_bus_message read functionality to 100%. Tested: Ran through the usual un
test/message/read: Test that our error handling cases work 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>
show more ...
|
#
60a72835 |
| 26-Jun-2018 |
William A. Kennington III <wak@google.com> |
test/message/read: Add missing variant skip 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
test/message/read: Add missing variant skip 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>
show more ...
|
#
b4b4fa1f |
| 25-Jun-2018 |
William A. Kennington III <wak@google.com> |
test/message/read: Use googletest and mocks 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
test/message/read: Use googletest and mocks 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>
show more ...
|
#
48697815 |
| 19-Jun-2018 |
William A. Kennington III <wak@google.com> |
tests: Write our own assert() 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
tests: Write our own assert() 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>
show more ...
|
#
b5645509 |
| 19-Jun-2018 |
William A. Kennington III <wak@google.com> |
tests: Fix memory leak from sd_bus calls 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
tests: Fix memory leak from sd_bus calls 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>
show more ...
|
#
28dc36d5 |
| 21-Feb-2018 |
Ed Tanous <ed.tanous@intel.com> |
Allow reading and appending of more complex types This commit makes sdbusplus compatible with most containers that meet a few requirements. This includes: std::unordered_map std
Allow reading and appending of more complex types 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>
show more ...
|
#
072da3ea |
| 18-Jan-2018 |
Andrew Geissler <geissonator@yahoo.com> |
Update repo to conform to openbmc code standard Change-Id: If1d6b1f04514367cc544c2507a845b3e9d6d3435 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
#
572a8ea6 |
| 06-Jan-2017 |
Patrick Williams <patrick@stwcx.xyz> |
message-read: support obj-path and signature Change-Id: Iafc2f26a10f0c5c84805e1d28bea8f17eaadc03c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
#
b760a99c |
| 28-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
append/read: additional testcases for bool forms Added test-cases for false r-value reference and l-values, in addition to existing false value. Change-Id: I36952f06d84f9da157a6
append/read: additional testcases for bool forms 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>
show more ...
|
#
f101ee28 |
| 04-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
message: testcase to read missing variant type Commit ac52113 fixed an issue where reading a variant from a message when the C++ variant did not contain the type of the dbus variant
message: testcase to read missing variant type Commit ac52113 fixed an issue where reading a variant from a message when the C++ variant did not contain the type of the dbus variant caused the message to get into an invalid state. Add a testcase for this condition. Change-Id: Iea58a4440d72a1d2969d80f782ec1f316cb5ff29 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
24fb2968 |
| 04-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
message: fix parallel test issue Both message/append and message/read were using the same service name for testcases. Ensure they use different service names to allow parallel execu
message: fix parallel test issue 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>
show more ...
|
#
696e3159 |
| 04-Nov-2016 |
Patrick Williams <patrick@stwcx.xyz> |
message: compile warning in testcases Thread functions (non-void) were missing a return. Change-Id: Ib7804d92f79b96428285058101e64dceea7ad66e Signed-off-by: Patrick Williams <pa
message: compile warning in testcases Thread functions (non-void) were missing a return. Change-Id: Ib7804d92f79b96428285058101e64dceea7ad66e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|