From: "Ludovic Courtès" <ludo@gnu.org>
To: Marius Bakke <marius@gnu.org>
Cc: 47172@debbugs.gnu.org, 48368@debbugs.gnu.org
Subject: bug#48368: bug#47172: Shepherd 0.8.1 tests fail on core-updates
Date: Sun, 23 May 2021 23:43:09 +0200 [thread overview]
Message-ID: <87lf853z4i.fsf__21390.0686403335$1621806256$gmane$org@gnu.org> (raw)
In-Reply-To: <875yz9qxrv.fsf@gnu.org> (Marius Bakke's message of "Sun, 23 May 2021 17:23:48 +0200")
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 643 bytes --]
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.
[-- Attachment #3: Type: text/plain, Size: 192 bytes --]
‘-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’.
prev parent reply other threads:[~2021-05-23 21:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <37305bfa08faea95b45a6496623154c2ebab1f11.camel@zaclys.net>
[not found] ` <87zgwl4ui0.fsf@gnu.org>
[not found] ` <87v9794l2a.fsf@gnu.org>
2021-05-23 15:23 ` bug#48368: bug#47172: Shepherd 0.8.1 tests fail on core-updates Marius Bakke
[not found] ` <875yz9qxrv.fsf@gnu.org>
2021-05-23 21:43 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='87lf853z4i.fsf__21390.0686403335$1621806256$gmane$org@gnu.org' \
--to=ludo@gnu.org \
--cc=47172@debbugs.gnu.org \
--cc=48368@debbugs.gnu.org \
--cc=marius@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).