All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1
@ 2026-07-13 18:25 Marcin Niestroj
  2026-07-13 18:25 ` [Buildroot] [PATCH 2/2] support/testing: add runtime test for easydbus Marcin Niestroj
  2026-08-09 10:21 ` [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Julien Olivain via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Marcin Niestroj @ 2026-07-13 18:25 UTC (permalink / raw)
  To: buildroot; +Cc: Marcin Niestroj

From: Marcin Niestroj <m.niestroj@grinn-global.com>

0.2.1 builds against Lua 5.4 (previously excluded), so drop the
!BR2_PACKAGE_LUA_5_4 dependency and the corresponding wording in
the comment.

Changelog:
https://github.com/mniestroj/easydbus/blob/master/CHANGELOG.md#021---2026-06-05

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 package/easydbus/Config.in     | 5 ++---
 package/easydbus/easydbus.hash | 2 +-
 package/easydbus/easydbus.mk   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/package/easydbus/Config.in b/package/easydbus/Config.in
index 5f2f3a22be..1fe8689ccd 100644
--- a/package/easydbus/Config.in
+++ b/package/easydbus/Config.in
@@ -3,13 +3,12 @@ config BR2_PACKAGE_EASYDBUS
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
-	depends on !BR2_PACKAGE_LUA_5_4
 	select BR2_PACKAGE_LIBGLIB2
 	help
 	  Easy to use DBus library for Lua.
 
 	  https://github.com/mniestroj/easydbus
 
-comment "easydbus needs a toolchain w/ wchar, threads, Lua <= 5.3"
+comment "easydbus needs a toolchain w/ wchar, threads"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PACKAGE_LUA_5_4
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/easydbus/easydbus.hash b/package/easydbus/easydbus.hash
index 08a4f038d7..f83e1eb253 100644
--- a/package/easydbus/easydbus.hash
+++ b/package/easydbus/easydbus.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  8cec24bff40f056d4874ed9d6fb73c9f1efbc5eff14528e1b49f1a162b197f26  easydbus-0.1.0.tar.gz
+sha256  d0f018f45b682e85108c10b5d1fa7bdcd1a81188bea43aa6c9c725c779f66aec  easydbus-0.2.1.tar.gz
 sha256  dec3b3103cd6889045da86fc7da22bd25545966e5bd7c214791b922dec19588b  LICENSE
diff --git a/package/easydbus/easydbus.mk b/package/easydbus/easydbus.mk
index 57d0c22392..d35da45580 100644
--- a/package/easydbus/easydbus.mk
+++ b/package/easydbus/easydbus.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EASYDBUS_VERSION = 0.1.0
+EASYDBUS_VERSION = 0.2.1
 EASYDBUS_SITE = $(call github,mniestroj,easydbus,v$(EASYDBUS_VERSION))
 EASYDBUS_DEPENDENCIES = luainterpreter libglib2
 EASYDBUS_LICENSE = MIT
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] support/testing: add runtime test for easydbus
  2026-07-13 18:25 [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Marcin Niestroj
@ 2026-07-13 18:25 ` Marcin Niestroj
  2026-08-09 10:21 ` [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Marcin Niestroj @ 2026-07-13 18:25 UTC (permalink / raw)
  To: buildroot; +Cc: Marcin Niestroj

From: Marcin Niestroj <m.niestroj@grinn-global.com>

Test an actual D-Bus round-trip using easydbus:
 - obtain a name on the system bus
 - subscribe to a signal on a chosen object/interface
 - emit signal with a string payload
 - run the easydbus mainloop
 - verify the handler received the expected payload

This covers both the default Lua interpreter (Lua 5.4) and LuaJIT
(Lua 5.1 ABI).

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
 DEVELOPERS                                    |  1 +
 .../testing/tests/package/test_easydbus.py    | 86 +++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 support/testing/tests/package/test_easydbus.py

diff --git a/DEVELOPERS b/DEVELOPERS
index fdfab8b489..7185071a99 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2272,6 +2272,7 @@ F:	support/testing/tests/package/sample_python_dbus_fast.py
 F:	support/testing/tests/package/sample_python_dbus_next.py
 F:	support/testing/tests/package/sample_python_pytest.py
 F:	support/testing/tests/package/sample_python_pytest_asyncio.py
+F:	support/testing/tests/package/test_easydbus.py
 F:	support/testing/tests/package/test_netdata.py
 F:	support/testing/tests/package/test_python_dbus_next.py
 F:	support/testing/tests/package/test_python_pytest.py
diff --git a/support/testing/tests/package/test_easydbus.py b/support/testing/tests/package/test_easydbus.py
new file mode 100644
index 0000000000..ac59c4d4e4
--- /dev/null
+++ b/support/testing/tests/package/test_easydbus.py
@@ -0,0 +1,86 @@
+import textwrap
+
+from tests.package.test_lua import TestLuaBase
+
+
+class EasyDBusBase(TestLuaBase):
+    dbus_policy = textwrap.dedent("""
+        <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+        <busconfig>
+          <policy user="root">
+            <allow own="easydbus.SampleTest"/>
+            <allow send_destination="easydbus.SampleTest"/>
+          </policy>
+        </busconfig>
+        """)
+
+    sample_script = textwrap.dedent("""\
+        local dbus = require 'easydbus'
+
+        local bus = assert(dbus.system())
+        local service_name = 'easydbus.SampleTest'
+        local object_path = '/easydbus/sample'
+        local interface_name = 'easydbus.SampleTest'
+        local signal_name = 'Pinged'
+
+        local owner_id = assert(bus:own_name(service_name))
+
+        local payload
+        bus:subscribe(nil, object_path, interface_name, signal_name,
+                      function(arg) payload = arg; dbus.mainloop_quit() end)
+        assert(bus:emit(nil, object_path, interface_name, signal_name,
+                        's', 'hello'))
+        dbus.mainloop()
+
+        bus:unown_name(owner_id)
+
+        assert(payload == 'hello',
+               'unexpected payload: ' .. tostring(payload))
+        print('OK')
+        """)
+
+    def signal_round_trip(self):
+        config_dir = "/etc/dbus-1/system.d"
+        config_fn = "easydbus.SampleTest.conf"
+
+        # Allow our service name to own the bus name and receive method calls.
+        self.emulator.run("mkdir -p " + config_dir)
+        self.emulator.run("cat > " + config_dir + "/" + config_fn +
+                          " <<EOF" + self.dbus_policy + "EOF")
+        self.emulator.run("killall -SIGHUP dbus-daemon")
+
+        # Drop the test script onto the target and run it.
+        self.emulator.run("cat > /tmp/sample.lua <<'EOF'\n" +
+                          self.sample_script + "EOF")
+        output, exit_code = self.emulator.run("lua /tmp/sample.lua")
+        self.assertEqual(exit_code, 0)
+        self.assertIn("OK", output)
+
+
+class TestLuaEasyDBus(EasyDBusBase):
+    config = EasyDBusBase.config + \
+        """
+        BR2_PACKAGE_LUA=y
+        BR2_PACKAGE_DBUS=y
+        BR2_PACKAGE_EASYDBUS=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("easydbus")
+        self.signal_round_trip()
+
+
+class TestLuajitEasyDBus(EasyDBusBase):
+    config = EasyDBusBase.config + \
+        """
+        BR2_PACKAGE_LUAJIT=y
+        BR2_PACKAGE_DBUS=y
+        BR2_PACKAGE_EASYDBUS=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("easydbus")
+        self.signal_round_trip()
-- 
2.55.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1
  2026-07-13 18:25 [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Marcin Niestroj
  2026-07-13 18:25 ` [Buildroot] [PATCH 2/2] support/testing: add runtime test for easydbus Marcin Niestroj
@ 2026-08-09 10:21 ` Julien Olivain via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-08-09 10:21 UTC (permalink / raw)
  To: Marcin Niestroj; +Cc: buildroot, Marcin Niestroj

On 13/07/2026 20:25, Marcin Niestroj wrote:
> From: Marcin Niestroj <m.niestroj@grinn-global.com>
> 
> 0.2.1 builds against Lua 5.4 (previously excluded), so drop the
> !BR2_PACKAGE_LUA_5_4 dependency and the corresponding wording in
> the comment.
> 
> Changelog:
> https://github.com/mniestroj/easydbus/blob/master/CHANGELOG.md#021---2026-06-05
> 
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>

Series applied to master, thanks.

For info, I simplified a bit the runtime test by moving the test
scripts into a rootfs overlay. See:
https://gitlab.com/buildroot.org/buildroot/-/commit/4456d899d0481efe7e7994090d0b709dbba47f39

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-09 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 18:25 [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Marcin Niestroj
2026-07-13 18:25 ` [Buildroot] [PATCH 2/2] support/testing: add runtime test for easydbus Marcin Niestroj
2026-08-09 10:21 ` [Buildroot] [PATCH 1/2] package/easydbus: bump to version 0.2.1 Julien Olivain via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.