History log of /openbmc/sdbusplus/test/ (Results 1 – 25 of 170)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
0ac157a023-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++-gen-meson: fix [more] meson dependencies

As a follow on to 5800d07910384ffad8409515bc510812e4f34334,
additional cases were noticed where the meson dependencies are
not correctly updated when

sdbus++-gen-meson: fix [more] meson dependencies

As a follow on to 5800d07910384ffad8409515bc510812e4f34334,
additional cases were noticed where the meson dependencies are
not correctly updated when multiple YAML files are used (such
as interfaces and events).

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie47bc156c2b3954d3c47c9d07a2e106d7cc87c63

show more ...

0336a2fc05-Sep-2024 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add stubs to generate event files

Add options to `sdbus++` to generate the files for `events.yaml` files:
header, cpp, markdown. Create simple stubs for these that generate
empty files. E

sdbus++: add stubs to generate event files

Add options to `sdbus++` to generate the files for `events.yaml` files:
header, cpp, markdown. Create simple stubs for these that generate
empty files. Enable them in `sdbus++-gen-meson` and add an example
for the Calculator.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia1df9ca02e1de5fc3f6dadfd409d646e1341a3d6

show more ...

88c6a82310-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 ...

06f265f616-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I4f63258febea27dae710c252033b9151e02be7e8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/docs/yaml/interface.md
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-aserver.cpp
/openbmc/sdbusplus/example/calculator-client.cpp
/openbmc/sdbusplus/example/coroutine-example.cpp
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/list-users.cpp
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/detail/async_send_handler.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/async/callback.hpp
/openbmc/sdbusplus/include/sdbusplus/async/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/match.hpp
/openbmc/sdbusplus/include/sdbusplus/async/proxy.hpp
/openbmc/sdbusplus/include/sdbusplus/async/server.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__as_awaitable.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__awaitable.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__basic_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__bulk.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__completion_signatures.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__connect_awaitable.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__continue_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__cpo.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__debug.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__diagnostics.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__domain.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__ensure_started.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execute.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execution_fwd.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__into_variant.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_mpsc_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_slist.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__just.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__let.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__operation_states.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__optional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__ranges.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__read_env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__receiver_adaptor.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__receiver_ref.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__receivers.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__run_loop.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__schedule_from.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__schedulers.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sender_adaptor_closure.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sender_introspection.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__senders_core.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__shared.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__spin_loop_pause.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__split.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__start_detached.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__start_on.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__stopped_as_error.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__stopped_as_optional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__submit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__sync_wait.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__tag_invoke.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__then.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transfer_just.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transform_completion_signatures.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__transform_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__upon_error.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__upon_stopped.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__utility.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__variant.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__when_all.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__with_awaitable_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__write_env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/async_scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/sequence_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/async/task.hpp
/openbmc/sdbusplus/include/sdbusplus/async/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/message/append.hpp
/openbmc/sdbusplus/include/sdbusplus/message/native_types.hpp
/openbmc/sdbusplus/include/sdbusplus/message/read.hpp
/openbmc/sdbusplus/include/sdbusplus/sdbus.hpp
/openbmc/sdbusplus/include/sdbusplus/server/README.md
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/dedup_variant.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/vtable.hpp
/openbmc/sdbusplus/src/async/context.cpp
/openbmc/sdbusplus/src/async/match.cpp
/openbmc/sdbusplus/src/event.cpp
/openbmc/sdbusplus/src/exception.cpp
/openbmc/sdbusplus/src/message/native_types.cpp
/openbmc/sdbusplus/src/server/interface.cpp
async/context.cpp
exception/sdbus_error.cpp
message/call.cpp
unpack_properties.cpp
/openbmc/sdbusplus/tools/sdbusplus/path.py
a4df19a728-Mar-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

build: Fix requirements for tests and example features

Currently assert checks inside the meson.build files check the
presence of the 'tests'/'example' options by using
'get_option(...).enabled()' e

build: Fix requirements for tests and example features

Currently assert checks inside the meson.build files check the
presence of the 'tests'/'example' options by using
'get_option(...).enabled()' expression.
This is a bug since this expression is only true for the 'enabled'
options and in the local build 'tests' and 'example' features are
set to 'auto'.
To correct the issue use 'get_option(...).allowed()' which returns
true both for 'enabled' and 'auto'.

