summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRutherther <rutherther@ditigal.xyz>2025-12-22 18:56:23 +0100
committerRutherther <rutherther@ditigal.xyz>2025-12-25 13:18:48 +0100
commite51032b257c9a264bf1c37de02ea19878bf1d0b2 (patch)
tree9dff58c253e2cc594f1d7099bff4a3131fffaf4d
parent0d3f82123b8645196a8c37139ad02d3570d75cd6 (diff)
tests: foreign: Add test restarting guix-daemon.
* gnu/tests/foreign.scm (run-foreign-install-test): Restart the daemon, build and gc afterwards. Followup of 9a78e760762c1d93369e765bdce12388e1662ec6. Change-Id: Ia2304d6b9c83b5b8f410426ce00e078c2f004198 Signed-off-by: Rutherther <rutherther@ditigal.xyz>
-rw-r--r--gnu/tests/foreign.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/tests/foreign.scm b/gnu/tests/foreign.scm
index 0e8093d748e..1d480f157d8 100644
--- a/gnu/tests/foreign.scm
+++ b/gnu/tests/foreign.scm
@@ -266,6 +266,39 @@ of DEB-FILES with 'dpkg -i'."
#$(guix-daemon-test-cases #~marionette)
+ ;; NOTE: There was a bug where the service couldn't be restarted,
+ ;; because the store would be captured as read-only when creating
+ ;; the private mount namespace.
+ ;; See <https://codeberg.org/guix/guix/issues/4744>.
+ ;; So we try restarting it here.
+ (test-equal "restart guix-daemon.service"
+ 0
+ (marionette-eval '(system* "systemctl" "restart"
+ "guix-daemon.service")
+ marionette))
+
+ (test-equal "guix build hello after guix-daemon.service restart"
+ 0
+ (marionette-eval '(system* "guix" "build"
+ "hello" "--no-grafts"
+ "--check")
+ marionette))
+
+ (test-equal "guix gc after guix-daemon.service"
+ 0
+ (marionette-eval '(system* "guix" "gc")
+ marionette))
+
+ ;; NOTE: Since the fix of the bug meant stopping gnu-store.mount
+ ;; during startup of guix-daemon service, check that it's started.
+ ;; Check only after some time, because the service might not be
+ ;; up yet right after the restart.
+ (test-equal "gnu-store.mount is active after guix-daemon restart"
+ 0
+ (marionette-eval '(system* "systemctl" "is-active"
+ "gnu-store.mount")
+ marionette))
+
(test-assert "screenshot after"
(marionette-control (string-append "screendump " #$output
"/after-install.ppm")