summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorYelninei <yelninei@tutamail.com>2025-08-27 15:51:39 +0000
committerLudovic Courtès <ludo@gnu.org>2025-08-30 23:52:09 +0200
commitfecaf550cfb0f0715965f65f57b96c1a033ae954 (patch)
treec2465539e7c4661234daacd97f57fa94f96c5d3b /gnu/tests
parent4b03c71022970154f978c343bb309a497f384c15 (diff)
services: hurd-vm: Support different hurd types.
* gnu/services/virtualization.scm (sanitize-hurd-vm-configuration-type): New procedure. (hurd-vm-confiuration): Add type field. (hurd-vm-disk-image): Use it. * doc/guix.texi (hurd-vm-configuration): Document it. * gnu/tests/virtualization.scm (%childhurd64-os): New variable. (run-childhurd-test): Add the os a parameter. (%test-childhurd): Adjust accordingly. (%test-childhurd64): New system test. Change-Id: Ie1c55a9414657ced4bf8b4324527037f1a1f78f4 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/virtualization.scm32
1 files changed, 29 insertions, 3 deletions
diff --git a/gnu/tests/virtualization.scm b/gnu/tests/virtualization.scm
index c55a944845f..a882d70e140 100644
--- a/gnu/tests/virtualization.scm
+++ b/gnu/tests/virtualization.scm
@@ -27,6 +27,7 @@
#:use-module (gnu system)
#:use-module (gnu system accounts)
#:use-module (gnu system file-systems)
+ #:use-module (gnu system hurd)
#:use-module (gnu system image)
#:use-module (gnu system images hurd)
#:use-module ((gnu system shadow) #:select (%base-user-accounts))
@@ -45,6 +46,7 @@
#:export (%test-libvirt
%test-qemu-guest-agent
%test-childhurd
+ %test-childhurd64
%test-build-vm))
@@ -277,6 +279,22 @@
(password "")) ;empty password
%base-user-accounts))))))))
+(define %childhurd64-os
+ (simple-operating-system
+ (service dhcpcd-service-type)
+ (service hurd-vm-service-type
+ (hurd-vm-configuration
+ (type 'hurd64-qcow2)
+ (os (operating-system
+ (inherit %hurd-vm-operating-system)
+ (kernel %hurd64-default-operating-system-kernel)
+ (kernel-arguments '("noide")) ;use rumpdisk
+ (users (cons (user-account
+ (name "test")
+ (group "users")
+ (password "")) ;empty password
+ %base-user-accounts))))))))
+
(define* (run-command-over-ssh command
#:key (port 10022) (user "test"))
"Return a program that runs COMMAND over SSH and prints the result on standard
@@ -307,7 +325,7 @@ output."
(program-file "run-command-over-ssh" run))
-(define (run-childhurd-test)
+(define (run-childhurd-test childhurd-os)
(define (import-module? module)
;; This module is optional and depends on Guile-Gcrypt, do skip it.
(and (guix-module-name? module)
@@ -315,7 +333,7 @@ output."
(define os
(marionette-operating-system
- %childhurd-os
+ childhurd-os
#:imported-modules (source-module-closure
'((gnu services herd)
(guix combinators)
@@ -454,7 +472,15 @@ output."
(description
"Connect to the GNU/Hurd virtual machine service, aka. a childhurd, making
sure that the childhurd boots and runs its SSH server.")
- (value (run-childhurd-test))))
+ (value (run-childhurd-test %childhurd-os))))
+
+(define %test-childhurd64
+ (system-test
+ (name "childhurd64")
+ (description
+ "Connect to the 64-bit GNU/Hurd virtual machine service, aka. a childhurd,
+ making sure that the childhurd boots and runs its SSH server.")
+ (value (run-childhurd-test %childhurd64-os))))
;;;