Tested:
On the system without boost "meson setup build" now fails with a
message:
"Boost is required when tests are enabled"

Change-Id: I92b4f5de01f47d27c8fae32b641e4b2083fe5b25
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...


/openbmc/sdbusplus/OWNERS
/openbmc/sdbusplus/example/calculator-aserver.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/include/sdbusplus/async/client.hpp
/openbmc/sdbusplus/include/sdbusplus/async/context.hpp
/openbmc/sdbusplus/include/sdbusplus/async/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/match.hpp
/openbmc/sdbusplus/include/sdbusplus/async/proxy.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__basic_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__cpo.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__domain.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execution_fwd.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__tuple.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__utility.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/async_scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/sequence_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/bus/match.hpp
/openbmc/sdbusplus/include/sdbusplus/message.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/src/async/context.cpp
meson.build
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
2bf0bb2905-Dec-2023 Patrick Williams <patrick@stwcx.xyz>

timer: deprecate phosphor namespace

"phosphor" is a namespace used in some OpenBMC repositories but has
only one usage in sdbusplus and the class is not very OpenBMC-specific.

Move the Timer class

timer: deprecate phosphor namespace

"phosphor" is a namespace used in some OpenBMC repositories but has
only one usage in sdbusplus and the class is not very OpenBMC-specific.

Move the Timer class into the sdbusplus namespace and mark
'phosphor::Timer' as a deprecated alias.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ia8c79a25755c9a2c4dc6f92bf1de8100622ef313

show more ...

fcd80ef129-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

Revert "build: use allowed over enabled"

The meson options used here are dependency checks which should be
handled by the disabler flow.

This reverts commit dabaffecf4eb345e71ee942a9035ddaa5e0eb8ac

Revert "build: use allowed over enabled"

The meson options used here are dependency checks which should be
handled by the disabler flow.

This reverts commit dabaffecf4eb345e71ee942a9035ddaa5e0eb8ac.

Change-Id: Ia81d168d975efc2c97fd0fefcfee624f2571e1e8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

dabaffec29-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer retur

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.

Switch all uses of `enabled` to `allowed`.

Change-Id: I115a52f288be4115297a848afa241f902f48dec2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

5f1c0bd528-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 ...


/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/async/client.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__basic_sender.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execution_fwd.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_queue.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__ranges.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/async_scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/env.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/import
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/sequence_senders.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/async/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/slot.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/container_traits.hpp
/openbmc/sdbusplus/src/async/context.cpp
message/read.cpp
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
6db8838720-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I1d7d35c8035993df4c164bfb055d3be476d3ea84
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/docs/yaml/error.md
/openbmc/sdbusplus/docs/yaml/interface.md
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/calculator-aserver.cpp
/openbmc/sdbusplus/example/calculator-client.cpp
/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/coroutine-example.cpp
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/meson.build
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/example/yaml/net/poettering/Calculator.interface.yaml
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/async/client.hpp
/openbmc/sdbusplus/include/sdbusplus/async/proxy.hpp
/openbmc/sdbusplus/include/sdbusplus/async/server.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/async_scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/src/async/match.cpp
bus/match.cpp
message/call.cpp
unpack_properties.cpp
vtable/vtable.cpp
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbusplus/error.py
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/path.py
/openbmc/sdbusplus/tools/sdbusplus/servicename.py
/openbmc/sdbusplus/tools/sdbusplus/templates/error.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/error.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.aserver.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.common.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.aserver.callback.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.aserver.tag.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.aserver.typeid.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.aserver.vtable.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.callback.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.get.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.set.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.tag.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.typeid.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.value.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.aserver.vtable.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.aserver.emit.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.aserver.typeid.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.aserver.vtable.hpp.mako
6403d56f18-Aug-2023 Patrick Williams <patrick@stwcx.xyz>

sdbus++: async: server: add generator stub

Add the needful changes in the tools and meson-generator to
create an asynchronous server binding header.

Signed-off-by: Patrick Williams <patrick@stwcx.x

sdbus++: async: server: add generator stub

