diff options
| author | Rutherther <rutherther@ditigal.xyz> | 2025-12-22 18:56:23 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2025-12-25 13:18:48 +0100 |
| commit | e51032b257c9a264bf1c37de02ea19878bf1d0b2 (patch) | |
| tree | 9dff58c253e2cc594f1d7099bff4a3131fffaf4d | |
| parent | 0d3f82123b8645196a8c37139ad02d3570d75cd6 (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.scm | 33 |
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'." | |||
| 266 | 266 | ||
| 267 | #$(guix-daemon-test-cases #~marionette) | 267 | #$(guix-daemon-test-cases #~marionette) |
| 268 | 268 | ||
| 269 | ;; NOTE: There was a bug where the service couldn't be restarted, | ||
| 270 | ;; because the store would be captured as read-only when creating | ||
| 271 | ;; the private mount namespace. | ||
| 272 | ;; See <https://codeberg.org/guix/guix/issues/4744>. | ||
| 273 | ;; So we try restarting it here. | ||
| 274 | (test-equal "restart guix-daemon.service" | ||
| 275 | 0 | ||
| 276 | (marionette-eval '(system* "systemctl" "restart" | ||
| 277 | "guix-daemon.service") | ||
| 278 | marionette)) | ||
| 279 | |||
| 280 | (test-equal "guix build hello after guix-daemon.service restart" | ||
| 281 | 0 | ||
| 282 | (marionette-eval '(system* "guix" "build" | ||
| 283 | "hello" "--no-grafts" | ||
| 284 | "--check") | ||
| 285 | marionette)) | ||
| 286 | |||
| 287 | (test-equal "guix gc after guix-daemon.service" | ||
| 288 | 0 | ||
| 289 | (marionette-eval '(system* "guix" "gc") | ||
| 290 | marionette)) | ||
| 291 | |||
| 292 | ;; NOTE: Since the fix of the bug meant stopping gnu-store.mount | ||
| 293 | ;; during startup of guix-daemon service, check that it's started. | ||
| 294 | ;; Check only after some time, because the service might not be | ||
| 295 | ;; up yet right after the restart. | ||
| 296 | (test-equal "gnu-store.mount is active after guix-daemon restart" | ||
| 297 | 0 | ||
| 298 | (marionette-eval '(system* "systemctl" "is-active" | ||
| 299 | "gnu-store.mount") | ||
| 300 | marionette)) | ||
| 301 | |||
| 269 | (test-assert "screenshot after" | 302 | (test-assert "screenshot after" |
| 270 | (marionette-control (string-append "screendump " #$output | 303 | (marionette-control (string-append "screendump " #$output |
| 271 | "/after-install.ppm") | 304 | "/after-install.ppm") |
