From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: Julien Olivain <ju.o@free.fr>
Cc: Thomas Perale <thomas.perale@mind.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] support/testing: test_connman: new runtime test
Date: Fri, 20 Mar 2026 16:55:04 +0100 [thread overview]
Message-ID: <20260320155504.176574-1-thomas.perale@mind.be> (raw)
In-Reply-To: <20260223214358.858432-1-ju.o@free.fr>
In reply of:
> Signed-off-by: Julien Olivain <ju.o@free.fr>
Applied to 2025.02.x & 2026.02.x. Thanks
> ---
> DEVELOPERS | 1 +
> support/testing/tests/package/test_connman.py | 57 +++++++++++++++++++
> 2 files changed, 58 insertions(+)
> create mode 100644 support/testing/tests/package/test_connman.py
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 9e983ae113..63d1517652 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1874,6 +1874,7 @@ F: support/testing/tests/package/test_btrfs_progs.py
> F: support/testing/tests/package/test_btrfs_progs/
> F: support/testing/tests/package/test_bzip2.py
> F: support/testing/tests/package/test_compressor_base.py
> +F: support/testing/tests/package/test_connman.py
> F: support/testing/tests/package/test_coremark.py
> F: support/testing/tests/package/test_cryptsetup.py
> F: support/testing/tests/package/test_cryptsetup/
> diff --git a/support/testing/tests/package/test_connman.py b/support/testing/tests/package/test_connman.py
> new file mode 100644
> index 0000000000..6fef95104c
> --- /dev/null
> +++ b/support/testing/tests/package/test_connman.py
> @@ -0,0 +1,57 @@
> +import os
> +
> +import infra.basetest
> +
> +
> +class TestConnMan(infra.basetest.BRTest):
> + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
> + """
> + BR2_PACKAGE_CONNMAN=y
> + BR2_PACKAGE_CONNMAN_CLIENT=y
> + BR2_TARGET_ROOTFS_CPIO=y
> + # BR2_TARGET_ROOTFS_TAR is not set
> + """
> +
> + def test_run(self):
> + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
> + self.emulator.boot(arch="armv7",
> + kernel="builtin",
> + options=["-initrd", cpio_file])
> + self.emulator.login()
> +
> + # We check the program can execute.
> + self.assertRunOk("connmand --version")
> +
> + # We query the connman state and expect it to be ready.
> + out, ret = self.emulator.run("connmanctl state")
> + out_str = "\n".join(out)
> + self.assertEqual(ret, 0)
> + self.assertIn("State = ready", out_str)
> +
> + # We list the technologies and expect to see at least Ethernet
> + # because the emulator has one interface.
> + out, ret = self.emulator.run("connmanctl technologies")
> + out_str = "\n".join(out)
> + self.assertEqual(ret, 0)
> + self.assertIn("Type = ethernet", out_str)
> +
> + # We ping the qemu user networking gateway. The startup
> + # scripts should have brought up the interface, so the ping
> + # is expected to succeed.
> + ping_cmd = "ping -c 3 -i 0.2 -W 2 10.0.2.2"
> + self.assertRunOk(ping_cmd)
> +
> + # Now, we ask connman to disable Ethernet. It should stop the
> + # interface.
> + self.assertRunOk("connmanctl disable ethernet")
> +
> + # If we try to ping again the qemu gateway,
> + # it should now fail.
> + _, ret = self.emulator.run(ping_cmd)
> + self.assertNotEqual(ret, 0)
> +
> + # We ask connman to re-enable Ethernet.
> + self.assertRunOk("connmanctl enable ethernet")
> +
> + # We should be able to ping the qemu gateway again.
> + self.assertRunOk(ping_cmd)
> --
> 2.53.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-03-20 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 21:43 [Buildroot] [PATCH 1/1] support/testing: test_connman: new runtime test Julien Olivain via buildroot
2026-03-12 18:37 ` Julien Olivain via buildroot
2026-03-20 15:55 ` Thomas Perale via buildroot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260320155504.176574-1-thomas.perale@mind.be \
--to=buildroot@buildroot.org \
--cc=ju.o@free.fr \
--cc=thomas.perale@mind.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox