Hi Bartosz! On Fri, 2024-06-28 at 20:58 +0200, Bartosz Golaszewski wrote: > Finally we add the DBus code that's split into the daemon and command-line > client. I added some examples to the README and documented the behavior in > the help text of the programs as well as documented the interface file with > XML comments that gdbus-codegen can parse and use to generate docbook output. > > For DBus, most of the testing happens in the command-line client bash tests. > It has a very good coverage of the daemon's code and also allows to run the > daemon through valgrind and verify there are no memory leaks and invalid > accesses. I still intend to extend the C test-suite for DBus with some corner > cases but didn't not have enough time for it. > > Changes in v2: > - fixed most segfaults I noticed (or was made aware of by others) in RFC > - improve the code in GLib examples > - make command-line tests pass shellckeck > - fix build issue resulting in implicit pointer-to-int casting on some > platforms > - many small tweaks, fixes and improvements all over the place but without > changing the API > - fix a bunch of memory leaks reported by valgrind > - Link to v1: https://lore.kernel.org/linux-gpio/20240412122804.109323-1-brgl@xxxxxxxx/ Thanks a lot for your efforts! I didn't try embedded tests yet, but I've compiled gpio-manager/gpiocli and gave them some basic try: Tested-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx> To me it looks like good to be merged to start with Yocto recipes and to enable wider adoption! I didn't look into DBUS bindings though, I don't have much experience with it... > --- > Bartosz Golaszewski (18): > tests: split out reusable test code into a local static library > tests: split out the common test code for bash scripts > bindings: glib: add build files > bindings: glib: add public headers > bindings: glib: add core code > bindings: glib: add examples > bindings: glib: add tests > README: document GLib bindings > dbus: add build files > dbus: add the API definitions > dbus: add a wrapper around the gdbus-codegen generated header > dbus: add data files > dbus: add gpio-manager code > dbus: add tests > dbus: add a command-line client > dbus: client: add tests > README: document the DBus API > TODO: drop the DBus daemon from the list -- Alexander Sverdlin Siemens AG www.siemens.com