1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

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
This commit is contained in:
Mathieu Othacehe
2025-11-06 15:29:30 +01:00
parent 23fce946eb
commit cdcfa59864

View File

@@ -70,7 +70,8 @@
(virtual-machine (virtual-machine
(operating-system (marionette-operating-system (operating-system (marionette-operating-system
%samba-os %samba-os
#:imported-modules '((gnu services herd)))) #:imported-modules '((gnu services herd)
(gnu build dbus-service))))
(port-forwardings '((8135 . 135) (port-forwardings '((8135 . 135)
(8137 . 137) (8137 . 137)
(8138 . 138) (8138 . 138)
@@ -134,22 +135,14 @@
(test-assert "samba-smbd is listening for peers" (test-assert "samba-smbd is listening for peers"
(wait-for-tcp-port 445 marionette)) (wait-for-tcp-port 445 marionette))
(test-equal "smbclient connect" (test-assert "smbclient connect"
0
(marionette-eval (marionette-eval
'(begin '(begin
(sleep 2) (use-modules ((gnu build dbus-service)
(system* #$(file-append samba "/bin/smbclient") #:select (with-retries)))
"--list=localhost" "--no-pass")) (with-retries 5 5
marionette)) (zero? (system* #$(file-append samba "/bin/smbclient")
"--list=localhost" "--no-pass"))))
(test-equal "smbclient connect"
0
(marionette-eval
'(begin
(sleep 2)
(system* #$(file-append samba "/bin/smbclient")
"--list=localhost" "--no-pass"))
marionette)) marionette))
(test-end)))) (test-end))))
@@ -217,3 +210,7 @@
(name "wsdd") (name "wsdd")
(description "Connect to a running wsdd daemon.") (description "Connect to a running wsdd daemon.")
(value (run-wsdd-test)))) (value (run-wsdd-test))))
;; Local Variables:
;; eval: (put 'with-retries 'scheme-indent-function 2)
;; End: