GNU bug report logs -
#47172
Shepherd 0.8.1 tests fail on core-updates
Previous Next
Reported by: Léo Le Bouter <lle-bout <at> zaclys.net>
Date: Mon, 15 Mar 2021 18:52:02 UTC
Severity: important
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #18 received at 47172 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> 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:
[Message part 2 (text/x-patch, inline)]
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.
[Message part 3 (text/plain, inline)]
Ludo’.
This bug report was last modified 3 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.