bug-guile
[Top][All Lists]
Advanced

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

bug#48368: bug#47172: Shepherd 0.8.1 tests fail on core-updates


From: Ludovic Courtès
Subject: bug#48368: bug#47172: Shepherd 0.8.1 tests fail on core-updates
Date: Sun, 23 May 2021 23:43:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello,

Marius Bakke <marius@gnu.org> skribis:

> Ludovic Courtès <ludo@gnu.org> skriver:

[...]

>> A workaround that works with 3.0.7 is swapping the two ‘and’
>> sub-expressions:
>>
>> diff --git a/modules/shepherd/scripts/herd.scm 
>> b/modules/shepherd/scripts/herd.scm
>> index 106de1e..39d2e34 100644
>> --- a/modules/shepherd/scripts/herd.scm
>> +++ b/modules/shepherd/scripts/herd.scm
>> @@ -126,8 +126,8 @@ of pairs."
>>  the daemon via SOCKET-FILE."
>>    (with-system-error-handling
>>     (let ((sock    (open-connection socket-file))
>> -         (action* (if (and (eq? action 'detailed-status)
>> -                           (memq service '(root shepherd)))
>> +         (action* (if (and (memq service '(root shepherd))
>> +                           (eq? action 'detailed-status))
>>                        'status
>>                        action)))
>>       ;; Send the command.
>
> Cc'ing the relevant Guile bug:
>
>   https://bugs.gnu.org/48368

Oh nice!  (It would have saved me a bit of time to catch up on email
beforehand.  :-))

> See also commit 79be6a985799adc6d663890250f4fb7c12f015b4 on
> 'core-updates' that builds with -O1 as a less satisfactory workaround.

I found that ‘-O2 -Ono-resolve-primitives’ also does the trick.

If we manually replace ‘memq’ by two ‘eq?’ tests (which is what the
compiler does), the same problem is exhibited:

diff --git a/modules/shepherd/scripts/herd.scm 
b/modules/shepherd/scripts/herd.scm
index 106de1e..513508f 100644
--- a/modules/shepherd/scripts/herd.scm
+++ b/modules/shepherd/scripts/herd.scm
@@ -127,7 +127,8 @@ the daemon via SOCKET-FILE."
   (with-system-error-handling
    (let ((sock    (open-connection socket-file))
          (action* (if (and (eq? action 'detailed-status)
-                           (memq service '(root shepherd)))
+                           (or (eq? service 'root)
+                               (eq? service 'shepherd)))
                       'status
                       action)))
      ;; Send the command.
‘-Ono-resolve-primitives’ also helps in this case.

‘-Ono-optimize-branch-chains’ has no effect.

So, not much progress, but at least we have a workaround.

Thanks,
Ludo’.

reply via email to

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