all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 47172@debbugs.gnu.org
Subject: bug#47172: Shepherd 0.8.1 tests fail on core-updates
Date: Sun, 23 May 2021 15:49:17 +0200	[thread overview]
Message-ID: <87v9794l2a.fsf@gnu.org> (raw)
In-Reply-To: <87zgwl4ui0.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 23 May 2021 12:25:27 +0200")

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

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

> This turns out to be due to a… miscompilation bug.
>
> In (shepherd scripts herd), ‘run-command’ has this code:
>
>   (let ((sock    (open-connection socket-file))
>         (action* (if (and (eq? action 'detailed-status)
>                           (memq service '(root shepherd)))
>                      'status
>                      action)))
>     …)
>
> Problem is that everything works as if (eq? action 'detailed-status)
> was omitted, such that ‘herd stop root’ is interpreted as ‘herd status
> root’.

A workaround that works with 3.0.7 is swapping the two ‘and’
sub-expressions:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 664 bytes --]

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.

[-- Attachment #3: Type: text/plain, Size: 12 bytes --]


Ludo’.

  reply	other threads:[~2021-05-23 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 18:51 bug#47172: GNU Shepherd 0.8.1 fails on core-updates Léo Le Bouter via Bug reports for GNU Guix
2021-03-24 13:25 ` Léo Le Bouter via Bug reports for GNU Guix
2021-05-23 10:25 ` bug#47172: Shepherd 0.8.1 tests fail " Ludovic Courtès
2021-05-23 13:49   ` Ludovic Courtès [this message]
2021-05-23 15:23     ` Marius Bakke
2021-05-23 21:43       ` Ludovic Courtès
2021-09-30  8:57       ` Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9794l2a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=47172@debbugs.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.