guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 0a9eb3f3e2b7a08e6df4db44bc6fd56f2cd34173
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Thu Nov 13 09:38:35 2025 +0900

    tests: Add test to validate /etc/locatime is a symlink.
    
    Match the modern desktop expectation set by systemd [0] and relied on by 
some
    software (GNOME/glib, icecat, ungoogle-chromium, etc.).
    
    [0]  https://www.man7.org/linux/man-pages/man5/localtime.5.html
    
    * gnu/tests/base.scm
    ("/etc/localtime is a symlink to the timezone data file"): New test.
    
    Change-Id: I8fb95abb6a3e455dd7019d5d798f7862d16b6263
    Reviewed-by: Ludovic Courtès <[email protected]>
---
 gnu/tests/base.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 659b754802..dc51880d8e 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -232,6 +232,18 @@ info --version")
                `(tm:gmtoff (localtime ,sept-2021))
                marionette)))
 
+          (test-equal "/etc/localtime is a symlink to the timezone data file"
+            ;; This is a systemd-ism that most distributions follow; we do to,
+            ;; for compatibility with software that assumes this is convention
+            ;; is followed (see:
+            ;; 
<https://www.freedesktop.org/software/systemd/man/latest/localtime.html#>)
+            #$(operating-system-timezone os)
+            (marionette-eval
+             `(string-join
+               (take-right (string-split (readlink "/etc/localtime") #\/) 2)
+               "/")
+             marionette))
+
           (test-equal "/var/log/messages is not world-readable"
             #o640                       ;<https://bugs.gnu.org/40405>
             (begin

Reply via email to