mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/testing: mdnsd: new runtime test
Boot an armv5 image running the mdnsd responder alongside the mquery
client, then check that service discovery works: mquery browses for the
bundled _http._tcp service and mdnsd, on the same host, answers over the
loopback of the eth0 multicast group.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
[Julien: add "mdnsd -v" invocation to show version]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 4cd5559163)
[Thomas: remove last test that requires v1.1]
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
9b4559d6f1
commit
637f35b9f9
@@ -1657,6 +1657,7 @@ F: package/ssdp-responder/
|
||||
F: package/sysklogd/
|
||||
F: package/uredir/
|
||||
F: package/watchdogd/
|
||||
F: support/testing/tests/package/test_mdnsd.py
|
||||
|
||||
N: Jochen Baltes <jochen.baltes@gmail.com>
|
||||
F: package/altera-stapl
|
||||
|
||||
31
support/testing/tests/package/test_mdnsd.py
Normal file
31
support/testing/tests/package/test_mdnsd.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import os
|
||||
|
||||
import infra.basetest
|
||||
|
||||
|
||||
class TestMdnsd(infra.basetest.BRTest):
|
||||
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
|
||||
"""
|
||||
BR2_PACKAGE_MDNSD=y
|
||||
BR2_PACKAGE_MDNSD_MQUERY=y
|
||||
BR2_PACKAGE_MDNSD_HTTP_SERVICE=y
|
||||
BR2_SYSTEM_DHCP="eth0"
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
"""
|
||||
|
||||
def test_run(self):
|
||||
img = os.path.join(self.builddir, "images", "rootfs.cpio")
|
||||
self.emulator.boot(arch="armv5",
|
||||
kernel="builtin",
|
||||
options=["-initrd", img,
|
||||
"-net", "nic,model=rtl8139",
|
||||
"-net", "user"])
|
||||
self.emulator.login()
|
||||
|
||||
# We check the program can execute.
|
||||
self.assertRunOk("mdnsd -v")
|
||||
|
||||
# The responder is started at boot by /etc/init.d/S50mdnsd and
|
||||
# advertises the bundled _http._tcp service from /etc/mdns.d/.
|
||||
self.assertRunOk("pidof mdnsd")
|
||||
Reference in New Issue
Block a user