diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2025-11-06 15:29:30 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2025-11-08 11:26:03 +0100 |
| commit | cdcfa598645f820dda108aa6a208ccccb3c5a1e5 (patch) | |
| tree | ac79eaaef6c6d9b24680711fb6e5566ba1a7b0a0 /gnu/tests/samba.scm | |
| parent | 23fce946eba82434900e95c4ca13bc575932b014 (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/samba.scm')
| -rw-r--r-- | gnu/tests/samba.scm | 27 |
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 @@ (virtual-machine (operating-system (marionette-operating-system %samba-os - #:imported-modules '((gnu services herd)))) + #:imported-modules '((gnu services herd) + (gnu build dbus-service)))) (port-forwardings '((8135 . 135) (8137 . 137) (8138 . 138) @@ -134,22 +135,14 @@ (test-assert "samba-smbd is listening for peers" (wait-for-tcp-port 445 marionette)) - (test-equal "smbclient connect" - 0 - (marionette-eval - '(begin - (sleep 2) - (system* #$(file-append samba "/bin/smbclient") - "--list=localhost" "--no-pass")) - marionette)) - - (test-equal "smbclient connect" - 0 + (test-assert "smbclient connect" (marionette-eval '(begin - (sleep 2) - (system* #$(file-append samba "/bin/smbclient") - "--list=localhost" "--no-pass")) + (use-modules ((gnu build dbus-service) + #:select (with-retries))) + (with-retries 5 5 + (zero? (system* #$(file-append samba "/bin/smbclient") + "--list=localhost" "--no-pass")))) marionette)) (test-end)))) @@ -217,3 +210,7 @@ (name "wsdd") (description "Connect to a running wsdd daemon.") (value (run-wsdd-test)))) + +;; Local Variables: +;; eval: (put 'with-retries 'scheme-indent-function 2) +;; End: |