Add the needful changes in the tools and meson-generator to
create an asynchronous server binding header.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0607aefc006eafb9224d92b887cf2d3b30c8da06

show more ...

7770d2b925-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

97c31c8225-May-2023 Patrick Williams <patrick@stwcx.xyz>

async: switch to stdexec async_scope

Use the `async_scope` implementation from stdexec instead of the
custom `scope` class here, which greatly reduces our own code and
also aligns better with the C+

async: switch to stdexec async_scope

Use the `async_scope` implementation from stdexec instead of the
custom `scope` class here, which greatly reduces our own code and
also aligns better with the C++ STL direction. The major changes are
around exception paths:

- Spawned tasks which end with an exception will now std::terminate,
so any task expected to throw should have an `upon_error` chain.

- Spawned tasks which are stopped will be no longer throw an
`UnexpectedStop` exception, so they should be chained with an
`upon_stopped` if this is important.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4e0c85712652efa5b296b898dcc2b0026ba4c625

show more ...

2f5bebd819-May-2023 Patrick Williams <patrick@stwcx.xyz>

test: exception: suppress clang warnings

We include the sd_bus header which uses C99 extensions and makes
clang unhappy. Suppress the extension warning as we have done
in other files.

Signed-off-b

test: exception: suppress clang warnings

We include the sd_bus header which uses C99 extensions and makes
clang unhappy. Suppress the extension warning as we have done
in other files.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Icd20825e8123a3860ef5843a76d45da68a2e036c

show more ...


/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/async/scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__execution_fwd.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__force_include.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__type_traits.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
exception/sdbus_error.cpp
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/method.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/method.server.vtable.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/property.server.vtable.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.prototype.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.server.vtable.cpp.mako
d214904410-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I5daa012bf76924eb7a7d22ed31b6b77ad2f723df
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/sdbusplus/.clang-format
/openbmc/sdbusplus/example/asio-example.cpp
/openbmc/sdbusplus/example/coroutine-example.cpp
/openbmc/sdbusplus/example/get-all-properties.cpp
/openbmc/sdbusplus/example/register-property.cpp
/openbmc/sdbusplus/include/sdbusplus/asio/connection.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/property.hpp
/openbmc/sdbusplus/include/sdbusplus/asio/sd_event.hpp
/openbmc/sdbusplus/include/sdbusplus/async/proxy.hpp
/openbmc/sdbusplus/include/sdbusplus/async/scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/include/sdbusplus/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/unpack_properties.hpp
/openbmc/sdbusplus/include/sdbusplus/utility/memory.hpp
/openbmc/sdbusplus/src/async/match.cpp
bus/match.cpp
message/call.cpp
unpack_properties.cpp
/openbmc/sdbusplus/tools/sdbusplus/templates/property.client.hpp.mako
9949a16908-May-2023 Patrick Williams <patrick@stwcx.xyz>

async: scope: forward exception correctly

There were test cases to cover an unhandled exception thrown by a
spawned task in the async::context, but I observed some cases where
this exception was sil

async: scope: forward exception correctly

There were test cases to cover an unhandled exception thrown by a
spawned task in the async::context, but I observed some cases where
this exception was silently dropped. The test cases only covered
spawned Senders and not spawned Coroutines. The underlying cause
of this was that in some cases the exception was deleted prior to
it being forwarded along to the async::context's scope.

When a task completes in the async::scope, the operational state
holding the task has to be deleted. There needs to be a careful
handshake to be able to trigger the scope while at the same time
deleting the object which is being executed (the scope_receiver),
so that there is not a memory leak. As part of this, if the task
completed with an unhandled exception, the complete function is
suppose to forward the exception to the scope. It is quite likely
that the exception is actually held by the operational state of the
task, which is going to be deleted prior to triggering the scope, so
we need to save this exception prior to the deletion.

Add a specific test case to cover the throwing coroutine, which
failed prior to this fix.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I7e24529a724c3338b6e155ba0a9b4220e1d2fa50

show more ...

90f8d9b413-Mar-2023 Hannu Lounento <hannu.lounento@vaisala.com>

Allow propagating exceptions from server methods

sdbusplus calls the D-Bus method implementation functions in such a way
that the callstack contains sd_bus C functions from libsystemd, and
sdbusplus

Allow propagating exceptions from server methods

