Subject: [shepherd 1.0] Tests fail on shepherd-1.0 package.
From: Noé Lopez <[email-masked]>
To: [email-masked]
Date: Mon, 14 Apr 2025 11:39:03 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

On the latest guix, I am unable to build the shepherd without
substitutes because of a failing test.

To reproduce, I define a copy of the package to force a rebuild:
(define-public shepherd-1.0-but-different
  (package
    (inherit shepherd-1.0)
    (name "shepherd-but-different")))

Then, “./pre-inst-env guix build shepherd-but-different” will fail with
with the following output (full build output attached).

There is also another time when tests/respawn failed, but it was on a
patched shepherd and I could not reproduce on guix master.

Have a nice day,
Noé

==========================================
   GNU Shepherd 1.0.3: ./test-suite.log
==========================================

# TOTAL: 79
# PASS:  77
# SKIP:  1
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: tests/pid-file
====================

+ shepherd --version
shepherd (GNU Shepherd) 1.0.3
Copyright (C) 2025 the Shepherd authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ herd --version
herd (GNU Shepherd) 1.0.3
Copyright (C) 2025 the Shepherd authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ socket=t-socket-3038
+ conf=t-conf-3038
+ log=t-log-3038
+ pid=t-pid-3038
+ stamp=t-stamp-3038
+ service_pid=t-service-pid-3038
+ herd='herd -s t-socket-3038'
+ trap 'cat t-log-3038 || true; rm -f t-socket-3038 t-conf-3038 t-service-pid-3038 t-stamp-3038 t-log-3038;
      test -f t-pid-3038 && kill `cat t-pid-3038` || true; rm -f t-pid-3038' EXIT
+ cat
+ rm -f t-pid-3038
+ test -f t-pid-3038
+ sleep 0.3
+ shepherd -I -s t-socket-3038 -c t-conf-3038 -l t-log-3038 --pid=t-pid-3038
GNU Shepherd 1.0.3 (Guile 3.0.9, x86_64-unknown-linux-gnu)
Starting service root...
Service root started.
Service root running with value #<<process> id: 3118 command: #f>.
Service root has been started.
Starting service test-works...
+ test -f t-pid-3038
++ cat t-pid-3038
+ shepherd_pid=3118
+ test -f t-stamp-3038
+ sleep 0.3
+ test -f t-stamp-3038
+ sleep 0.3
+ test -f t-stamp-3038
+ sleep 0.3
+ test -f t-stamp-3038
+ sleep 0.3
+ test -f t-stamp-3038
+ sleep 0.3
+ test -f t-stamp-3038
+ sleep 0.3
Service test-works has been started.
Configuration successfully loaded from 't-conf-3038'.
Service test-works started.
Service test-works running with value #<<process> id: 3151 command: ("guile" "-c" "(when (zero? (primitive-fork)) (call-with-output-file \"/tmp/guix-build-shepherd-but-different-1.0.3.drv-0/shepherd-1.0.3/t-service-pid-3038\" (lambda (port) (usleep 1500000) (display (getpid) port))) (sleep 100))")>.
+ test -f t-stamp-3038
+ herd -s t-socket-3038 status test-works
+ grep running
  It is running since 09:24:21 (0 seconds ago).
+ test -f t-service-pid-3038
++ cat t-service-pid-3038
+ kill -0 3151
+ herd -s t-socket-3038 stop test-works
Stopping service test-works...
Awaiting PID 3139, which is already gone.
Service test-works stopped.
Service test-works is now stopped.
+ rm t-service-pid-3038
+ herd -s t-socket-3038 start test
herd: error: exception caught while executing 'start' on service 'test':
In procedure delete-file: Read-only file system
+ true
+ herd -s t-socket-3038 status test
+ grep stopped
  It is stopped (failing).
+ test -f t-service-pid-3038
+ cat t-log-3038
2025-04-14 09:24:19 GNU Shepherd 1.0.3 (Guile 3.0.9, x86_64-unknown-linux-gnu)
2025-04-14 09:24:19 Starting service root...
2025-04-14 09:24:19 Service root started.
2025-04-14 09:24:19 Service root running with value #<<process> id: 3118 command: #f>.
2025-04-14 09:24:19 Service root has been started.
2025-04-14 09:24:19 Starting service test-works...
2025-04-14 09:24:21 Service test-works has been started.
2025-04-14 09:24:21 Configuration successfully loaded from 't-conf-3038'.
2025-04-14 09:24:21 Service test-works started.
2025-04-14 09:24:21 Service test-works running with value #<<process> id: 3151 command: ("guile" "-c" "(when (zero? (primitive-fork)) (call-with-output-file \"/tmp/guix-build-shepherd-but-different-1.0.3.drv-0/shepherd-1.0.3/t-service-pid-3038\" (lambda (port) (usleep 1500000) (display (getpid) port))) (sleep 100))")>.
2025-04-14 09:24:21 Stopping service test-works...
2025-04-14 09:24:21 Awaiting PID 3139, which is already gone.
2025-04-14 09:24:21 Service test-works stopped.
2025-04-14 09:24:21 Service test-works is now stopped.
2025-04-14 09:24:21 Starting service test...
2025-04-14 09:24:21 Service test failed to start.
+ rm -f t-socket-3038 t-conf-3038 t-service-pid-3038 t-stamp-3038 t-log-3038
+ test -f t-pid-3038
++ cat t-pid-3038
+ kill 3118
+ rm -f t-pid-3038
Stopping service root...
Exiting shepherd...
Service test is not running.
Service test-works is not running.
Service test-daemonizes is not running.
Exiting.
FAIL tests/pid-file.sh (exit status: 1)