From 211ee32c95ed81e0e16dc8968157aec21a44e7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Gia=20Phong?= Date: Fri, 19 Dec 2025 10:13:50 +0900 Subject: [PATCH] tests: %test-nss-mdns: Fix test order. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this, the test failed because Avahi CLI utilities exit with a non-zero status in case of a cache miss (instead of blocking?). * gnu/tests/avahi.scm (run-nss-mdns-test): Move the Avahi CLI tests after other name resolution tests. Change-Id: I88ab03abf39cf24ee2ce763c719444ac65504cc2 Signed-off-by: Ludovic Courtès Merges: #4955 --- gnu/tests/avahi.scm | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/gnu/tests/avahi.scm b/gnu/tests/avahi.scm index 323103212477ffbe61fdb0c268f0c06de227485a..d7f2fdaa72d8c5bd2581fe7f1fcf8a5fed5cf529 100644 --- a/gnu/tests/avahi.scm +++ b/gnu/tests/avahi.scm @@ -132,20 +132,6 @@ (start-service 'networking)) marionette)) - (test-equal "avahi-resolve-host-name" - 0 - (marionette-eval - '(system* - "/run/current-system/profile/bin/avahi-resolve-host-name" - "-v" #$mdns-host-name) - marionette)) - - (test-equal "avahi-browse" - 0 - (marionette-eval - '(system* "/run/current-system/profile/bin/avahi-browse" "-avt") - marionette)) - (test-assert "getaddrinfo .local" ;; Wait for the 'avahi-daemon' service and perform a resolution. (match (marionette-eval @@ -168,6 +154,19 @@ (and (string=? (hostent:name result) #$mdns-host-name) (= (hostent:addrtype result) AF_INET))))) + (test-equal "avahi-resolve host name" + 0 + (marionette-eval + '(system* "/run/current-system/profile/bin/avahi-resolve" + "--verbose" "--name" #$mdns-host-name) + marionette)) + + (test-equal "avahi-browse" + 0 + (marionette-eval + '(system* "/run/current-system/profile/bin/avahi-browse" + "--all" "--verbose" "--terminate") + marionette)) (test-end))))