sdbusplus calls the D-Bus method implementation functions in such a way
that the callstack contains sd_bus C functions from libsystemd, and
sdbusplus only catches the specific exceptions that match the errors
defined for the D-Bus method before returning execution to the C
functions. If any D-Bus method implementation propagates any other
exception than the errors the method declares, the C functions in the
callstack may leak resources.

There isn't any documentation or other statement that would prohibit
exceptions from being thrown / propagated from method implementations.
This seems to be a known issue though [1]:

By throwing an exception, you're not making an error return to the
calling client, but instead blowing through all of the `sd_bus` C
code with your C++ exception and putting your application into an
invalid state. At a minimum you are leaking memory.

Thus, catch any exceptions propagated from method implementations and
re-throw them from sdbusplus::bus::bus::process*().

Catching and re-throwing avoids resource leaks from sd_bus C functions.
And as a consequence it would allow propagating exceptions in the normal
way until the caller that is prepared to handle them -- ultimately even
up to main(). Propagating exceptions to `main()` allows for terminating
the process in a controlled fashion in case unexpected failures, which,
in turn, allows for a chance to recover from potential failures modes
that persist until application restart (e.g. due to some invalid state
stored in RAM).

Also, terminating the application, in which case the D-Bus daemon
returns the standard error org.freedesktop.DBus.Error.NoReply to the
client, avoids the need to declare an error for internal failures in the
D-Bus API. Internal errors in API add little value over
org.freedesktop.DBus.Error.NoReply and bloat the API as clients many
times can't handle them in any better way than
org.freedesktop.DBus.Error.NoReply.

Only std::exceptions are catched (i.e. not `catch (...)`) and propagated
to keep the implementation simple. The assumption is that only
exceptions (i.e. classes derived from std::exception) are used for
reporting errors.

Tested: With the calculator example changed to throw an unexpected exception:

From 914e045d1f92a1730d32f84ac7a74cd867c76760 Mon Sep 17 00:00:00 2001
From: Hannu Lounento <hannu.lounento@vaisala.com>
Date: Mon, 13 Mar 2023 15:53:17 +0200
Subject: [PATCH] [dbg] Add a propagating exception to the calculator example

Not to be merged to sdbusplus master but only for RFC / demonstration
purposes.

Can be triggered by commands like

busctl --user call net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator Clear
busctl --user get-property net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator LastResult
busctl --user set-property net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator LastResult x 1

Change-Id: Ie9f47227afe7e0fa9765c602bec987aea71b9b86
Signed-off-by: Hannu Lounento <hannu.lounento@vaisala.com>
---
example/calculator-server.cpp | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/example/calculator-server.cpp b/example/calculator-server.cpp
index aa60662..eba9cc0 100644
--- a/example/calculator-server.cpp
+++ b/example/calculator-server.cpp
@@ -3,6 +3,7 @@
#include <net/poettering/Calculator/server.hpp>
#include <sdbusplus/server.hpp>

+#include <cstdlib>
#include <iostream>
#include <string_view>

@@ -42,10 +43,22 @@ struct Calculator : Calculator_inherit
/** Clear lastResult, broadcast 'Cleared' signal */
void clear() override
{
- auto v = lastResult();
- lastResult(0);
- cleared(v);
- return;
+ throw std::runtime_error{"A propagating exception"};
+ }
+
+ int64_t lastResult() const override
+ {
+ throw std::runtime_error{"A propagating exception"};
+ }
+
+ int64_t lastResult(int64_t /*value*/, bool /*skipSignal*/) override
+ {
+ throw std::runtime_error{"A propagating exception"};
+ }
+
+ int64_t lastResult(int64_t /*value*/) override
+ {
+ throw std::runtime_error{"A propagating exception"};
}
};

@@ -71,5 +84,13 @@ int main()
Calculator c1{b, path};

// Handle dbus processing forever.
- b.process_loop();
+ try
+ {
+ b.process_loop();
+ }
+ catch (const std::exception& e)
+ {
+ std::cerr << "Terminating due to a fatal condition: " << e.what() << std::endl;
+ return EXIT_FAILURE;
+ }
}
--
2.40.0

1) Built and executed unit tests:

