Subject: New etc-profile-d-service-type test fails, breaking many other tests
From: 45mg <[email-masked]>
To: [email-masked]
Cc: Maxim Cournoyer <[email-masked]>
Date: Sun, 08 Jun 2025 06:38:00 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

I noticed this when I ran the 'encrypted-home-os-key-file' test to test
a new patch to <mapped-device> [1], and it failed due to the
'/etc/profile.d is sourced' test failing. Eventually I figured out that
it fails on the latest master as well, and the latest CI run confirms
this:

https://ci.guix.gnu.org/build/10936896/details

Looking at the log file, you can see the failing test:

https://ci.guix.gnu.org/build/10936896/log/raw
--8<---------------cut here---------------start------------->8---
...
Test begin:
  test-name: "/etc/profile.d is sourced"
  source-file: "/gnu/store/178h83msb53wf8v57zabi8s4q4ksfid8-encrypted-home-os-builder"
  source-line: 1
  source-form: (test-assert "/etc/profile.d is sourced" (zero? (marionette-eval (quote (system "\n. /etc/profile\nset -e -x\ntest -f /etc/profile.d/test_profile_d.sh\ntest \"$PROFILE_D_OK\" = yes")) marionette)))
Test end:
  result-kind: fail
  actual-value: #f
  ...
--8<---------------cut here---------------end--------------->8---

Looking at some of the other failing tests, you can see that they fail
in exactly the same way:

encrypted-root-os
https://ci.guix.gnu.org/build/10936887/details
encrypted-home-os
https://ci.guix.gnu.org/build/10936894/details
jfs-root-os
https://ci.guix.gnu.org/build/10936890/details
btrfs-root-os
https://ci.guix.gnu.org/build/10936905/details

Before this, the last CI run that ran to completion was on commit
85b5c2c, which was before the etc/profile.d test was added. In total,
there are 23 new failing tests from this CI run:

https://ci.guix.gnu.org/eval/2062380?status=newly-failed

The strange thing is, the etc/profile.d test passes if I run it normally
as part of the basic tests, like this:
--8<---------------cut here---------------start------------->8---
guix shell -D guix --pure -- make check-system TESTS=basic
--8<---------------cut here---------------end--------------->8---

[1] https://yhetil.org/guix/[email-masked]/