All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability"
@ 2026-08-31 20:57 Romain Naour via buildroot
  2026-08-31 20:57 ` [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability Romain Naour via buildroot
  2026-09-01 19:50 ` [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" Julien Olivain via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Romain Naour via buildroot @ 2026-08-31 20:57 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The issue was reproduced in 2026.08-rc3 Gitlab-CI pipeline [1] despite
the fix applied.

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555

This reverts commit b4b1de1f7f1865af25f5dc47beac06a37b929c4a.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 support/testing/tests/package/test_mdnsd.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/support/testing/tests/package/test_mdnsd.py b/support/testing/tests/package/test_mdnsd.py
index 2637af7c12..214eea7dd9 100644
--- a/support/testing/tests/package/test_mdnsd.py
+++ b/support/testing/tests/package/test_mdnsd.py
@@ -1,5 +1,4 @@
 import os
-import time
 
 import infra.basetest
 
@@ -31,9 +30,6 @@ class TestMdnsd(infra.basetest.BRTest):
         # advertises the bundled _http._tcp service from /etc/mdns.d/.
         self.assertRunOk("pidof mdnsd")
 
-        # We wait for mdnsd to be ready...
-        time.sleep(1)
-
         # mdnsd only answers on multicast capable interfaces that are
         # up, so wait for eth0 to get its DHCP address before querying.
         cmd = "while ! ifconfig eth0 | grep -q 'inet addr'; do sleep 1; done"
-- 
2.55.0

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

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

* [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability
  2026-08-31 20:57 [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" Romain Naour via buildroot
@ 2026-08-31 20:57 ` Romain Naour via buildroot
  2026-09-01 20:11   ` Fiona Klute via buildroot
  2026-09-01 19:50 ` [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" Julien Olivain via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Romain Naour via buildroot @ 2026-08-31 20:57 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour

The mdnsd runtime test can randomly fail on slow runners.

It's hard to reproduce locally (only one failure after a few attempts)
but we can reproduce it easily by removing the while loop entirely.

It turns out that mdnsd is started by S50mdnsd before the
emulator.login() change the system date:

  [BRTEST# date -s @1788032864
  Sat Aug 29 19:47:44 UTC 2026

Since the minimal rootfs.cpio generated	for TestMdnsd doesn't have any
ntp client installed, it start with "January 1, 1970".

The date change may cause some issue to the mdnsd daemon which blocks
any response from mquery command.

When the problem occurs, "mquery -T _http._tcp" reply is empty:

  # mquery -T _http._tcp
  Querying _http._tcp.local. for PTR (12) ... press Ctrl-C to stop

To workaround the issue, restart mdnsd manually.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 support/testing/tests/package/test_mdnsd.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/support/testing/tests/package/test_mdnsd.py b/support/testing/tests/package/test_mdnsd.py
index 214eea7dd9..ebb8971e38 100644
--- a/support/testing/tests/package/test_mdnsd.py
+++ b/support/testing/tests/package/test_mdnsd.py
@@ -23,6 +23,10 @@ class TestMdnsd(infra.basetest.BRTest):
                                     "-net", "user"])
         self.emulator.login()
 
+        # Restart mdnsd after setting the date in emulator.login() setup.
+        cmd = "/etc/init.d/S50mdnsd restart"
+        self.assertRunOk(cmd, timeout=30)
+
         # We check the program can execute.
         self.assertRunOk("mdnsd -v")
 
-- 
2.55.0

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

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

* Re: [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability"
  2026-08-31 20:57 [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" Romain Naour via buildroot
  2026-08-31 20:57 ` [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability Romain Naour via buildroot
@ 2026-09-01 19:50 ` Julien Olivain via buildroot
  1 sibling, 0 replies; 5+ messages in thread
From: Julien Olivain via buildroot @ 2026-09-01 19:50 UTC (permalink / raw)
  To: Romain Naour; +Cc: buildroot

On 31/08/2026 22:57, Romain Naour via buildroot wrote:
> The issue was reproduced in 2026.08-rc3 Gitlab-CI pipeline [1] despite
> the fix applied.
> 
> [1] https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555
> 
> This reverts commit b4b1de1f7f1865af25f5dc47beac06a37b929c4a.
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability
  2026-08-31 20:57 ` [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability Romain Naour via buildroot
@ 2026-09-01 20:11   ` Fiona Klute via buildroot
  2026-09-01 21:15     ` Romain Naour via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Fiona Klute via buildroot @ 2026-09-01 20:11 UTC (permalink / raw)
  To: Romain Naour, buildroot; +Cc: Joachim Wiberg

Am 31.08.26 um 22:57 schrieb Romain Naour via buildroot:
> The mdnsd runtime test can randomly fail on slow runners.
> 
> It's hard to reproduce locally (only one failure after a few attempts)
> but we can reproduce it easily by removing the while loop entirely.
> 
> It turns out that mdnsd is started by S50mdnsd before the
> emulator.login() change the system date:
> 
>    [BRTEST# date -s @1788032864
>    Sat Aug 29 19:47:44 UTC 2026
> 
> Since the minimal rootfs.cpio generated	for TestMdnsd doesn't have any
> ntp client installed, it start with "January 1, 1970".
> 
> The date change may cause some issue to the mdnsd daemon which blocks
> any response from mquery command.
> 
> When the problem occurs, "mquery -T _http._tcp" reply is empty:
> 
>    # mquery -T _http._tcp
>    Querying _http._tcp.local. for PTR (12) ... press Ctrl-C to stop
> 
> To workaround the issue, restart mdnsd manually.

Thanks for the workaround! If mdnsd gets stuck if there's a time jump, 
that sounds like an issue that should also be reported upstream (and 
hopefully fixed there). Even with an NTP client installed there'd be no 
guarantee the time would have been set before mdnsd starts.

Best regards,
Fiona

> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
>   support/testing/tests/package/test_mdnsd.py | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/support/testing/tests/package/test_mdnsd.py b/support/testing/tests/package/test_mdnsd.py
> index 214eea7dd9..ebb8971e38 100644
> --- a/support/testing/tests/package/test_mdnsd.py
> +++ b/support/testing/tests/package/test_mdnsd.py
> @@ -23,6 +23,10 @@ class TestMdnsd(infra.basetest.BRTest):
>                                       "-net", "user"])
>           self.emulator.login()
>   
> +        # Restart mdnsd after setting the date in emulator.login() setup.
> +        cmd = "/etc/init.d/S50mdnsd restart"
> +        self.assertRunOk(cmd, timeout=30)
> +
>           # We check the program can execute.
>           self.assertRunOk("mdnsd -v")
>   

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

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

* Re: [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability
  2026-09-01 20:11   ` Fiona Klute via buildroot
@ 2026-09-01 21:15     ` Romain Naour via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Romain Naour via buildroot @ 2026-09-01 21:15 UTC (permalink / raw)
  To: Fiona Klute, buildroot; +Cc: Joachim Wiberg

Hello Fiona, All,

Le 01/09/2026 à 22:11, Fiona Klute a écrit :
> Am 31.08.26 um 22:57 schrieb Romain Naour via buildroot:
>> The mdnsd runtime test can randomly fail on slow runners.
>>
>> It's hard to reproduce locally (only one failure after a few attempts)
>> but we can reproduce it easily by removing the while loop entirely.
>>
>> It turns out that mdnsd is started by S50mdnsd before the
>> emulator.login() change the system date:
>>
>>    [BRTEST# date -s @1788032864
>>    Sat Aug 29 19:47:44 UTC 2026
>>
>> Since the minimal rootfs.cpio generated    for TestMdnsd doesn't have any
>> ntp client installed, it start with "January 1, 1970".
>>
>> The date change may cause some issue to the mdnsd daemon which blocks
>> any response from mquery command.
>>
>> When the problem occurs, "mquery -T _http._tcp" reply is empty:
>>
>>    # mquery -T _http._tcp
>>    Querying _http._tcp.local. for PTR (12) ... press Ctrl-C to stop
>>
>> To workaround the issue, restart mdnsd manually.
> 
> Thanks for the workaround! If mdnsd gets stuck if there's a time jump, that
> sounds like an issue that should also be reported upstream (and hopefully fixed
> there). Even with an NTP client installed there'd be no guarantee the time would
> have been set before mdnsd starts.

I just created a new issue on Github:
https://github.com/troglobit/mdnsd/issues/99

Hopefully this is the last issue for the runtime testsuite for the upcoming
2026.08 release!

Best regards,
Romain

> 
> Best regards,
> Fiona
> 
>> Fixes:
>> https://gitlab.com/buildroot.org/buildroot/-/jobs/16185948555
>>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
>> ---
>>   support/testing/tests/package/test_mdnsd.py | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/support/testing/tests/package/test_mdnsd.py b/support/testing/
>> tests/package/test_mdnsd.py
>> index 214eea7dd9..ebb8971e38 100644
>> --- a/support/testing/tests/package/test_mdnsd.py
>> +++ b/support/testing/tests/package/test_mdnsd.py
>> @@ -23,6 +23,10 @@ class TestMdnsd(infra.basetest.BRTest):
>>                                       "-net", "user"])
>>           self.emulator.login()
>>   +        # Restart mdnsd after setting the date in emulator.login() setup.
>> +        cmd = "/etc/init.d/S50mdnsd restart"
>> +        self.assertRunOk(cmd, timeout=30)
>> +
>>           # We check the program can execute.
>>           self.assertRunOk("mdnsd -v")
>>   
> 

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

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 20:57 [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" Romain Naour via buildroot
2026-08-31 20:57 ` [Buildroot] [PATCH 2/2] support/testing: TestMdnsd: improve test reliability Romain Naour via buildroot
2026-09-01 20:11   ` Fiona Klute via buildroot
2026-09-01 21:15     ` Romain Naour via buildroot
2026-09-01 19:50 ` [Buildroot] [PATCH 1/2] Revert "support/testing: TestMdnsd: improve test reliability" 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.