sdbusplus$ rm -rf build/ && CXXFLAGS=-Wno-maybe-uninitialized meson setup build && cd build && ninja && ninja test
The Meson build system
Version: 0.62.2
Source dir: /path/to/sdbusplus
Build dir: /path/to/sdbusplus/build
Build type: native build
Project name: sdbusplus
Project version: 1.0.0
C compiler for the host machine: ccache cc (gcc 12.2.1 "cc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)")
C linker for the host machine: cc ld.bfd 2.37-37
C++ compiler for the host machine: ccache c++ (gcc 12.2.1 "c++ (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)")
C++ linker for the host machine: c++ ld.bfd 2.37-37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency libsystemd found: YES 250
Program python3 (inflection, yaml, mako) found: YES (/usr/bin/python3) modules: inflection, yaml, mako
Run-time dependency Boost found: YES 1.76.0 (/usr)
Program sdbus++ found: YES (/path/to/sdbusplus/tools/sdbus++)
Program sdbus++ found: YES (overridden)
Program sdbus++-gen-meson found: YES (/path/to/sdbusplus/tools/sdbus++-gen-meson)
Program sdbus++-gen-meson found: YES (overridden)
Header <boost/asio.hpp> has symbol "boost::asio::io_context" : YES
Run-time dependency Boost (found: context, coroutine) found: YES 1.76.0 (/usr)
Run-time dependency GTest found: YES 1.11.0
Run-time dependency GMock found: YES 1.11.0
Build targets in project: 34

Found ninja-1.10.2 at /usr/bin/ninja
[77/77] Linking target example/calculator-client
[0/1] Running all tests.
1/21 test_async_task OK 0.03s
2/21 test_bus_list_names OK 0.02s
3/21 test_bus_match OK 0.02s
4/21 test_bus_exception OK 0.02s
5/21 test_exception_sdbus_error OK 0.02s
6/21 test_message_append OK 0.01s
7/21 test_message_native_types OK 0.01s
8/21 test_message_read OK 0.03s
9/21 test_message_types OK 0.02s
10/21 test_unpack_properties OK 0.02s
11/21 test_utility_tuple_to_array OK 0.02s
12/21 test_utility_type_traits OK 0.01s
13/21 test-bus_aio OK 0.01s
14/21 test-vtable OK 0.01s
15/21 test-server OK 0.01s
16/21 test-server-message-variant OK 0.01s
17/21 test_message_call OK 0.07s
18/21 test_event_event OK 0.31s
19/21 test_async_timer OK 0.51s
20/21 test_async_context OK 0.52s
21/21 test_timer OK 18.02s

Ok: 21
Expected Fail: 0
Fail: 0
Unexpected Pass: 0
Skipped: 0
Timeout: 0

[...]

-Wno-maybe-uninitialized was used because the current master
384943be7e81b08ed102abfaa3f2be2ad915e800 ("sdbus++: async: client: fix
client_t usage") failed to build with

In file included from /usr/include/gtest/internal/gtest-death-test-internal.h:39,
from /usr/include/gtest/gtest-death-test.h:41,
from /usr/include/gtest/gtest.h:64,
from /usr/include/gmock/internal/gmock-internal-utils.h:47,
from /usr/include/gmock/gmock-actions.h:145,
from /usr/include/gmock/gmock.h:59,
from ../include/sdbusplus/test/sdbus_mock.hpp:6,
from ../test/exception/sdbus_error.cpp:4:
In copy constructor ‘testing::internal::MatcherBase<T>::MatcherBase(const testing::internal::MatcherBase<T>&) [with T = sd_bus_error*]’,
inlined from ‘testing::Matcher<sd_bus_error*>::Matcher(const testing::Matcher<sd_bus_error*>&)’ at /usr/include/gtest/gtest-matchers.h:479:7,
inlined from ‘testing::internal::MockSpec<int(sd_bus_error*, int)> sdbusplus::SdBusMock::gmock_sd_bus_error_set_errno(const testing::Matcher<sd_bus_error*>&, const testing::Matcher<int>&)’ at ../include/sdbusplus/test/sdbus_mock.hpp:51:5,
inlined from ‘virtual void {anonymous}::SdBusError_NotSetErrno_Test::TestBody()’ at ../test/exception/sdbus_error.cpp:59:5:
/usr/include/gtest/gtest-matchers.h:302:33: error: ‘<unnamed>.testing::Matcher<sd_bus_error*>::<unnamed>.testing::internal::MatcherBase<sd_bus_error*>::buffer_’ may be used uninitialized [-Werror=maybe-uninitialized]
302 | : vtable_(other.vtable_), buffer_(other.buffer_) {
| ^~~~~~~~~~~~~~~~~~~~~~

on Fedora 36 with

$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)

and

$ dnf info gtest-devel
[...]
Name : gtest-devel
Version : 1.11.0
Release : 2.fc36
Architecture : x86_64

2) Verified no memory leaks were reported by Valgrind anymore:

