summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2025-11-06 15:29:30 +0100
committerMathieu Othacehe <othacehe@gnu.org>2025-11-08 11:26:03 +0100
commitcdcfa598645f820dda108aa6a208ccccb3c5a1e5 (patch)
treeac79eaaef6c6d9b24680711fb6e5566ba1a7b0a0 /gnu/tests
parent23fce946eba82434900e95c4ca13bc575932b014 (diff)
gnu: tests: Fix the samba test.
* gnu/tests/samba.scm (run-samba-test): De-duplicate the smbclient test and introduce some retries. Fixes: guix/guix#3981 Change-Id: Id9a68ddd98b31138564f19b85aca68357ad73351
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/samba.scm27
1 files changed, 12 insertions, 15 deletions
diff --git a/gnu/tests/samba.scm b/gnu/tests/samba.scm
index a4bcba9b64b..998d19629cd 100644
--- a/gnu/tests/samba.scm
+++ b/gnu/tests/samba.scm
@@ -70,7 +70,8 @@
70 (virtual-machine 70 (virtual-machine
71 (operating-system (marionette-operating-system 71 (operating-system (marionette-operating-system
72 %samba-os 72 %samba-os
73 #:imported-modules '((gnu services herd)))) 73 #:imported-modules '((gnu services herd)
74 (gnu build dbus-service))))
74 (port-forwardings '((8135 . 135) 75 (port-forwardings '((8135 . 135)
75 (8137 . 137) 76 (8137 . 137)
76 (8138 . 138) 77 (8138 . 138)
@@ -134,22 +135,14 @@
134 (test-assert "samba-smbd is listening for peers" 135 (test-assert "samba-smbd is listening for peers"
135 (wait-for-tcp-port 445 marionette)) 136 (wait-for-tcp-port 445 marionette))
136 137
137 (test-equal "smbclient connect" 138 (test-assert "smbclient connect"
138 0
139 (marionette-eval
140 '(begin
141 (sleep 2)
142 (system* #$(file-append samba "/bin/smbclient")
143 "--list=localhost" "--no-pass"))
144 marionette))
145
146 (test-equal "smbclient connect"
147 0
148 (marionette-eval 139 (marionette-eval
149 '(begin 140 '(begin
150 (sleep 2) 141 (use-modules ((gnu build dbus-service)
151 (system* #$(file-append samba "/bin/smbclient") 142 #:select (with-retries)))
152 "--list=localhost" "--no-pass")) 143 (with-retries 5 5
144 (zero? (system* #$(file-append samba "/bin/smbclient")
145 "--list=localhost" "--no-pass"))))
153 marionette)) 146 marionette))
154 147
155 (test-end)))) 148 (test-end))))
@@ -217,3 +210,7 @@
217 (name "wsdd") 210 (name "wsdd")
218 (description "Connect to a running wsdd daemon.") 211 (description "Connect to a running wsdd daemon.")
219 (value (run-wsdd-test)))) 212 (value (run-wsdd-test))))
213
214;; Local Variables:
215;; eval: (put 'with-retries 'scheme-indent-function 2)
216;; End: