diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-11-13 09:38:35 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2025-12-01 14:59:30 +0900 |
| commit | 0a9eb3f3e2b7a08e6df4db44bc6fd56f2cd34173 (patch) | |
| tree | 8cb7b7f4696295046af213526e93be1e3ec502bd /gnu/tests | |
| parent | c4298638ca27717be4a83cb033dcbfecdea88093 (diff) | |
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 <ludo@gnu.org>
Diffstat (limited to 'gnu/tests')
| -rw-r--r-- | gnu/tests/base.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 659b754802f..dc51880d8ed 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm | |||
| @@ -232,6 +232,18 @@ info --version") | |||
| 232 | `(tm:gmtoff (localtime ,sept-2021)) | 232 | `(tm:gmtoff (localtime ,sept-2021)) |
| 233 | marionette))) | 233 | marionette))) |
| 234 | 234 | ||
| 235 | (test-equal "/etc/localtime is a symlink to the timezone data file" | ||
| 236 | ;; This is a systemd-ism that most distributions follow; we do to, | ||
| 237 | ;; for compatibility with software that assumes this is convention | ||
| 238 | ;; is followed (see: | ||
| 239 | ;; <https://www.freedesktop.org/software/systemd/man/latest/localtime.html#>) | ||
| 240 | #$(operating-system-timezone os) | ||
| 241 | (marionette-eval | ||
| 242 | `(string-join | ||
| 243 | (take-right (string-split (readlink "/etc/localtime") #\/) 2) | ||
| 244 | "/") | ||
| 245 | marionette)) | ||
| 246 | |||
| 235 | (test-equal "/var/log/messages is not world-readable" | 247 | (test-equal "/var/log/messages is not world-readable" |
| 236 | #o640 ;<https://bugs.gnu.org/40405> | 248 | #o640 ;<https://bugs.gnu.org/40405> |
| 237 | (begin | 249 | (begin |