sdbusplus/build$ valgrind --leak-check=full --show-leak-kinds=all ./example/calculator-server
==61886== Memcheck, a memory error detector
==61886== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==61886== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==61886== Command: ./example/calculator-server
==61886==

and called the throwing method:

build$ busctl --user call net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator Clear
Call failed: Remote peer disconnected

and verified the process terminates but produces no memory leaks:

Terminating due to a fatal condition: A propagating exception
==61886==
==61886== HEAP SUMMARY:
==61886== in use at exit: 0 bytes in 0 blocks
==61886== total heap usage: 143 allocs, 143 frees, 96,732 bytes allocated
==61886==
==61886== All heap blocks were freed -- no leaks are possible
==61886==
==61886== For lists of detected and suppressed errors, rerun with: -s
==61886== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Similarly reading the `LastResult` property:

build$ valgrind --leak-check=full --show-leak-kinds=all ./example/calculator-server
==36140== Memcheck, a memory error detector
==36140== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==36140== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==36140== Command: ./example/calculator-server
==36140==

build$ busctl --user get-property net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator LastResult
Failed to get property LastResult on interface net.poettering.Calculator: Remote peer disconnected

Terminating due to a fatal condition: A propagating exception
==36140==
==36140== HEAP SUMMARY:
==36140== in use at exit: 0 bytes in 0 blocks
==36140== total heap usage: 148 allocs, 148 frees, 96,992 bytes allocated
==36140==
==36140== All heap blocks were freed -- no leaks are possible
==36140==
==36140== For lists of detected and suppressed errors, rerun with: -s
==36140== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

and writing the property:

==36383== Memcheck, a memory error detector
==36383== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==36383== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==36383== Command: ./example/calculator-server
==36383==

build$ busctl --user set-property net.poettering.Calculator /net/poettering/calculator net.poettering.Calculator LastResult x 1

Terminating due to a fatal condition: A propagating exception
==36383==
==36383== HEAP SUMMARY:
==36383== in use at exit: 0 bytes in 0 blocks
==36383== total heap usage: 146 allocs, 146 frees, 97,010 bytes allocated
==36383==
==36383== All heap blocks were freed -- no leaks are possible
==36383==
==36383== For lists of detected and suppressed errors, rerun with: -s
==36383== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

[1] https://lore.kernel.org/openbmc/YTDvfIn4Z05mGdCx@heinlein/

Change-Id: I014099a91f526a92c0f6646e75b4029513ad19a8
Signed-off-by: Hannu Lounento <hannu.lounento@vaisala.com>

show more ...

1caa5e8a19-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

sdbus++: add common header file

There are some items generated under server and client which are
overlapping and some currently in server that will also be needed
for async bindings. Create a commo

sdbus++: add common header file

There are some items generated under server and client which are
overlapping and some currently in server that will also be needed
for async bindings. Create a common header file that they can
all include in order to reduce the content generated across all these
types.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id7af8542613503dbd745158c89892ca252eadf5a

show more ...


