bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54786: Installation tests are failing


From: Ludovic Courtès
Subject: bug#54786: Installation tests are failing
Date: Sat, 28 May 2022 23:29:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi,
>>
>> Mathieu Othacehe <othacehe@gnu.org> skribis:
>>
>>> Thanks for the fix! The jami and jami-provisioning tests are also broken
>>> because of what looks like to be the same issue:
>>>
>>> One does not simply initialize the client: Another daemon is detected
>>> /gnu/store/01phrvxnxrg1q0gxa35g7f77q06crf6v-shepherd-marionette.scm:1:1718: 
>>> ERROR:
>>>   1. &action-exception-error:
>>>       service: jami
>>>       action: start
>>>       key: match-error
>>>       args: ("match" "no matching pattern" #f)
>>> Jami Daemon 11.0.0, by Savoir-faire Linux 2004-2019
>>> https://jami.net/
>>> [Video support enabled]
>>> [Plugins support enabled]
>>
>> Yes, I noticed that, but I’m not sure how to apply a similar workaround.
>
> I tried fixing that today, but so far I've only managed to understand
> what seems to be going wrong, with this (not so great) workflow:

While working on <https://issues.guix.gnu.org/55444>, I figured
‘wait-for-service’ could be useful for system tests that were previously
using ‘start-service’ as a way to wait for a service to be up and
running.

I tried the following change, which should be semantically equivalent to
what was happening with the Shepherd 0.8.  However, it doesn’t seem to
work, for reasons that escape me.

Thoughts?

Ludo’.

diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm
index bc464a431a..c219868859 100644
--- a/gnu/tests/telephony.scm
+++ b/gnu/tests/telephony.scm
@@ -145,11 +145,7 @@ (define marionette
             (marionette-eval
              '(begin
                 (use-modules (gnu services herd))
-                (match (start-service 'jami)
-                  (#f #f)
-                  (('service response-parts ...)
-                   (match (assq-ref response-parts 'running)
-                     ((pid) (number? pid))))))
+                (wait-for-service 'jami #:timeout 60))
              marionette))
 
           (test-assert "service can be stopped"
@@ -158,12 +154,7 @@ (define marionette
                 (use-modules (gnu services herd)
                              (rnrs base))
                 (setenv "PATH" "/run/current-system/profile/bin")
-                (let ((pid (match (start-service 'jami)
-                             (#f #f)
-                             (('service response-parts ...)
-                              (match (assq-ref response-parts 'running)
-                                ((pid) pid))))))
-
+                (let ((pid (wait-for-service 'jami)))
                   (assert (number? pid))
 
                   (match (stop-service 'jami)
@@ -193,14 +184,10 @@ (define pid (match (start-service 'jami)
                 ;; Restart the service.
                 (restart-service 'jami)
 
-                (define new-pid (match (start-service 'jami)
-                                  (#f #f)
-                                  (('service response-parts ...)
-                                   (match (assq-ref response-parts 'running)
-                                     ((pid) pid)))))
+                (define new-pid (wait-for-service 'jami))
                 (assert (number? new-pid))
 
-                (not (eq? pid new-pid)))
+                (not (= pid new-pid)))
              marionette))
 
           (unless #$provisioning? (test-skip 1))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]