/openbmc/sdbusplus/example/calculator-server.cpp
/openbmc/sdbusplus/example/gen/meson.build
/openbmc/sdbusplus/example/gen/net/poettering/Calculator/meson.build
/openbmc/sdbusplus/include/sdbusplus/asio/object_server.hpp
/openbmc/sdbusplus/include/sdbusplus/async/callback.hpp
/openbmc/sdbusplus/include/sdbusplus/async/context.hpp
/openbmc/sdbusplus/include/sdbusplus/async/match.hpp
/openbmc/sdbusplus/include/sdbusplus/async/scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__config.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__intrusive_ptr.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__meta.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__p2300.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/__detail/__scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/any_sender_of.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/at_coroutine_exit.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/commit.info
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/concepts.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/coroutine.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/execution.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/functional.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/import
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/inline_scheduler.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/scope.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/stop_token.hpp
/openbmc/sdbusplus/include/sdbusplus/async/stdexec/task.hpp
/openbmc/sdbusplus/include/sdbusplus/async/timer.hpp
/openbmc/sdbusplus/include/sdbusplus/bus.hpp
/openbmc/sdbusplus/include/sdbusplus/event.hpp
/openbmc/sdbusplus/include/sdbusplus/server/object.hpp
/openbmc/sdbusplus/src/event.cpp
gen/meson.build
gen/server/Test/meson.build
/openbmc/sdbusplus/tools/meson.build
/openbmc/sdbusplus/tools/sdbus++-gen-meson
/openbmc/sdbusplus/tools/sdbusplus/interface.py
/openbmc/sdbusplus/tools/sdbusplus/main.py
/openbmc/sdbusplus/tools/sdbusplus/namedelement.py
/openbmc/sdbusplus/tools/sdbusplus/property.py
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.client.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.common.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.cpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/interface.server.hpp.mako
/openbmc/sdbusplus/tools/sdbusplus/templates/signal.prototype.hpp.mako
91cb97b505-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

async: change namespace for sync_wait

Upstream stdexec moved the sync_wait from the `stdexec::this_thread`
namespace directly into `stdexec`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Cha

async: change namespace for sync_wait

Upstream stdexec moved the sync_wait from the `stdexec::this_thread`
namespace directly into `stdexec`.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9a28b4c5920d0f9892ba466d919fd29f2397f64a

show more ...

da48d20708-Mar-2023 Ed Tanous <edtanous@google.com>

Fix vtable entires for offset callbacks

property_o didn't pass through the callbacks as sd-bus expected, so
they can't be used for read-write properties. Add the expected methods.

Change-Id: Iad75

Fix vtable entires for offset callbacks

property_o didn't pass through the callbacks as sd-bus expected, so
they can't be used for read-write properties. Add the expected methods.

Change-Id: Iad7592c99a60c22c10e274517ebfcbf8cf293a42
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

3edbe5c028-Feb-2023 Ed Tanous <edtanous@google.com>

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ibb55df2b7c1e133621e354728115b89953d9e1bc
Signed-off-by: Ed Tanou

Change io_service to io_context

This was renamed a while back in boost to be compliant with the
std::executors proposal.

Change-Id: Ibb55df2b7c1e133621e354728115b89953d9e1bc
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

9688ed6806-Jan-2023 Ed Tanous <edtanous@google.com>

Add override keyword everywhere it's required

Clang catches some of these. Add override keywords where we override
functions, per cpp core guidelines.

Change-Id: I66f9e6dff53e07f0057d86a806701593b

Add override keyword everywhere it's required

Clang catches some of these. Add override keywords where we override
functions, per cpp core guidelines.

Change-Id: I66f9e6dff53e07f0057d86a806701593be16b188
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

60a9430506-Jan-2023 Ed Tanous <edtanous@google.com>

Fix meson warning

Meson warns on the calls to run_command.

WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false, but it will default to true in fu

Fix meson warning

Meson warns on the calls to run_command.

WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false, but it will default to true in future
releases of meson. See also:
https://github.com/mesonbuild/meson/issues/9300

This commit does as meson recommends, and adds check: true to all
run_command calls, which will be the default.

Change-Id: I281df6ed32c935ce7d3664a0ad628cc81dbac3a8
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

1837cd5906-Jan-2023 Ed Tanous <edtanous@google.com>

Remove dead code paths

There's a few places where we call return after another return
statement, or after a method that doesn't return. These are not
required, and can be removed.

Change-Id: I0917

Remove dead code paths

There's a few places where we call return after another return
statement, or after a method that doesn't return. These are not
required, and can be removed.

Change-Id: I091716bd0eb8ad6aec7a54b66d175b348cbe00e0
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...

cb2fbeb906-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>

1234567