| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 |
|
| 31 | (define-module (gnu tests install)
|
| 32 | #:use-module (gnu)
|
| 33 | #:use-module (gnu bootloader extlinux)
|
| 34 | #:use-module (gnu image)
|
| 35 | #:use-module (gnu tests)
|
| 36 | #:use-module (gnu tests base)
|
| 37 | #:use-module (gnu system)
|
| 38 | #:use-module (gnu system image)
|
| 39 | #:use-module (gnu system install)
|
| 40 | #:use-module (gnu system vm)
|
| 41 | #:use-module ((gnu build marionette) #:select (qemu-command))
|
| 42 | #:use-module (gnu packages admin)
|
| 43 | #:use-module (gnu packages bootloaders)
|
| 44 | #:use-module (gnu packages commencement) |
| 45 | #:use-module (gnu packages cpio)
|
| 46 | #:use-module (gnu packages cryptsetup)
|
| 47 | #:use-module (gnu packages disk)
|
| 48 | #:use-module (gnu packages emacs)
|
| 49 | #:use-module (gnu packages emacs-xyz)
|
| 50 | #:use-module (gnu packages firmware)
|
| 51 | #:use-module (gnu packages fonts)
|
| 52 | #:use-module (gnu packages guile)
|
| 53 | #:use-module (gnu packages linux)
|
| 54 | #:use-module (gnu packages ocr)
|
| 55 | #:use-module (gnu packages package-management)
|
| 56 | #:use-module (gnu packages ratpoison)
|
| 57 | #:use-module (gnu packages suckless)
|
| 58 | #:use-module (gnu packages terminals)
|
| 59 | #:use-module (gnu packages virtualization)
|
| 60 | #:use-module (gnu packages window-management)
|
| 61 | #:use-module (gnu packages xorg)
|
| 62 | #:use-module (gnu services desktop)
|
| 63 | #:use-module (gnu services networking)
|
| 64 | #:use-module (gnu services shepherd)
|
| 65 | #:use-module (gnu services xorg)
|
| 66 | #:use-module (guix store)
|
| 67 | #:use-module (guix monads)
|
| 68 | #:use-module (guix packages)
|
| 69 | #:use-module (guix grafts)
|
| 70 | #:use-module (guix gexp)
|
| 71 | #:use-module (guix utils)
|
| 72 | #:use-module (srfi srfi-1)
|
| 73 | #:export (%test-installed-os
|
| 74 | %test-installed-extlinux-os
|
| 75 | %test-iso-image-installer
|
| 76 | %test-separate-store-os
|
| 77 | %test-separate-home-os
|
| 78 | %test-raid-root-os
|
| 79 | %test-encrypted-root-os
|
| 80 | %test-encrypted-root-extra-options-os
|
| 81 | %test-encrypted-home-os
|
| 82 | %test-encrypted-home-os-key-file
|
| 83 | %test-encrypted-root-not-boot-os
|
| 84 | %test-btrfs-root-os
|
| 85 | %test-btrfs-root-on-subvolume-os
|
| 86 | %test-btrfs-raid-root-os
|
| 87 | %test-btrfs-raid10-root-os
|
| 88 | %test-btrfs-raid10-root-os-degraded
|
| 89 | %test-jfs-root-os
|
| 90 | %test-f2fs-root-os
|
| 91 | %test-xfs-root-os
|
| 92 | %test-lvm-separate-home-os
|
| 93 |
|
| 94 | %test-gui-installed-os
|
| 95 | %test-gui-uefi-installed-os
|
| 96 | %test-gui-installed-os-encrypted
|
| 97 | %test-gui-installed-desktop-os-encrypted))
|
| 98 |
|
| 99 | (define-os-with-source (%minimal-os %minimal-os-source)
|
| 100 | |
| 101 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 102 |
|
| 103 | (operating-system
|
| 104 | (host-name "liberigilo")
|
| 105 | (timezone "Europe/Paris")
|
| 106 | (locale "en_US.UTF-8")
|
| 107 |
|
| 108 | (bootloader (bootloader-configuration
|
| 109 | (bootloader grub-bootloader)
|
| 110 | (targets (list "/dev/vdb"))))
|
| 111 | (kernel-arguments '("console=ttyS0"))
|
| 112 | (file-systems (cons (file-system
|
| 113 | (device (file-system-label "my-root"))
|
| 114 | (mount-point "/")
|
| 115 | (type "ext4"))
|
| 116 | %base-file-systems))
|
| 117 | (users (cons (user-account
|
| 118 | (name "alice")
|
| 119 | (comment "Bob's sister")
|
| 120 | (group "users")
|
| 121 | (supplementary-groups '("wheel" "audio" "video")))
|
| 122 | %base-user-accounts))
|
| 123 | (services (cons (service marionette-service-type
|
| 124 | (marionette-configuration
|
| 125 | (imported-modules '((gnu services herd)
|
| 126 | (guix build utils)
|
| 127 | (guix combinators)))))
|
| 128 | %base-services))))
|
| 129 |
|
| 130 | (define (operating-system-add-packages os packages)
|
| 131 | "Append PACKAGES to OS packages list."
|
| 132 | (operating-system
|
| 133 | (inherit os)
|
| 134 | (packages (append packages (operating-system-packages os)))))
|
| 135 |
|
| 136 | (define-os-with-source (%minimal-extlinux-os
|
| 137 | %minimal-extlinux-os-source)
|
| 138 | (use-modules (gnu) (gnu tests) (gnu bootloader extlinux)
|
| 139 | (srfi srfi-1))
|
| 140 |
|
| 141 | (operating-system
|
| 142 | (host-name "liberigilo")
|
| 143 | (timezone "Europe/Paris")
|
| 144 | (locale "en_US.UTF-8")
|
| 145 |
|
| 146 | (bootloader (bootloader-configuration
|
| 147 | (bootloader extlinux-bootloader-gpt)
|
| 148 | (targets (list "/dev/vdb"))))
|
| 149 | (kernel-arguments '("console=ttyS0"))
|
| 150 | (file-systems (cons (file-system
|
| 151 | (device (file-system-label "my-root"))
|
| 152 | (mount-point "/")
|
| 153 | (type "ext4"))
|
| 154 | %base-file-systems))
|
| 155 | (services (cons (service marionette-service-type
|
| 156 | (marionette-configuration
|
| 157 | (imported-modules '((gnu services herd)
|
| 158 | (guix combinators)))))
|
| 159 | %base-services))))
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 | (define MiB (expt 2 20))
|
| 164 |
|
| 165 | (define %simple-installation-script
|
| 166 | |
| 167 | "\
|
| 168 | . /etc/profile
|
| 169 | set -e -x
|
| 170 | guix --version
|
| 171 |
|
| 172 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 173 | guix build dhcpcd
|
| 174 | parted --script /dev/vdb mklabel gpt \\
|
| 175 | mkpart primary ext2 1M 3M \\
|
| 176 | mkpart primary ext2 3M 2G \\
|
| 177 | set 1 boot on \\
|
| 178 | set 1 bios_grub on
|
| 179 | mkfs.ext4 -L my-root /dev/vdb2
|
| 180 | mount /dev/vdb2 /mnt
|
| 181 | df -h /mnt
|
| 182 | herd start cow-store /mnt
|
| 183 | mkdir /mnt/etc
|
| 184 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 185 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 186 | sync
|
| 187 | reboot\n")
|
| 188 |
|
| 189 | (define %extlinux-gpt-installation-script
|
| 190 | |
| 191 | |
| 192 | |
| 193 | "\
|
| 194 | . /etc/profile
|
| 195 | set -e -x
|
| 196 | guix --version
|
| 197 |
|
| 198 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 199 | guix build dhcpcd
|
| 200 | parted --script /dev/vdb mklabel gpt \\
|
| 201 | mkpart primary ext2 1M 2G \\
|
| 202 | set 1 legacy_boot on
|
| 203 | mkfs.ext4 -L my-root -O '^64bit' /dev/vdb1
|
| 204 | mount /dev/vdb1 /mnt
|
| 205 | df -h /mnt
|
| 206 | herd start cow-store /mnt
|
| 207 | mkdir /mnt/etc
|
| 208 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 209 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 210 | sync
|
| 211 | reboot\n")
|
| 212 |
|
| 213 | (define (uefi-firmware system)
|
| 214 | "Return the appropriate QEMU OVMF UEFI firmware for the given SYSTEM."
|
| 215 | (cond
|
| 216 | ((string-prefix? "x86_64" system)
|
| 217 | (file-append ovmf-x86-64 "/share/firmware/ovmf_x64.bin"))
|
| 218 | ((string-prefix? "i686" system)
|
| 219 | (file-append ovmf-i686 "/share/firmware/ovmf_ia32.bin"))
|
| 220 | ((string-prefix? "aarch64" system)
|
| 221 | (file-append ovmf-aarch64 "/share/firmware/ovmf_aarch64.bin"))
|
| 222 | (else #f)))
|
| 223 |
|
| 224 | (define* (run-install target-os target-os-source
|
| 225 | #:key
|
| 226 | (script %simple-installation-script)
|
| 227 | (gui-test #f)
|
| 228 | (packages '())
|
| 229 | (os (marionette-operating-system
|
| 230 | (operating-system
|
| 231 | |
| 232 | |
| 233 | |
| 234 | (inherit installation-os)
|
| 235 | (kernel-arguments '("console=ttyS0")))
|
| 236 | #:imported-modules '((gnu services herd)
|
| 237 | (gnu installer tests)
|
| 238 | (guix combinators))))
|
| 239 | (uefi-support? #f)
|
| 240 | (installation-image-type 'mbr-raw)
|
| 241 | (install-size 'guess)
|
| 242 | (target-size (* 2200 MiB))
|
| 243 | (memory "1200")
|
| 244 | (number-of-disks 1))
|
| 245 | "Run SCRIPT (a shell script following the system installation procedure) in
|
| 246 | OS to install TARGET-OS. Return the VM disk images of TARGET-SIZE bytes
|
| 247 | containing the installed system. PACKAGES is a list of packages added to OS.
|
| 248 | NUMBER-OF-DISKS can be used to specify a number of disks different than one,
|
| 249 | such as for RAID systems. The VM running the installation is ran with -m
|
| 250 | MEMORY."
|
| 251 | (mlet* %store-monad ((_ (set-grafting #f))
|
| 252 | (system (current-system))
|
| 253 |
|
| 254 | (uefi-firmware -> (and uefi-support?
|
| 255 | (uefi-firmware system)))
|
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | (target (operating-system-derivation target-os))
|
| 262 | (base-image -> (os->image
|
| 263 | (operating-system-with-gc-roots
|
| 264 | (operating-system-add-packages
|
| 265 | os packages)
|
| 266 | (list target guile-final))
|
| 267 | #:type (lookup-image-type-by-name
|
| 268 | installation-image-type)))
|
| 269 | (image ->
|
| 270 | (system-image
|
| 271 | (image
|
| 272 | (inherit base-image)
|
| 273 | (size install-size)
|
| 274 |
|
| 275 | |
| 276 | (substitutable? #f)))))
|
| 277 | (define install
|
| 278 | (with-imported-modules '((guix build utils)
|
| 279 | (gnu build marionette))
|
| 280 | #~(begin
|
| 281 | (use-modules (guix build utils)
|
| 282 | (gnu build marionette)
|
| 283 | (srfi srfi-1))
|
| 284 |
|
| 285 | (set-path-environment-variable "PATH" '("bin")
|
| 286 | (list #$qemu-minimal))
|
| 287 |
|
| 288 | (mkdir-p #$output)
|
| 289 | (for-each (lambda (n)
|
| 290 | (system* "qemu-img" "create" "-f" "qcow2"
|
| 291 | (format #f "~a/disk~a.qcow2" #$output n)
|
| 292 | #$(number->string target-size)))
|
| 293 | (iota #$number-of-disks))
|
| 294 |
|
| 295 | (define marionette
|
| 296 | (make-marionette
|
| 297 | `(,(which #$(qemu-command system))
|
| 298 | |
| 299 | ,@(if (or (string=? "aarch64-linux" #$system)
|
| 300 | (string=? "armhf-linux" #$system))
|
| 301 | '("-machine" "virt"
|
| 302 | "-cpu" "host")
|
| 303 | '())
|
| 304 | "-no-reboot"
|
| 305 | "-m" #$memory
|
| 306 | ,@(if #$uefi-firmware
|
| 307 | '("-bios" #$uefi-firmware)
|
| 308 | '())
|
| 309 | #$@(cond
|
| 310 | ((eq? 'mbr-raw installation-image-type)
|
| 311 | #~("-drive"
|
| 312 | ,(string-append "file=" #$image
|
| 313 | ",if=virtio,readonly")))
|
| 314 | ((eq? 'uncompressed-iso9660 installation-image-type)
|
| 315 | #~("-cdrom" #$image))
|
| 316 | (else
|
| 317 | (error
|
| 318 | "unsupported installation-image-type:"
|
| 319 | installation-image-type)))
|
| 320 | ,@(append-map
|
| 321 | (lambda (n)
|
| 322 | (list "-drive"
|
| 323 | (format #f "file=~a/disk~a.qcow2,if=virtio"
|
| 324 | #$output n)))
|
| 325 | (iota #$number-of-disks))
|
| 326 | ,@(if (file-exists? "/dev/kvm")
|
| 327 | '("-enable-kvm")
|
| 328 | '()))))
|
| 329 |
|
| 330 | (pk 'uname (marionette-eval '(uname) marionette))
|
| 331 |
|
| 332 | |
| 333 | (marionette-eval '(begin
|
| 334 | (use-modules (gnu services herd))
|
| 335 | (start-service 'term-tty1))
|
| 336 | marionette)
|
| 337 |
|
| 338 | (when #$(->bool script)
|
| 339 | (marionette-eval '(call-with-output-file "/etc/target-config.scm"
|
| 340 | (lambda (port)
|
| 341 | (write '#$target-os-source port)))
|
| 342 | marionette)
|
| 343 |
|
| 344 | |
| 345 | |
| 346 | (let ((status (marionette-eval '(system #$script) marionette)))
|
| 347 | (exit (or (eof-object? status)
|
| 348 | (equal? (status:term-sig status) SIGTERM)
|
| 349 | (equal? (status:exit-val status) 0)))))
|
| 350 |
|
| 351 | (when #$(->bool gui-test)
|
| 352 | (wait-for-unix-socket "/var/guix/installer-socket"
|
| 353 | marionette)
|
| 354 | (format #t "installer socket ready~%")
|
| 355 | (force-output)
|
| 356 | (exit #$(and gui-test
|
| 357 | (gui-test #~marionette)))))))
|
| 358 |
|
| 359 | (mlet %store-monad ((images-dir (gexp->derivation "installation"
|
| 360 | install
|
| 361 | #:substitutable? #f))) |
| 362 | (return (with-imported-modules '((guix build utils))
|
| 363 | #~(begin
|
| 364 | (use-modules (guix build utils))
|
| 365 | (find-files #$images-dir)))))))
|
| 366 |
|
| 367 | (define* (qemu-command* images #:key (uefi-support? #f) (memory-size 256))
|
| 368 | "Return as a monadic value the command to run QEMU with a writable overlay
|
| 369 | on top of IMAGES, a list of disk images. The QEMU VM has access to MEMORY-SIZE
|
| 370 | MiB of RAM."
|
| 371 | (mlet* %store-monad ((system (current-system))
|
| 372 | (uefi-firmware -> (and uefi-support?
|
| 373 | (uefi-firmware system))))
|
| 374 | (return #~(begin
|
| 375 | (use-modules (srfi srfi-1))
|
| 376 | `(,(string-append #$qemu-minimal "/bin/"
|
| 377 | #$(qemu-command system))
|
| 378 | |
| 379 | ,@(if (or (string=? "aarch64-linux" #$system)
|
| 380 | (string=? "armhf-linux" #$system))
|
| 381 | '("-machine" "virt"
|
| 382 | "-cpu" "host")
|
| 383 | '())
|
| 384 | "-snapshot" |
| 385 | ,@(if (file-exists? "/dev/kvm")
|
| 386 | '("-enable-kvm")
|
| 387 | '())
|
| 388 | ,@(if #$uefi-firmware
|
| 389 | '("-bios" #$uefi-firmware)
|
| 390 | '())
|
| 391 | "-no-reboot" "-m" #$(number->string memory-size)
|
| 392 | ,@(append-map (lambda (image)
|
| 393 | (list "-drive" (format #f "file=~a,if=virtio"
|
| 394 | image)))
|
| 395 | #$images))))))
|
| 396 |
|
| 397 | (define %test-installed-os
|
| 398 | (system-test
|
| 399 | (name "installed-os")
|
| 400 | (description
|
| 401 | "Test basic functionality of an OS installed like one would do by hand.
|
| 402 | This test is expensive in terms of CPU and storage usage since we need to
|
| 403 | build (current-guix) and then store a couple of full system images.")
|
| 404 | (value
|
| 405 | (mlet* %store-monad ((images (run-install %minimal-os %minimal-os-source))
|
| 406 | (command (qemu-command* images)))
|
| 407 | (run-basic-test %minimal-os command
|
| 408 | "installed-os")))))
|
| 409 |
|
| 410 | (define %test-installed-extlinux-os
|
| 411 | (system-test
|
| 412 | (name "installed-extlinux-os")
|
| 413 | (description
|
| 414 | "Test basic functionality of an OS booted with an extlinux bootloader. As
|
| 415 | per %test-installed-os, this test is expensive in terms of CPU and storage.")
|
| 416 | (value
|
| 417 | (mlet* %store-monad ((images (run-install %minimal-extlinux-os
|
| 418 | %minimal-extlinux-os-source
|
| 419 | #:packages
|
| 420 | (list syslinux)
|
| 421 | #:script
|
| 422 | %extlinux-gpt-installation-script))
|
| 423 | (command (qemu-command* images)))
|
| 424 | (run-basic-test %minimal-extlinux-os command
|
| 425 | "installed-extlinux-os")))))
|
| 426 |
|
| 427 |
|
| 428 | |
| 429 | |
| 430 | |
| 431 |
|
| 432 | (define-os-with-source (%minimal-os-on-vda %minimal-os-on-vda-source)
|
| 433 | |
| 434 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 435 |
|
| 436 | (operating-system
|
| 437 | (host-name "liberigilo")
|
| 438 | (timezone "Europe/Paris")
|
| 439 | (locale "en_US.UTF-8")
|
| 440 |
|
| 441 | (bootloader (bootloader-configuration
|
| 442 | (bootloader grub-bootloader)
|
| 443 | (targets (list "/dev/vda"))))
|
| 444 | (kernel-arguments '("console=ttyS0"))
|
| 445 | (file-systems (cons (file-system
|
| 446 | (device (file-system-label "my-root"))
|
| 447 | (mount-point "/")
|
| 448 | (type "ext4"))
|
| 449 | %base-file-systems))
|
| 450 | (users (cons (user-account
|
| 451 | (name "alice")
|
| 452 | (comment "Bob's sister")
|
| 453 | (group "users")
|
| 454 | (supplementary-groups '("wheel" "audio" "video")))
|
| 455 | %base-user-accounts))
|
| 456 | (services (cons (service marionette-service-type
|
| 457 | (marionette-configuration
|
| 458 | (imported-modules '((gnu services herd)
|
| 459 | (guix build utils)
|
| 460 | (guix combinators)))))
|
| 461 | %base-services))))
|
| 462 |
|
| 463 | (define %simple-installation-script-for-/dev/vda
|
| 464 | |
| 465 | "\
|
| 466 | . /etc/profile
|
| 467 | set -e -x
|
| 468 | guix --version
|
| 469 |
|
| 470 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 471 | guix build dhcpcd
|
| 472 | parted --script /dev/vda mklabel gpt \\
|
| 473 | mkpart primary ext2 1M 3M \\
|
| 474 | mkpart primary ext2 3M 2G \\
|
| 475 | set 1 boot on \\
|
| 476 | set 1 bios_grub on
|
| 477 | mkfs.ext4 -L my-root /dev/vda2
|
| 478 | mount /dev/vda2 /mnt
|
| 479 | df -h /mnt
|
| 480 | herd start cow-store /mnt
|
| 481 | mkdir /mnt/etc
|
| 482 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 483 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 484 | sync
|
| 485 | reboot\n")
|
| 486 |
|
| 487 | (define %test-iso-image-installer
|
| 488 | (system-test
|
| 489 | (name "iso-image-installer")
|
| 490 | (description
|
| 491 | "")
|
| 492 | (value
|
| 493 | (mlet* %store-monad ((images (run-install
|
| 494 | %minimal-os-on-vda
|
| 495 | %minimal-os-on-vda-source
|
| 496 | #:script
|
| 497 | %simple-installation-script-for-/dev/vda
|
| 498 | #:installation-image-type
|
| 499 | 'uncompressed-iso9660))
|
| 500 | (command (qemu-command* images)))
|
| 501 | (run-basic-test %minimal-os-on-vda command name)))))
|
| 502 |
|
| 503 |
|
| 504 | |
| 505 | |
| 506 | |
| 507 |
|
| 508 | (define-os-with-source (%separate-home-os %separate-home-os-source)
|
| 509 | |
| 510 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 511 |
|
| 512 | (operating-system
|
| 513 | (host-name "liberigilo")
|
| 514 | (timezone "Europe/Paris")
|
| 515 | (locale "en_US.utf8")
|
| 516 |
|
| 517 | (bootloader (bootloader-configuration
|
| 518 | (bootloader grub-bootloader)
|
| 519 | (targets '("/dev/vdb"))))
|
| 520 | (kernel-arguments '("console=ttyS0"))
|
| 521 | (file-systems (cons* (file-system
|
| 522 | (device (file-system-label "my-root"))
|
| 523 | (mount-point "/")
|
| 524 | (type "ext4"))
|
| 525 | (file-system
|
| 526 | (device "none")
|
| 527 | (mount-point "/home")
|
| 528 | (type "tmpfs"))
|
| 529 | %base-file-systems))
|
| 530 | (users (cons* (user-account
|
| 531 | (name "alice")
|
| 532 | (group "users"))
|
| 533 | (user-account
|
| 534 | (name "charlie")
|
| 535 | (group "users"))
|
| 536 | %base-user-accounts))
|
| 537 | (services (cons (service marionette-service-type
|
| 538 | (marionette-configuration
|
| 539 | (imported-modules '((gnu services herd)
|
| 540 | (guix combinators)))))
|
| 541 | %base-services))))
|
| 542 |
|
| 543 | (define %test-separate-home-os
|
| 544 | (system-test
|
| 545 | (name "separate-home-os")
|
| 546 | (description
|
| 547 | "Test basic functionality of an installed OS with a separate /home
|
| 548 | partition. In particular, home directories must be correctly created (see
|
| 549 | <https://bugs.gnu.org/21108>).")
|
| 550 | (value
|
| 551 | (mlet* %store-monad ((images (run-install %separate-home-os
|
| 552 | %separate-home-os-source
|
| 553 | #:script
|
| 554 | %simple-installation-script))
|
| 555 | (command (qemu-command* images)))
|
| 556 | (run-basic-test %separate-home-os command "separate-home-os")))))
|
| 557 |
|
| 558 |
|
| 559 | |
| 560 | |
| 561 | |
| 562 |
|
| 563 | (define-os-with-source (%separate-store-os %separate-store-os-source)
|
| 564 | |
| 565 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 566 |
|
| 567 | (operating-system
|
| 568 | (host-name "liberigilo")
|
| 569 | (timezone "Europe/Paris")
|
| 570 | (locale "en_US.UTF-8")
|
| 571 |
|
| 572 | (bootloader (bootloader-configuration
|
| 573 | (bootloader grub-bootloader)
|
| 574 | (targets (list "/dev/vdb"))))
|
| 575 | (kernel-arguments '("console=ttyS0"))
|
| 576 | (file-systems (cons* (file-system
|
| 577 | (device (file-system-label "root-fs"))
|
| 578 | (mount-point "/")
|
| 579 | (type "ext4"))
|
| 580 | (file-system
|
| 581 | (device (file-system-label "store-fs"))
|
| 582 | (mount-point "/gnu")
|
| 583 | (type "ext4"))
|
| 584 | %base-file-systems))
|
| 585 | (users %base-user-accounts)
|
| 586 | (services (cons (service marionette-service-type
|
| 587 | (marionette-configuration
|
| 588 | (imported-modules '((gnu services herd)
|
| 589 | (guix combinators)))))
|
| 590 | %base-services))))
|
| 591 |
|
| 592 | (define %separate-store-installation-script
|
| 593 | |
| 594 | "\
|
| 595 | . /etc/profile
|
| 596 | set -e -x
|
| 597 | guix --version
|
| 598 |
|
| 599 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 600 | guix build dhcpcd
|
| 601 | parted --script /dev/vdb mklabel gpt \\
|
| 602 | mkpart primary ext2 1M 3M \\
|
| 603 | mkpart primary ext2 3M 400M \\
|
| 604 | mkpart primary ext2 400M 2.4G \\
|
| 605 | set 1 boot on \\
|
| 606 | set 1 bios_grub on
|
| 607 | mkfs.ext4 -L root-fs /dev/vdb2
|
| 608 | mkfs.ext4 -L store-fs /dev/vdb3
|
| 609 | mount /dev/vdb2 /mnt
|
| 610 | mkdir /mnt/gnu
|
| 611 | mount /dev/vdb3 /mnt/gnu
|
| 612 | df -h /mnt
|
| 613 | df -h /mnt/gnu
|
| 614 | herd start cow-store /mnt
|
| 615 | mkdir /mnt/etc
|
| 616 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 617 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 618 | sync
|
| 619 | reboot\n")
|
| 620 |
|
| 621 | (define %test-separate-store-os
|
| 622 | (system-test
|
| 623 | (name "separate-store-os")
|
| 624 | (description
|
| 625 | "Test basic functionality of an OS installed like one would do by hand,
|
| 626 | where /gnu lives on a separate partition.")
|
| 627 | (value
|
| 628 | (mlet* %store-monad ((images (run-install %separate-store-os
|
| 629 | %separate-store-os-source
|
| 630 | #:script
|
| 631 | %separate-store-installation-script))
|
| 632 | (command (qemu-command* images)))
|
| 633 | (run-basic-test %separate-store-os command "separate-store-os")))))
|
| 634 |
|
| 635 |
|
| 636 | |
| 637 | |
| 638 | |
| 639 |
|
| 640 | (define-os-with-source (%raid-root-os %raid-root-os-source)
|
| 641 | |
| 642 | (use-modules (gnu) (gnu tests))
|
| 643 |
|
| 644 | (operating-system
|
| 645 | (host-name "raidified")
|
| 646 | (timezone "Europe/Paris")
|
| 647 | (locale "en_US.utf8")
|
| 648 |
|
| 649 | (bootloader (bootloader-configuration
|
| 650 | (bootloader grub-bootloader)
|
| 651 | (targets (list "/dev/vdb"))))
|
| 652 | (kernel-arguments '("console=ttyS0"))
|
| 653 |
|
| 654 | |
| 655 | (initrd-modules (cons "raid1" %base-initrd-modules))
|
| 656 |
|
| 657 | (mapped-devices (list (mapped-device
|
| 658 | (source (list "/dev/vda2" "/dev/vda3"))
|
| 659 | (target "/dev/md0")
|
| 660 | (type raid-device-mapping))))
|
| 661 | (file-systems (cons (file-system
|
| 662 | (device (file-system-label "root-fs"))
|
| 663 | (mount-point "/")
|
| 664 | (type "ext4")
|
| 665 | (dependencies mapped-devices))
|
| 666 | %base-file-systems))
|
| 667 | (users %base-user-accounts)
|
| 668 | (services (cons (service marionette-service-type
|
| 669 | (marionette-configuration
|
| 670 | (imported-modules '((gnu services herd)
|
| 671 | (guix combinators)))))
|
| 672 | %base-services))))
|
| 673 |
|
| 674 | (define %raid-root-installation-script
|
| 675 | |
| 676 | |
| 677 | |
| 678 | "\
|
| 679 | . /etc/profile
|
| 680 | set -e -x
|
| 681 | guix --version
|
| 682 |
|
| 683 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 684 | parted --script /dev/vdb mklabel gpt \\
|
| 685 | mkpart primary ext2 1M 3M \\
|
| 686 | mkpart primary ext2 3M 2G \\
|
| 687 | mkpart primary ext2 2G 4G \\
|
| 688 | set 1 boot on \\
|
| 689 | set 1 bios_grub on
|
| 690 | yes | mdadm --create /dev/md0 --verbose --level=mirror --raid-devices=2 \\
|
| 691 | /dev/vdb2 /dev/vdb3
|
| 692 | mkfs.ext4 -L root-fs /dev/md0
|
| 693 | mount /dev/md0 /mnt
|
| 694 | df -h /mnt
|
| 695 | herd start cow-store /mnt
|
| 696 | mkdir /mnt/etc
|
| 697 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 698 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 699 | sync
|
| 700 | reboot\n")
|
| 701 |
|
| 702 | (define %test-raid-root-os
|
| 703 | (system-test
|
| 704 | (name "raid-root-os")
|
| 705 | (description
|
| 706 | "Test functionality of an OS installed with a RAID root partition managed
|
| 707 | by 'mdadm'.")
|
| 708 | (value
|
| 709 | (mlet* %store-monad ((images (run-install %raid-root-os
|
| 710 | %raid-root-os-source
|
| 711 | #:script
|
| 712 | %raid-root-installation-script
|
| 713 | #:target-size (* 4100 MiB)))
|
| 714 | (command (qemu-command* images)))
|
| 715 | (run-basic-test %raid-root-os
|
| 716 | `(,@command) "raid-root-os")))))
|
| 717 |
|
| 718 |
|
| 719 | |
| 720 | |
| 721 | |
| 722 |
|
| 723 | (define-os-with-source (%encrypted-root-os %encrypted-root-os-source)
|
| 724 | |
| 725 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 726 |
|
| 727 | (operating-system
|
| 728 | (host-name "liberigilo")
|
| 729 | (timezone "Europe/Paris")
|
| 730 | (locale "en_US.UTF-8")
|
| 731 |
|
| 732 | (bootloader (bootloader-configuration
|
| 733 | (bootloader grub-bootloader)
|
| 734 | (targets '("/dev/vdb"))))
|
| 735 |
|
| 736 | |
| 737 | |
| 738 | |
| 739 | (kernel-arguments '("console=ttyS0"))
|
| 740 |
|
| 741 | (mapped-devices (list (mapped-device
|
| 742 | (source (uuid "12345678-1234-1234-1234-123456789abc"))
|
| 743 | (target "the-root-device")
|
| 744 | (type luks-device-mapping))))
|
| 745 | (file-systems (cons (file-system
|
| 746 | (device "/dev/mapper/the-root-device")
|
| 747 | (mount-point "/")
|
| 748 | (type "ext4"))
|
| 749 | %base-file-systems))
|
| 750 | (users (cons (user-account
|
| 751 | (name "charlie")
|
| 752 | (group "users")
|
| 753 | (supplementary-groups '("wheel" "audio" "video")))
|
| 754 | %base-user-accounts))
|
| 755 | (services (cons (service marionette-service-type
|
| 756 | (marionette-configuration
|
| 757 | (imported-modules '((gnu services herd)
|
| 758 | (guix combinators)))))
|
| 759 | %base-services))))
|
| 760 |
|
| 761 | (define %luks-passphrase
|
| 762 | |
| 763 | "thepassphrase")
|
| 764 |
|
| 765 | (define %encrypted-root-installation-script
|
| 766 | |
| 767 | (string-append "\
|
| 768 | . /etc/profile
|
| 769 | set -e -x
|
| 770 | guix --version
|
| 771 |
|
| 772 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 773 | ls -l /run/current-system/gc-roots
|
| 774 | parted --script /dev/vdb mklabel gpt \\
|
| 775 | mkpart primary ext2 1M 3M \\
|
| 776 | mkpart primary ext2 3M 2G \\
|
| 777 | set 1 boot on \\
|
| 778 | set 1 bios_grub on
|
| 779 | echo -n " %luks-passphrase " | \\
|
| 780 | cryptsetup luksFormat -i 1 --uuid=12345678-1234-1234-1234-123456789abc -q /dev/vdb2 -
|
| 781 | echo -n " %luks-passphrase " | \\
|
| 782 | cryptsetup open --type luks --key-file - /dev/vdb2 the-root-device
|
| 783 | mkfs.ext4 -L my-root /dev/mapper/the-root-device
|
| 784 | mount LABEL=my-root /mnt
|
| 785 | herd start cow-store /mnt
|
| 786 | mkdir /mnt/etc
|
| 787 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 788 | guix system build /mnt/etc/config.scm
|
| 789 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 790 | sync
|
| 791 | reboot\n"))
|
| 792 |
|
| 793 | (define (enter-luks-passphrase marionette)
|
| 794 | "Return a gexp to be inserted in the basic system test running on MARIONETTE
|
| 795 | to enter the LUKS passphrase. Only the GRUB passphrase prompt is expected;
|
| 796 | the initrd reuses the master key passed by GRUB via (proc)/luks_script."
|
| 797 | (let ((ocrad (file-append ocrad "/bin/ocrad")))
|
| 798 | #~(begin
|
| 799 | (define (passphrase-prompt? text)
|
| 800 | (string-contains (pk 'screen-text text) "Enter pass"))
|
| 801 |
|
| 802 | (test-assert "enter LUKS passphrase for GRUB"
|
| 803 | (begin
|
| 804 | |
| 805 | |
| 806 | (wait-for-screen-text #$marionette passphrase-prompt?
|
| 807 | #:ocr #$ocrad)
|
| 808 | (marionette-type #$(string-append %luks-passphrase "\n")
|
| 809 | #$marionette)
|
| 810 |
|
| 811 | |
| 812 | (marionette-control (string-append "screendump " #$output
|
| 813 | "/post-grub-passphrase.ppm")
|
| 814 | #$marionette))))))
|
| 815 |
|
| 816 | (define %test-encrypted-root-os
|
| 817 | (system-test
|
| 818 | (name "encrypted-root-os")
|
| 819 | (description
|
| 820 | "Test basic functionality of an OS installed like one would do by hand.
|
| 821 | This test is expensive in terms of CPU and storage usage since we need to
|
| 822 | build (current-guix) and then store a couple of full system images.")
|
| 823 | (value
|
| 824 | (mlet* %store-monad ((images (run-install %encrypted-root-os
|
| 825 | %encrypted-root-os-source
|
| 826 | #:script
|
| 827 | %encrypted-root-installation-script))
|
| 828 | (command (qemu-command* images)))
|
| 829 | (run-basic-test %encrypted-root-os command "encrypted-root-os"
|
| 830 | #:initialization enter-luks-passphrase)))))
|
| 831 |
|
| 832 |
|
| 833 | |
| 834 | |
| 835 | |
| 836 | |
| 837 |
|
| 838 | |
| 839 | |
| 840 | (define-os-with-source (%encrypted-root-extra-options-os
|
| 841 | %encrypted-root-extra-options-os-source)
|
| 842 | |
| 843 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 844 |
|
| 845 | (operating-system
|
| 846 | (host-name "liberigilo")
|
| 847 | (timezone "Europe/Paris")
|
| 848 | (locale "en_US.UTF-8")
|
| 849 |
|
| 850 | (bootloader (bootloader-configuration
|
| 851 | (bootloader grub-bootloader)
|
| 852 | (targets '("/dev/vdb"))))
|
| 853 |
|
| 854 | |
| 855 | |
| 856 |
|
| 857 | (mapped-devices (list (mapped-device
|
| 858 | (source (uuid "12345678-1234-1234-1234-123456789abc"))
|
| 859 | (target "the-root-device")
|
| 860 | (type luks-device-mapping)
|
| 861 | (arguments '(#:allow-discards? #t
|
| 862 | #:extra-options
|
| 863 | ("--perf-no_read_workqueue"
|
| 864 | "--perf-no_write_workqueue"))))))
|
| 865 | (file-systems (cons (file-system
|
| 866 | (device "/dev/mapper/the-root-device")
|
| 867 | (mount-point "/")
|
| 868 | (type "ext4"))
|
| 869 | %base-file-systems))
|
| 870 | (users (cons (user-account
|
| 871 | (name "charlie")
|
| 872 | (group "users")
|
| 873 | (supplementary-groups '("wheel" "audio" "video")))
|
| 874 | %base-user-accounts))
|
| 875 | (services (cons (service marionette-service-type
|
| 876 | (marionette-configuration
|
| 877 | (imported-modules '((gnu services herd)
|
| 878 | (guix combinators)))))
|
| 879 | %base-services))))
|
| 880 |
|
| 881 | (define %test-encrypted-root-extra-options-os
|
| 882 | (system-test
|
| 883 | (name "encrypted-root-extra-options-os")
|
| 884 | (description
|
| 885 | "Test basic functionality of an OS installed like one would do by hand,
|
| 886 | with an LUKS-encrypted root partition opened with extra options
|
| 887 | (--allow-discards, --perf-no_read_workqueue and --perf-no_write_workqueue).
|
| 888 | This test is expensive in terms of CPU and storage usage since we need to
|
| 889 | build (current-guix) and then store a couple of full system images.")
|
| 890 | (value
|
| 891 | (mlet* %store-monad ((images (run-install %encrypted-root-extra-options-os
|
| 892 | %encrypted-root-extra-options-os-source
|
| 893 | #:script
|
| 894 | %encrypted-root-installation-script))
|
| 895 | (command (qemu-command* images)))
|
| 896 | (run-basic-test %encrypted-root-os command "encrypted-root-extra-options-os"
|
| 897 | #:initialization enter-luks-passphrase)))))
|
| 898 |
|
| 899 |
|
| 900 | |
| 901 | |
| 902 | |
| 903 |
|
| 904 | |
| 905 | (define-os-with-source (%lvm-separate-home-os %lvm-separate-home-os-source)
|
| 906 | (use-modules (gnu) (gnu tests))
|
| 907 |
|
| 908 | (operating-system
|
| 909 | (host-name "separate-home-on-lvm")
|
| 910 | (timezone "Europe/Paris")
|
| 911 | (locale "en_US.utf8")
|
| 912 |
|
| 913 | (bootloader (bootloader-configuration
|
| 914 | (bootloader grub-bootloader)
|
| 915 | (targets (list "/dev/vdb"))))
|
| 916 | (kernel-arguments '("console=ttyS0"))
|
| 917 |
|
| 918 | (mapped-devices (list (mapped-device
|
| 919 | (source "vg0")
|
| 920 | (target "vg0-home")
|
| 921 | (type lvm-device-mapping))))
|
| 922 | (file-systems (cons* (file-system
|
| 923 | (device (file-system-label "root-fs"))
|
| 924 | (mount-point "/")
|
| 925 | (type "ext4"))
|
| 926 | (file-system
|
| 927 | (device "/dev/mapper/vg0-home")
|
| 928 | (mount-point "/home")
|
| 929 | (type "ext4")
|
| 930 | (dependencies mapped-devices))
|
| 931 | %base-file-systems))
|
| 932 | (users %base-user-accounts)
|
| 933 | (services (cons (service marionette-service-type
|
| 934 | (marionette-configuration
|
| 935 | (imported-modules '((gnu services herd)
|
| 936 | (guix combinators)))))
|
| 937 | %base-services))))
|
| 938 |
|
| 939 | (define %lvm-separate-home-installation-script
|
| 940 | "\
|
| 941 | . /etc/profile
|
| 942 | set -e -x
|
| 943 | guix --version
|
| 944 |
|
| 945 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 946 | parted --script /dev/vdb mklabel gpt \\
|
| 947 | mkpart primary ext2 1M 3M \\
|
| 948 | mkpart primary ext2 3M 2G \\
|
| 949 | mkpart primary ext2 2G 4G \\
|
| 950 | set 1 boot on \\
|
| 951 | set 1 bios_grub on
|
| 952 | pvcreate /dev/vdb3
|
| 953 | vgcreate vg0 /dev/vdb3
|
| 954 | lvcreate -L 2G -n home vg0
|
| 955 | vgchange -ay
|
| 956 | mkfs.ext4 -L root-fs /dev/vdb2
|
| 957 | mkfs.ext4 /dev/mapper/vg0-home
|
| 958 | mount /dev/vdb2 /mnt
|
| 959 | mkdir /mnt/home
|
| 960 | mount /dev/mapper/vg0-home /mnt/home
|
| 961 | df -h /mnt /mnt/home
|
| 962 | herd start cow-store /mnt
|
| 963 | mkdir /mnt/etc
|
| 964 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 965 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 966 | sync
|
| 967 | reboot\n")
|
| 968 |
|
| 969 | (define %test-lvm-separate-home-os
|
| 970 | (system-test
|
| 971 | (name "lvm-separate-home-os")
|
| 972 | (description
|
| 973 | "Test functionality of an OS installed with a LVM /home partition")
|
| 974 | (value
|
| 975 | (mlet* %store-monad ((images (run-install %lvm-separate-home-os
|
| 976 | %lvm-separate-home-os-source
|
| 977 | #:script
|
| 978 | %lvm-separate-home-installation-script
|
| 979 | #:packages (list lvm2-static)
|
| 980 | #:target-size (* 4100 MiB)))
|
| 981 | (command (qemu-command* images)))
|
| 982 | (run-basic-test %lvm-separate-home-os
|
| 983 | `(,@command) "lvm-separate-home-os")))))
|
| 984 |
|
| 985 |
|
| 986 | |
| 987 | |
| 988 | |
| 989 |
|
| 990 | (define-os-with-source (%encrypted-home-os %encrypted-home-os-source)
|
| 991 | (use-modules (gnu) (gnu tests))
|
| 992 |
|
| 993 | (operating-system
|
| 994 | (host-name "cipherhome")
|
| 995 | (timezone "Europe/Paris")
|
| 996 | (locale "en_US.utf8")
|
| 997 |
|
| 998 | (bootloader (bootloader-configuration
|
| 999 | (bootloader grub-bootloader)
|
| 1000 | (targets (list "/dev/vdb"))))
|
| 1001 |
|
| 1002 | |
| 1003 | |
| 1004 |
|
| 1005 | (mapped-devices (list (mapped-device
|
| 1006 | (source (uuid "12345678-1234-1234-1234-123456789abc"))
|
| 1007 | (target "the-home-device")
|
| 1008 | (type luks-device-mapping))))
|
| 1009 | (file-systems (cons* (file-system
|
| 1010 | (device (file-system-label "root-fs"))
|
| 1011 | (mount-point "/")
|
| 1012 | (type "ext4"))
|
| 1013 | (file-system
|
| 1014 | (device (file-system-label "home-fs"))
|
| 1015 | (mount-point "/home")
|
| 1016 | (type "ext4")
|
| 1017 | (dependencies mapped-devices))
|
| 1018 | %base-file-systems))
|
| 1019 | (users %base-user-accounts)
|
| 1020 | (services (cons (service marionette-service-type
|
| 1021 | (marionette-configuration
|
| 1022 | (imported-modules '((gnu services herd)
|
| 1023 | (guix combinators)))))
|
| 1024 | %base-services))))
|
| 1025 |
|
| 1026 | (define %encrypted-home-installation-script
|
| 1027 | (string-append "\
|
| 1028 | . /etc/profile
|
| 1029 | set -e -x
|
| 1030 | guix --version
|
| 1031 |
|
| 1032 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1033 | parted --script /dev/vdb mklabel gpt \\
|
| 1034 | mkpart primary ext2 1M 3M \\
|
| 1035 | mkpart primary ext2 3M 2G \\
|
| 1036 | mkpart primary ext2 2G 2.4G \\
|
| 1037 | set 1 boot on \\
|
| 1038 | set 1 bios_grub on
|
| 1039 |
|
| 1040 | echo -n " %luks-passphrase " | \\
|
| 1041 | cryptsetup luksFormat -i 1 --uuid=12345678-1234-1234-1234-123456789abc -q /dev/vdb3 -
|
| 1042 | echo -n " %luks-passphrase " | \\
|
| 1043 | cryptsetup open --type luks --key-file - /dev/vdb3 the-home-device
|
| 1044 |
|
| 1045 | mkfs.ext4 -L root-fs /dev/vdb2
|
| 1046 | mkfs.ext4 -L home-fs /dev/mapper/the-home-device
|
| 1047 | mount /dev/vdb2 /mnt
|
| 1048 |
|
| 1049 | # This script is used for both encrypted-home-os and encrypted-home-os-key-file
|
| 1050 | # tests. So we also add the keyfile here.
|
| 1051 | dd if=/dev/zero of=/key-file.bin bs=4096 count=1
|
| 1052 | ( cd /mnt;
|
| 1053 | echo /key-file.bin | cpio -oH newc > key-file.cpio
|
| 1054 | chmod 0000 key-file.cpio
|
| 1055 | mv /key-file.bin .
|
| 1056 | )
|
| 1057 | echo -n " %luks-passphrase " | \\
|
| 1058 | cryptsetup luksAddKey --key-file - -i 1 /dev/vdb3 /mnt/key-file.bin
|
| 1059 |
|
| 1060 | mkdir /mnt/home
|
| 1061 | mount /dev/mapper/the-home-device /mnt/home
|
| 1062 | df -h /mnt /mnt/home
|
| 1063 | herd start cow-store /mnt
|
| 1064 | mkdir /mnt/etc
|
| 1065 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1066 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1067 | sync
|
| 1068 | reboot\n"))
|
| 1069 |
|
| 1070 | (define (enter-luks-passphrase-for-home marionette)
|
| 1071 | "Return a gexp to be inserted in the basic system test running on MARIONETTE
|
| 1072 | to enter the LUKS passphrase. Note that 'cryptsetup open' in this case is
|
| 1073 | launched as a shepherd service."
|
| 1074 | (let ((ocrad (file-append ocrad "/bin/ocrad")))
|
| 1075 | #~(begin
|
| 1076 | (define (passphrase-prompt? text)
|
| 1077 | (string-contains (pk 'screen-text text) "Enter pass"))
|
| 1078 |
|
| 1079 | (test-assert "enter LUKS passphrase for the shepherd service"
|
| 1080 | (begin
|
| 1081 | |
| 1082 | |
| 1083 | (wait-for-screen-text #$marionette passphrase-prompt?
|
| 1084 | #:ocr #$ocrad
|
| 1085 | #:timeout 120)
|
| 1086 | (marionette-type #$(string-append %luks-passphrase "\n")
|
| 1087 | #$marionette)
|
| 1088 |
|
| 1089 | |
| 1090 | (marionette-control (string-append "screendump " #$output
|
| 1091 | "/shepherd-passphrase.ppm")
|
| 1092 | #$marionette))))))
|
| 1093 |
|
| 1094 | (define %test-encrypted-home-os
|
| 1095 | (system-test
|
| 1096 | (name "encrypted-home-os")
|
| 1097 | (description
|
| 1098 | "Test functionality of an OS installed with a LUKS /home partition")
|
| 1099 | (value
|
| 1100 | (mlet* %store-monad ((images (run-install %encrypted-home-os
|
| 1101 | %encrypted-home-os-source
|
| 1102 | #:script
|
| 1103 | %encrypted-home-installation-script
|
| 1104 | #:packages (list cpio)
|
| 1105 | #:target-size
|
| 1106 | (* 3000 MiB)))
|
| 1107 | (command (qemu-command* images)))
|
| 1108 | (run-basic-test %encrypted-home-os command "encrypted-home-os"
|
| 1109 | #:initialization enter-luks-passphrase-for-home)))))
|
| 1110 |
|
| 1111 |
|
| 1112 | |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | (define-os-with-source (%encrypted-home-os-key-file
|
| 1117 | %encrypted-home-os-key-file-source)
|
| 1118 | (use-modules (gnu) (gnu tests))
|
| 1119 |
|
| 1120 | (operating-system
|
| 1121 | (host-name "cipherhome")
|
| 1122 | (timezone "Europe/Prague")
|
| 1123 | (locale "en_US.utf8")
|
| 1124 |
|
| 1125 | (bootloader (bootloader-configuration
|
| 1126 | (bootloader grub-bootloader)
|
| 1127 | (targets (list "/dev/vdb"))
|
| 1128 | (extra-initrd "/key-file.cpio")))
|
| 1129 | (kernel-arguments '("console=ttyS0"))
|
| 1130 |
|
| 1131 | (mapped-devices (list (mapped-device
|
| 1132 | (source (uuid "12345678-1234-1234-1234-123456789abc"))
|
| 1133 | (target "the-home-device")
|
| 1134 | (type luks-device-mapping)
|
| 1135 | (arguments '(#:key-file "/key-file.bin")))))
|
| 1136 | (file-systems (cons* (file-system
|
| 1137 | (device (file-system-label "root-fs"))
|
| 1138 | (mount-point "/")
|
| 1139 | (type "ext4"))
|
| 1140 | (file-system
|
| 1141 | (device (file-system-label "home-fs"))
|
| 1142 | (mount-point "/home")
|
| 1143 | (type "ext4")
|
| 1144 | (dependencies mapped-devices))
|
| 1145 | %base-file-systems))
|
| 1146 | (services (cons (service marionette-service-type
|
| 1147 | (marionette-configuration
|
| 1148 | (imported-modules '((gnu services herd)
|
| 1149 | (guix combinators)))))
|
| 1150 | %base-services))))
|
| 1151 |
|
| 1152 | (define %test-encrypted-home-os-key-file
|
| 1153 | (system-test
|
| 1154 | (name "encrypted-home-os-key-file")
|
| 1155 | (description
|
| 1156 | "Test functionality of an OS installed with a LUKS /home partition with
|
| 1157 | unlock done using a key file")
|
| 1158 | (value
|
| 1159 | (mlet* %store-monad ((images (run-install %encrypted-home-os-key-file
|
| 1160 | %encrypted-home-os-key-file-source
|
| 1161 | #:script
|
| 1162 | %encrypted-home-installation-script
|
| 1163 | #:packages (list cpio)
|
| 1164 | #:target-size
|
| 1165 | (* 3000 MiB)))
|
| 1166 | (command (qemu-command* images)))
|
| 1167 | (run-basic-test %encrypted-home-os-key-file
|
| 1168 | command "encrypted-home-os-key-file")))))
|
| 1169 |
|
| 1170 |
|
| 1171 | |
| 1172 | |
| 1173 | |
| 1174 |
|
| 1175 | (define-os-with-source (%encrypted-root-not-boot-os
|
| 1176 | %encrypted-root-not-boot-os-source)
|
| 1177 | |
| 1178 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1179 |
|
| 1180 | (operating-system
|
| 1181 | (host-name "bootroot")
|
| 1182 | (timezone "Europe/Paris")
|
| 1183 | (locale "en_US.UTF-8")
|
| 1184 |
|
| 1185 | (bootloader (bootloader-configuration
|
| 1186 | (bootloader grub-bootloader)
|
| 1187 | (targets (list "/dev/vdb"))))
|
| 1188 |
|
| 1189 | (mapped-devices (list (mapped-device
|
| 1190 | (source
|
| 1191 | (uuid "12345678-1234-1234-1234-123456789abc"))
|
| 1192 | (target "root")
|
| 1193 | (type luks-device-mapping))))
|
| 1194 | (file-systems (cons* (file-system
|
| 1195 | (device (file-system-label "my-boot"))
|
| 1196 | (mount-point "/boot")
|
| 1197 | (type "ext4"))
|
| 1198 | (file-system
|
| 1199 | (device "/dev/mapper/root")
|
| 1200 | (mount-point "/")
|
| 1201 | (type "ext4"))
|
| 1202 | %base-file-systems))
|
| 1203 | (users (cons (user-account
|
| 1204 | (name "alice")
|
| 1205 | (group "users")
|
| 1206 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1207 | %base-user-accounts))
|
| 1208 | (services (cons (service marionette-service-type
|
| 1209 | (marionette-configuration
|
| 1210 | (imported-modules '((gnu services herd)
|
| 1211 | (guix combinators)))))
|
| 1212 | %base-services))))
|
| 1213 |
|
| 1214 | (define %encrypted-root-not-boot-installation-script
|
| 1215 | |
| 1216 | |
| 1217 | (format #f "\
|
| 1218 | . /etc/profile
|
| 1219 | set -e -x
|
| 1220 | guix --version
|
| 1221 |
|
| 1222 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1223 | ls -l /run/current-system/gc-roots
|
| 1224 | parted --script /dev/vdb mklabel gpt \\
|
| 1225 | mkpart primary ext2 1M 3M \\
|
| 1226 | mkpart primary ext2 3M 50M \\
|
| 1227 | mkpart primary ext2 50M 2G \\
|
| 1228 | set 1 boot on \\
|
| 1229 | set 1 bios_grub on
|
| 1230 | echo -n \"~a\" | cryptsetup luksFormat -i 1 --uuid=\"~a\" -q /dev/vdb3 -
|
| 1231 | echo -n \"~a\" | cryptsetup open --type luks --key-file - /dev/vdb3 root
|
| 1232 | mkfs.ext4 -L my-root /dev/mapper/root
|
| 1233 | mkfs.ext4 -L my-boot /dev/vdb2
|
| 1234 | mount LABEL=my-root /mnt
|
| 1235 | mkdir /mnt/boot
|
| 1236 | mount LABEL=my-boot /mnt/boot
|
| 1237 | echo \"Checking mounts\"
|
| 1238 | mount
|
| 1239 | herd start cow-store /mnt
|
| 1240 | mkdir /mnt/etc
|
| 1241 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1242 | guix system build /mnt/etc/config.scm
|
| 1243 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1244 | sync
|
| 1245 | echo \"Debugging info\"
|
| 1246 | blkid
|
| 1247 | cat /mnt/boot/grub/grub.cfg
|
| 1248 | reboot\n"
|
| 1249 | %luks-passphrase "12345678-1234-1234-1234-123456789abc"
|
| 1250 | %luks-passphrase))
|
| 1251 |
|
| 1252 | (define %test-encrypted-root-not-boot-os
|
| 1253 | (system-test
|
| 1254 | (name "encrypted-root-not-boot-os")
|
| 1255 | (description
|
| 1256 | "Test the manual installation on an OS with / in an encrypted partition
|
| 1257 | but /boot on a different, non-encrypted partition. This test is expensive in
|
| 1258 | terms of CPU and storage usage since we need to build (current-guix) and then
|
| 1259 | store a couple of full system images.")
|
| 1260 | (value
|
| 1261 | (mlet* %store-monad
|
| 1262 | ((images (run-install %encrypted-root-not-boot-os
|
| 1263 | %encrypted-root-not-boot-os-source
|
| 1264 | #:script
|
| 1265 | %encrypted-root-not-boot-installation-script
|
| 1266 | #:target-size
|
| 1267 | (* 2100 MiB)))
|
| 1268 | (command (qemu-command* images)))
|
| 1269 | (run-basic-test %encrypted-root-not-boot-os command
|
| 1270 | "encrypted-root-not-boot-os"
|
| 1271 | #:initialization enter-luks-passphrase)))))
|
| 1272 |
|
| 1273 |
|
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 |
|
| 1278 | (define-os-with-source (%btrfs-root-os %btrfs-root-os-source)
|
| 1279 | |
| 1280 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1281 |
|
| 1282 | (operating-system
|
| 1283 | (host-name "liberigilo")
|
| 1284 | (timezone "Europe/Paris")
|
| 1285 | (locale "en_US.UTF-8")
|
| 1286 |
|
| 1287 | (bootloader (bootloader-configuration
|
| 1288 | (bootloader grub-bootloader)
|
| 1289 | (targets (list "/dev/vdb"))))
|
| 1290 | (kernel-arguments '("console=ttyS0"))
|
| 1291 | (file-systems (cons (file-system
|
| 1292 | (device (file-system-label "my-root"))
|
| 1293 | (mount-point "/")
|
| 1294 | (type "btrfs"))
|
| 1295 | %base-file-systems))
|
| 1296 | (users (cons (user-account
|
| 1297 | (name "charlie")
|
| 1298 | (group "users")
|
| 1299 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1300 | %base-user-accounts))
|
| 1301 | (services (cons (service marionette-service-type
|
| 1302 | (marionette-configuration
|
| 1303 | (imported-modules '((gnu services herd)
|
| 1304 | (guix combinators)))))
|
| 1305 | %base-services))))
|
| 1306 |
|
| 1307 | (define %btrfs-root-installation-script
|
| 1308 | |
| 1309 | "\
|
| 1310 | . /etc/profile
|
| 1311 | set -e -x
|
| 1312 | guix --version
|
| 1313 |
|
| 1314 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1315 | ls -l /run/current-system/gc-roots
|
| 1316 | parted --script /dev/vdb mklabel gpt \\
|
| 1317 | mkpart primary ext2 1M 3M \\
|
| 1318 | mkpart primary ext2 3M 2G \\
|
| 1319 | set 1 boot on \\
|
| 1320 | set 1 bios_grub on
|
| 1321 | mkfs.btrfs -L my-root /dev/vdb2
|
| 1322 | mount /dev/vdb2 /mnt
|
| 1323 | btrfs subvolume create /mnt/home
|
| 1324 | herd start cow-store /mnt
|
| 1325 | mkdir /mnt/etc
|
| 1326 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1327 | guix system build /mnt/etc/config.scm
|
| 1328 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1329 | sync
|
| 1330 | reboot\n")
|
| 1331 |
|
| 1332 | (define %test-btrfs-root-os
|
| 1333 | (system-test
|
| 1334 | (name "btrfs-root-os")
|
| 1335 | (description
|
| 1336 | "Test basic functionality of an OS installed like one would do by hand.
|
| 1337 | This test is expensive in terms of CPU and storage usage since we need to
|
| 1338 | build (current-guix) and then store a couple of full system images.")
|
| 1339 | (value
|
| 1340 | (mlet* %store-monad ((images (run-install %btrfs-root-os
|
| 1341 | %btrfs-root-os-source
|
| 1342 | #:script
|
| 1343 | %btrfs-root-installation-script))
|
| 1344 | (command (qemu-command* images)))
|
| 1345 | (run-basic-test %btrfs-root-os command "btrfs-root-os")))))
|
| 1346 |
|
| 1347 |
|
| 1348 |
|
| 1349 | |
| 1350 | |
| 1351 | |
| 1352 | (define-os-with-source (%btrfs-raid-root-os %btrfs-raid-root-os-source)
|
| 1353 | |
| 1354 | (use-modules (gnu) (gnu tests))
|
| 1355 |
|
| 1356 | (operating-system
|
| 1357 | (host-name "liberigilo")
|
| 1358 | (timezone "Europe/Paris")
|
| 1359 | (locale "en_US.utf8")
|
| 1360 |
|
| 1361 | (bootloader (bootloader-configuration
|
| 1362 | (bootloader grub-bootloader)
|
| 1363 | (targets (list "/dev/vdb"))))
|
| 1364 | (kernel-arguments '("console=ttyS0"))
|
| 1365 |
|
| 1366 | (file-systems (cons (file-system
|
| 1367 | (device (file-system-label "root-fs"))
|
| 1368 | (mount-point "/")
|
| 1369 | (type "btrfs"))
|
| 1370 | %base-file-systems))
|
| 1371 | (users %base-user-accounts)
|
| 1372 | (services (cons (service marionette-service-type
|
| 1373 | (marionette-configuration
|
| 1374 | (imported-modules '((gnu services herd)
|
| 1375 | (guix combinators)))))
|
| 1376 | %base-services))))
|
| 1377 |
|
| 1378 | (define %btrfs-raid-root-installation-script
|
| 1379 | "\
|
| 1380 | . /etc/profile
|
| 1381 | set -e -x
|
| 1382 | guix --version
|
| 1383 |
|
| 1384 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1385 | parted --script /dev/vdb mklabel gpt \\
|
| 1386 | mkpart primary ext2 1M 3M \\
|
| 1387 | mkpart primary ext2 3M 2G \\
|
| 1388 | mkpart primary ext2 2G 4G \\
|
| 1389 | set 1 boot on \\
|
| 1390 | set 1 bios_grub on
|
| 1391 | mkfs.btrfs -L root-fs -d raid0 -m raid0 /dev/vdb2 /dev/vdb3
|
| 1392 | mount /dev/vdb2 /mnt
|
| 1393 | df -h /mnt
|
| 1394 | herd start cow-store /mnt
|
| 1395 | mkdir /mnt/etc
|
| 1396 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1397 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1398 | sync
|
| 1399 | reboot\n")
|
| 1400 |
|
| 1401 | (define %test-btrfs-raid-root-os
|
| 1402 | (system-test
|
| 1403 | (name "btrfs-raid-root-os")
|
| 1404 | (description "Test functionality of an OS installed with a Btrfs
|
| 1405 | RAID-0 (stripe) root partition.")
|
| 1406 | (value
|
| 1407 | (mlet* %store-monad
|
| 1408 | ((images (run-install %btrfs-raid-root-os
|
| 1409 | %btrfs-raid-root-os-source
|
| 1410 | #:script %btrfs-raid-root-installation-script
|
| 1411 | #:target-size (* 4100 MiB)))
|
| 1412 | (command (qemu-command* images)))
|
| 1413 | (run-basic-test %btrfs-raid-root-os `(,@command) "btrfs-raid-root-os")))))
|
| 1414 |
|
| 1415 |
|
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 |
|
| 1420 | (define-os-with-source (%btrfs-root-on-subvolume-os
|
| 1421 | %btrfs-root-on-subvolume-os-source)
|
| 1422 | |
| 1423 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1424 |
|
| 1425 | (operating-system
|
| 1426 | (host-name "hurd")
|
| 1427 | (timezone "Europe/Paris")
|
| 1428 | (locale "en_US.UTF-8")
|
| 1429 | (bootloader (bootloader-configuration
|
| 1430 | (bootloader grub-bootloader)
|
| 1431 | (targets (list "/dev/vdb"))))
|
| 1432 | (kernel-arguments '("console=ttyS0"))
|
| 1433 | (file-systems (cons* (file-system
|
| 1434 | (device (file-system-label "btrfs-pool"))
|
| 1435 | (mount-point "/")
|
| 1436 | (options "subvol=rootfs,compress=zstd")
|
| 1437 | (type "btrfs"))
|
| 1438 | (file-system
|
| 1439 | (device (file-system-label "btrfs-pool"))
|
| 1440 | (mount-point "/home")
|
| 1441 | (options "subvol=homefs,compress=lzo")
|
| 1442 | (type "btrfs"))
|
| 1443 | %base-file-systems))
|
| 1444 | (users (cons (user-account
|
| 1445 | (name "charlie")
|
| 1446 | (group "users")
|
| 1447 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1448 | %base-user-accounts))
|
| 1449 | (services (cons (service marionette-service-type
|
| 1450 | (marionette-configuration
|
| 1451 | (imported-modules '((gnu services herd)
|
| 1452 | (guix combinators)))))
|
| 1453 | %base-services))))
|
| 1454 |
|
| 1455 | (define %btrfs-root-on-subvolume-installation-script
|
| 1456 | |
| 1457 | "\
|
| 1458 | . /etc/profile
|
| 1459 | set -e -x
|
| 1460 | guix --version
|
| 1461 |
|
| 1462 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1463 | ls -l /run/current-system/gc-roots
|
| 1464 | parted --script /dev/vdb mklabel gpt \\
|
| 1465 | mkpart primary ext2 1M 3M \\
|
| 1466 | mkpart primary ext2 3M 2G \\
|
| 1467 | set 1 boot on \\
|
| 1468 | set 1 bios_grub on
|
| 1469 |
|
| 1470 | # Setup the top level Btrfs file system with its subvolume.
|
| 1471 | mkfs.btrfs -L btrfs-pool /dev/vdb2
|
| 1472 | mount /dev/vdb2 /mnt
|
| 1473 | btrfs subvolume create /mnt/rootfs
|
| 1474 | btrfs subvolume create /mnt/homefs
|
| 1475 | umount /dev/vdb2
|
| 1476 |
|
| 1477 | # Mount the subvolumes, ready for installation.
|
| 1478 | mount LABEL=btrfs-pool -o 'subvol=rootfs,compress=zstd' /mnt
|
| 1479 | mkdir /mnt/home
|
| 1480 | mount LABEL=btrfs-pool -o 'subvol=homefs,compress=zstd' /mnt/home
|
| 1481 |
|
| 1482 | herd start cow-store /mnt
|
| 1483 | mkdir /mnt/etc
|
| 1484 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1485 | guix system build /mnt/etc/config.scm
|
| 1486 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1487 | sync
|
| 1488 | reboot\n")
|
| 1489 |
|
| 1490 | (define %test-btrfs-root-on-subvolume-os
|
| 1491 | (system-test
|
| 1492 | (name "btrfs-root-on-subvolume-os")
|
| 1493 | (description
|
| 1494 | "Test basic functionality of an OS installed like one would do by hand.
|
| 1495 | This test is expensive in terms of CPU and storage usage since we need to
|
| 1496 | build (current-guix) and then store a couple of full system images.")
|
| 1497 | (value
|
| 1498 | (mlet* %store-monad
|
| 1499 | ((images (run-install %btrfs-root-on-subvolume-os
|
| 1500 | %btrfs-root-on-subvolume-os-source
|
| 1501 | #:script
|
| 1502 | %btrfs-root-on-subvolume-installation-script))
|
| 1503 | (command (qemu-command* images)))
|
| 1504 | (run-basic-test %btrfs-root-on-subvolume-os command
|
| 1505 | "btrfs-root-on-subvolume-os")))))
|
| 1506 |
|
| 1507 |
|
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 |
|
| 1512 | (define-os-with-source (%btrfs-raid10-root-os
|
| 1513 | %btrfs-raid10-root-os-source)
|
| 1514 | |
| 1515 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1516 |
|
| 1517 | (operating-system
|
| 1518 | (host-name "hurd")
|
| 1519 | (timezone "Europe/Paris")
|
| 1520 | (locale "en_US.UTF-8")
|
| 1521 | (bootloader (bootloader-configuration
|
| 1522 | (bootloader grub-bootloader)
|
| 1523 | (targets (list "/dev/vdb" "/dev/vdc" "/dev/vdd" "/dev/vde"))))
|
| 1524 | (kernel-arguments '("console=ttyS0"))
|
| 1525 | (file-systems (cons* (file-system
|
| 1526 | (device (uuid "16ff18e2-eb41-4324-8df5-80d3b53c411b"))
|
| 1527 | (mount-point "/")
|
| 1528 | (options "compress-force=zstd,degraded")
|
| 1529 | (type "btrfs"))
|
| 1530 | %base-file-systems))
|
| 1531 | (users (cons (user-account
|
| 1532 | (name "charlie")
|
| 1533 | (group "users")
|
| 1534 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1535 | %base-user-accounts))
|
| 1536 | (services (cons (service marionette-service-type
|
| 1537 | (marionette-configuration
|
| 1538 | (imported-modules '((gnu services herd)
|
| 1539 | (guix combinators)))))
|
| 1540 | %base-services))))
|
| 1541 |
|
| 1542 | (define %btrfs-raid10-root-installation-script
|
| 1543 | |
| 1544 | "\
|
| 1545 | . /etc/profile
|
| 1546 | set -e -x
|
| 1547 | guix --version
|
| 1548 |
|
| 1549 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1550 | ls -l /run/current-system/gc-roots
|
| 1551 | for d in vdb vdc vdd vde; do
|
| 1552 | parted --script /dev/$d mklabel gpt \\
|
| 1553 | mkpart primary ext2 1M 2M \\
|
| 1554 | mkpart primary ext2 2M 100% \\
|
| 1555 | set 1 boot on \\
|
| 1556 | set 1 bios_grub on
|
| 1557 | done
|
| 1558 |
|
| 1559 | # Create the RAID10 Btrfs array.
|
| 1560 | mkfs.btrfs -d raid10 -m raid1c4 /dev/{vdb2,vdc2,vdd2,vde2} \\
|
| 1561 | --uuid 16ff18e2-eb41-4324-8df5-80d3b53c411b
|
| 1562 |
|
| 1563 | # Mount it, ready for installation.
|
| 1564 | mount UUID=16ff18e2-eb41-4324-8df5-80d3b53c411b -o compress-force=zstd /mnt
|
| 1565 |
|
| 1566 | herd start cow-store /mnt
|
| 1567 | mkdir /mnt/etc
|
| 1568 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1569 | guix system build /mnt/etc/config.scm
|
| 1570 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1571 | sync
|
| 1572 | reboot\n")
|
| 1573 |
|
| 1574 | (define %test-btrfs-raid10-root-images
|
| 1575 | (mlet %store-monad
|
| 1576 | ((images (run-install %btrfs-raid10-root-os
|
| 1577 | %btrfs-raid10-root-os-source
|
| 1578 | #:script
|
| 1579 | %btrfs-raid10-root-installation-script
|
| 1580 | #:number-of-disks 4
|
| 1581 | #:target-size (* 1100 MiB))))
|
| 1582 | (return images)))
|
| 1583 |
|
| 1584 | (define %test-btrfs-raid10-root-os
|
| 1585 | (system-test
|
| 1586 | (name "btrfs-raid10-root-os")
|
| 1587 | (description
|
| 1588 | "Test basic functionality of an OS installed on top of a Btrfs RAID10 file
|
| 1589 | system spanning 4 disks. This test is expensive in terms of CPU and storage
|
| 1590 | usage since we need to build (current-guix) and then store a couple of full
|
| 1591 | system images.")
|
| 1592 | (value
|
| 1593 | (mlet* %store-monad
|
| 1594 | ((images %test-btrfs-raid10-root-images)
|
| 1595 | (command (qemu-command* images)))
|
| 1596 | (run-basic-test %btrfs-raid10-root-os command
|
| 1597 | "btrfs-raid10-root-os")))))
|
| 1598 |
|
| 1599 | (define %test-btrfs-raid10-root-os-degraded
|
| 1600 | (system-test
|
| 1601 | (name "btrfs-raid10-root-os-degraded")
|
| 1602 | (description
|
| 1603 | "Test basic functionality of an OS installed on top of a Btrfs RAID10 file
|
| 1604 | system spanning 6 disks, degraded to 5 disks. This test is expensive in terms
|
| 1605 | of CPU and storage usage since we need to build (current-guix) and then store
|
| 1606 | a couple of full system images.")
|
| 1607 | (value
|
| 1608 | (mlet* %store-monad
|
| 1609 | |
| 1610 | |
| 1611 | ((images %test-btrfs-raid10-root-images)
|
| 1612 | (command (qemu-command* #~(cdr #$images))))
|
| 1613 | (run-basic-test %btrfs-raid10-root-os command
|
| 1614 | "btrfs-raid10-root-os")))))
|
| 1615 |
|
| 1616 |
|
| 1617 | |
| 1618 | |
| 1619 | |
| 1620 |
|
| 1621 | (define-os-with-source (%jfs-root-os %jfs-root-os-source)
|
| 1622 | |
| 1623 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1624 |
|
| 1625 | (operating-system
|
| 1626 | (host-name "liberigilo")
|
| 1627 | (timezone "Europe/Paris")
|
| 1628 | (locale "en_US.UTF-8")
|
| 1629 |
|
| 1630 | (bootloader (bootloader-configuration
|
| 1631 | (bootloader grub-bootloader)
|
| 1632 | (targets (list "/dev/vdb"))))
|
| 1633 | (kernel-arguments '("console=ttyS0"))
|
| 1634 | (file-systems (cons (file-system
|
| 1635 | (device (file-system-label "my-root"))
|
| 1636 | (mount-point "/")
|
| 1637 | (type "jfs"))
|
| 1638 | %base-file-systems))
|
| 1639 | (users (cons (user-account
|
| 1640 | (name "charlie")
|
| 1641 | (group "users")
|
| 1642 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1643 | %base-user-accounts))
|
| 1644 | (services (cons (service marionette-service-type
|
| 1645 | (marionette-configuration
|
| 1646 | (imported-modules '((gnu services herd)
|
| 1647 | (guix combinators)))))
|
| 1648 | %base-services))))
|
| 1649 |
|
| 1650 | (define %jfs-root-installation-script
|
| 1651 | |
| 1652 | "\
|
| 1653 | . /etc/profile
|
| 1654 | set -e -x
|
| 1655 | guix --version
|
| 1656 |
|
| 1657 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1658 | ls -l /run/current-system/gc-roots
|
| 1659 | parted --script /dev/vdb mklabel gpt \\
|
| 1660 | mkpart primary ext2 1M 3M \\
|
| 1661 | mkpart primary ext2 3M 2G \\
|
| 1662 | set 1 boot on \\
|
| 1663 | set 1 bios_grub on
|
| 1664 | jfs_mkfs -L my-root -q /dev/vdb2
|
| 1665 | mount /dev/vdb2 /mnt
|
| 1666 | herd start cow-store /mnt
|
| 1667 | mkdir /mnt/etc
|
| 1668 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1669 | guix system build /mnt/etc/config.scm
|
| 1670 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1671 | sync
|
| 1672 | reboot\n")
|
| 1673 |
|
| 1674 | (define %test-jfs-root-os
|
| 1675 | (system-test
|
| 1676 | (name "jfs-root-os")
|
| 1677 | (description
|
| 1678 | "Test basic functionality of an OS installed like one would do by hand.
|
| 1679 | This test is expensive in terms of CPU and storage usage since we need to
|
| 1680 | build (current-guix) and then store a couple of full system images.")
|
| 1681 | (value
|
| 1682 | (mlet* %store-monad ((images (run-install %jfs-root-os
|
| 1683 | %jfs-root-os-source
|
| 1684 | #:script
|
| 1685 | %jfs-root-installation-script))
|
| 1686 | (command (qemu-command* images)))
|
| 1687 | (run-basic-test %jfs-root-os command "jfs-root-os")))))
|
| 1688 |
|
| 1689 |
|
| 1690 | |
| 1691 | |
| 1692 | |
| 1693 |
|
| 1694 | (define-os-with-source (%f2fs-root-os %f2fs-root-os-source)
|
| 1695 | |
| 1696 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1697 |
|
| 1698 | (operating-system
|
| 1699 | (host-name "liberigilo")
|
| 1700 | (timezone "Europe/Paris")
|
| 1701 | (locale "en_US.UTF-8")
|
| 1702 |
|
| 1703 | (bootloader (bootloader-configuration
|
| 1704 | (bootloader grub-bootloader)
|
| 1705 | (targets (list "/dev/vdb"))))
|
| 1706 | (kernel-arguments '("console=ttyS0"))
|
| 1707 | (file-systems (cons (file-system
|
| 1708 | (device (file-system-label "my-root"))
|
| 1709 | (mount-point "/")
|
| 1710 | (type "f2fs"))
|
| 1711 | %base-file-systems))
|
| 1712 | (users (cons (user-account
|
| 1713 | (name "charlie")
|
| 1714 | (group "users")
|
| 1715 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1716 | %base-user-accounts))
|
| 1717 | (services (cons (service marionette-service-type
|
| 1718 | (marionette-configuration
|
| 1719 | (imported-modules '((gnu services herd)
|
| 1720 | (guix combinators)))))
|
| 1721 | %base-services))))
|
| 1722 |
|
| 1723 | (define %f2fs-root-installation-script
|
| 1724 | |
| 1725 | "\
|
| 1726 | . /etc/profile
|
| 1727 | set -e -x
|
| 1728 | guix --version
|
| 1729 |
|
| 1730 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1731 | ls -l /run/current-system/gc-roots
|
| 1732 | parted --script /dev/vdb mklabel gpt \\
|
| 1733 | mkpart primary ext2 1M 3M \\
|
| 1734 | mkpart primary ext2 3M 2G \\
|
| 1735 | set 1 boot on \\
|
| 1736 | set 1 bios_grub on
|
| 1737 | mkfs.f2fs -l my-root -q /dev/vdb2
|
| 1738 | mount /dev/vdb2 /mnt
|
| 1739 | herd start cow-store /mnt
|
| 1740 | mkdir /mnt/etc
|
| 1741 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1742 | guix system build /mnt/etc/config.scm
|
| 1743 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1744 | sync
|
| 1745 | reboot\n")
|
| 1746 |
|
| 1747 | (define %test-f2fs-root-os
|
| 1748 | (system-test
|
| 1749 | (name "f2fs-root-os")
|
| 1750 | (description
|
| 1751 | "Test basic functionality of an OS installed like one would do by hand.
|
| 1752 | This test is expensive in terms of CPU and storage usage since we need to
|
| 1753 | build (current-guix) and then store a couple of full system images.")
|
| 1754 | (value
|
| 1755 | (mlet* %store-monad ((images (run-install %f2fs-root-os
|
| 1756 | %f2fs-root-os-source
|
| 1757 | #:script
|
| 1758 | %f2fs-root-installation-script))
|
| 1759 | (command (qemu-command* images)))
|
| 1760 | (run-basic-test %f2fs-root-os command "f2fs-root-os")))))
|
| 1761 |
|
| 1762 |
|
| 1763 | |
| 1764 | |
| 1765 | |
| 1766 |
|
| 1767 | (define-os-with-source (%xfs-root-os %xfs-root-os-source)
|
| 1768 | |
| 1769 | (use-modules (gnu) (gnu tests) (srfi srfi-1))
|
| 1770 |
|
| 1771 | (operating-system
|
| 1772 | (host-name "liberigilo")
|
| 1773 | (timezone "Europe/Paris")
|
| 1774 | (locale "en_US.UTF-8")
|
| 1775 |
|
| 1776 | (bootloader (bootloader-configuration
|
| 1777 | (bootloader grub-bootloader)
|
| 1778 | (targets (list "/dev/vdb"))))
|
| 1779 | (kernel-arguments '("console=ttyS0"))
|
| 1780 | (file-systems (cons (file-system
|
| 1781 | (device (file-system-label "my-root"))
|
| 1782 | (mount-point "/")
|
| 1783 | (type "xfs"))
|
| 1784 | %base-file-systems))
|
| 1785 | (users (cons (user-account
|
| 1786 | (name "charlie")
|
| 1787 | (group "users")
|
| 1788 | (supplementary-groups '("wheel" "audio" "video")))
|
| 1789 | %base-user-accounts))
|
| 1790 | (services (cons (service marionette-service-type
|
| 1791 | (marionette-configuration
|
| 1792 | (imported-modules '((gnu services herd)
|
| 1793 | (guix combinators)))))
|
| 1794 | %base-services))))
|
| 1795 |
|
| 1796 | (define %xfs-root-installation-script
|
| 1797 | |
| 1798 | "\
|
| 1799 | . /etc/profile
|
| 1800 | set -e -x
|
| 1801 | guix --version
|
| 1802 |
|
| 1803 | export GUIX_BUILD_OPTIONS=--no-grafts
|
| 1804 | ls -l /run/current-system/gc-roots
|
| 1805 | parted --script /dev/vdb mklabel gpt \\
|
| 1806 | mkpart primary ext2 1M 3M \\
|
| 1807 | mkpart primary ext2 3M 2G \\
|
| 1808 | set 1 boot on \\
|
| 1809 | set 1 bios_grub on
|
| 1810 | mkfs.xfs -L my-root -q /dev/vdb2
|
| 1811 | mount /dev/vdb2 /mnt
|
| 1812 | herd start cow-store /mnt
|
| 1813 | mkdir /mnt/etc
|
| 1814 | cp /etc/target-config.scm /mnt/etc/config.scm
|
| 1815 | guix system build /mnt/etc/config.scm
|
| 1816 | guix system init /mnt/etc/config.scm /mnt --no-substitutes
|
| 1817 | sync
|
| 1818 | reboot\n")
|
| 1819 |
|
| 1820 | (define %test-xfs-root-os
|
| 1821 | (system-test
|
| 1822 | (name "xfs-root-os")
|
| 1823 | (description
|
| 1824 | "Test basic functionality of an OS installed like one would do by hand.
|
| 1825 | This test is expensive in terms of CPU and storage usage since we need to
|
| 1826 | build (current-guix) and then store a couple of full system images.")
|
| 1827 | (value
|
| 1828 | (mlet* %store-monad ((images (run-install %xfs-root-os
|
| 1829 | %xfs-root-os-source
|
| 1830 | #:script
|
| 1831 | %xfs-root-installation-script))
|
| 1832 | (command (qemu-command* images)))
|
| 1833 | (run-basic-test %xfs-root-os command "xfs-root-os")))))
|
| 1834 |
|
| 1835 |
|
| 1836 | |
| 1837 | |
| 1838 | |
| 1839 |
|
| 1840 | (define %root-password "foo")
|
| 1841 |
|
| 1842 | (define* (gui-test-program marionette
|
| 1843 | #:key
|
| 1844 | (desktop? #f)
|
| 1845 | (encrypted? #f)
|
| 1846 | (uefi-support? #f)
|
| 1847 | (system (%current-system)))
|
| 1848 | #~(let ()
|
| 1849 | (define (screenshot file)
|
| 1850 | (marionette-control (string-append "screendump " file)
|
| 1851 | #$marionette))
|
| 1852 |
|
| 1853 | (define-syntax-rule (marionette-eval* exp marionette)
|
| 1854 | (or (marionette-eval exp marionette)
|
| 1855 | (throw 'marionette-eval-failure 'exp)))
|
| 1856 |
|
| 1857 | (setvbuf (current-output-port) 'none)
|
| 1858 | (setvbuf (current-error-port) 'none)
|
| 1859 |
|
| 1860 | (marionette-eval* '(use-modules (gnu installer tests)
|
| 1861 | (guix build utils))
|
| 1862 | #$marionette)
|
| 1863 |
|
| 1864 | |
| 1865 | (marionette-eval* '(let ((console (open-output-file "/dev/console")))
|
| 1866 | (setvbuf console 'none)
|
| 1867 | (conversation-log-port console))
|
| 1868 | #$marionette)
|
| 1869 |
|
| 1870 | |
| 1871 | (marionette-eval* '(call-with-output-file "/tmp/installer-assume-online"
|
| 1872 | (const #t))
|
| 1873 | #$marionette)
|
| 1874 |
|
| 1875 | |
| 1876 | |
| 1877 | (marionette-eval* '(call-with-output-file
|
| 1878 | "/tmp/installer-system-init-options"
|
| 1879 | (lambda (port)
|
| 1880 | (write '("--no-grafts" "--no-substitutes")
|
| 1881 | port)))
|
| 1882 | #$marionette)
|
| 1883 |
|
| 1884 | (marionette-eval* '(define installer-socket
|
| 1885 | (open-installer-socket))
|
| 1886 | #$marionette)
|
| 1887 | (screenshot "installer-start.ppm")
|
| 1888 |
|
| 1889 | (marionette-eval* '(choose-locale+keyboard
|
| 1890 | installer-socket
|
| 1891 | #:timezone '("Europe" "Paris"))
|
| 1892 | #$marionette)
|
| 1893 | (screenshot "installer-locale.ppm")
|
| 1894 |
|
| 1895 | |
| 1896 | (marionette-eval* '(enter-host-name+passwords installer-socket
|
| 1897 | #:host-name "liberigilo"
|
| 1898 | #:root-password
|
| 1899 | #$%root-password
|
| 1900 | #:users
|
| 1901 | '(("alice" "pass1")
|
| 1902 | ("bob" "pass2")))
|
| 1903 | #$marionette)
|
| 1904 | (screenshot "installer-services.ppm")
|
| 1905 |
|
| 1906 | (when #$(target-x86?)
|
| 1907 | (marionette-eval* '(choose-kernel installer-socket) #$marionette)
|
| 1908 | (screenshot "installer-kernel.ppm"))
|
| 1909 |
|
| 1910 | (marionette-eval* '(choose-services installer-socket
|
| 1911 | #:choose-desktop-environment?
|
| 1912 | (const #$desktop?)
|
| 1913 | #:choose-network-service?
|
| 1914 | (const #f))
|
| 1915 | #$marionette)
|
| 1916 | (screenshot "installer-partitioning.ppm")
|
| 1917 |
|
| 1918 | (marionette-eval* '(choose-partitioning installer-socket
|
| 1919 | #:encrypted? #$encrypted?
|
| 1920 | #:passphrase #$%luks-passphrase
|
| 1921 | #:uefi-support? #$uefi-support?)
|
| 1922 | #$marionette)
|
| 1923 | (screenshot "installer-run.ppm")
|
| 1924 |
|
| 1925 | (unless #$encrypted?
|
| 1926 | |
| 1927 | |
| 1928 | |
| 1929 | |
| 1930 | (marionette-eval* '(invoke #$(file-append util-linux "/sbin/swaplabel")
|
| 1931 | "-U" "11111111-2222-3333-4444-123456789abc"
|
| 1932 | "/dev/vda2")
|
| 1933 | #$marionette))
|
| 1934 |
|
| 1935 | (marionette-eval* '(start-installation installer-socket)
|
| 1936 | #$marionette)
|
| 1937 |
|
| 1938 | |
| 1939 | |
| 1940 | |
| 1941 | |
| 1942 | |
| 1943 | |
| 1944 | |
| 1945 | |
| 1946 | |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | (when #$uefi-support?
|
| 1951 | (marionette-eval*
|
| 1952 | '(begin
|
| 1953 | (use-modules (ice-9 match))
|
| 1954 | (let ((targets (cond
|
| 1955 | ((string-prefix? "x86_64" #$system)
|
| 1956 | '("grubx64.efi" "BOOTX64.EFI"))
|
| 1957 | ((string-prefix? "i686" #$system)
|
| 1958 | '("grubia32.efi" "BOOTIA32.EFI"))
|
| 1959 | (else #f))))
|
| 1960 | (match targets
|
| 1961 | ((src dest)
|
| 1962 | (rename-file "/mnt/boot/efi/EFI/Guix"
|
| 1963 | "/mnt/boot/efi/EFI/BOOT")
|
| 1964 | (rename-file
|
| 1965 | (string-append "/mnt/boot/efi/EFI/BOOT/" src)
|
| 1966 | (string-append "/mnt/boot/efi/EFI/BOOT/" dest)))
|
| 1967 | (_ #f))))
|
| 1968 | #$marionette))
|
| 1969 |
|
| 1970 | (marionette-eval* '(complete-installation installer-socket)
|
| 1971 | #$marionette)
|
| 1972 | (sync)
|
| 1973 | #t))
|
| 1974 |
|
| 1975 | (define %extra-encrypted-packages
|
| 1976 | |
| 1977 | (list dhcpcd
|
| 1978 | lvm2-static cryptsetup-static e2fsck/static
|
| 1979 | loadkeys-static grub-efi fatfsck/static dosfstools))
|
| 1980 |
|
| 1981 | (define %extra-desktop-packages
|
| 1982 | |
| 1983 | |
| 1984 | (list font-google-noto
|
| 1985 | font-google-noto-emoji
|
| 1986 | font-sarasa-gothic
|
| 1987 | |
| 1988 | mkfontscale
|
| 1989 | mkfontdir))
|
| 1990 |
|
| 1991 | (define %extra-mandb-packages
|
| 1992 | |
| 1993 | (list guile-gdbm-ffi
|
| 1994 | guile-zlib
|
| 1995 | guile-zstd))
|
| 1996 |
|
| 1997 | (define installation-os-for-gui-tests
|
| 1998 | |
| 1999 | |
| 2000 | |
| 2001 | (marionette-operating-system
|
| 2002 | (operating-system
|
| 2003 | (inherit (operating-system-with-console-syslog
|
| 2004 | (operating-system-add-packages
|
| 2005 | installation-os
|
| 2006 | (append %extra-encrypted-packages
|
| 2007 | %extra-mandb-packages
|
| 2008 | %extra-desktop-packages))))
|
| 2009 | (kernel-arguments '("console=ttyS0")))
|
| 2010 | #:imported-modules '((gnu services herd)
|
| 2011 | (gnu installer tests)
|
| 2012 | (guix combinators))))
|
| 2013 |
|
| 2014 | (define* (installation-target-os-for-gui-tests
|
| 2015 | #:key
|
| 2016 | (encrypted? #f)
|
| 2017 | (uefi-support? #f))
|
| 2018 | (operating-system
|
| 2019 | (inherit %minimal-os-on-vda)
|
| 2020 | (file-systems `(,(file-system
|
| 2021 | (device (file-system-label "my-root"))
|
| 2022 | (mount-point "/")
|
| 2023 | (type "ext4"))
|
| 2024 | ,@(if uefi-support?
|
| 2025 | (list (file-system
|
| 2026 | (device (uuid "1234-ABCD" 'fat))
|
| 2027 | (mount-point "/boot/efi")
|
| 2028 | (type "vfat")))
|
| 2029 | '())
|
| 2030 | ,@%base-file-systems))
|
| 2031 | (users (append (list (user-account
|
| 2032 | (name "alice")
|
| 2033 | (comment "Bob's sister")
|
| 2034 | (group "users")
|
| 2035 | (supplementary-groups
|
| 2036 | '("wheel" "audio" "video")))
|
| 2037 | (user-account
|
| 2038 | (name "bob")
|
| 2039 | (comment "Alice's brother")
|
| 2040 | (group "users")
|
| 2041 | (supplementary-groups
|
| 2042 | '("wheel" "audio" "video"))))
|
| 2043 | %base-user-accounts))
|
| 2044 | |
| 2045 | |
| 2046 | |
| 2047 | |
| 2048 | (swap-devices
|
| 2049 | (if encrypted?
|
| 2050 | '()
|
| 2051 | (list
|
| 2052 | (swap-space
|
| 2053 | (target (uuid "11111111-2222-3333-4444-123456789abc"))))))
|
| 2054 | (services (cons* (service dhcpcd-service-type)
|
| 2055 | (service ntp-service-type)
|
| 2056 | (operating-system-user-services %minimal-os-on-vda)))))
|
| 2057 |
|
| 2058 | (define* (installation-target-desktop-os-for-gui-tests
|
| 2059 | #:key (encrypted? #f))
|
| 2060 | (operating-system
|
| 2061 | (inherit (installation-target-os-for-gui-tests
|
| 2062 | #:encrypted? encrypted?))
|
| 2063 | (keyboard-layout (keyboard-layout "us" "altgr-intl"))
|
| 2064 |
|
| 2065 | |
| 2066 | |
| 2067 | (packages (append
|
| 2068 | (list icewm openbox awesome i3-wm i3status
|
| 2069 | dmenu st ratpoison xterm
|
| 2070 | emacs emacs-exwm emacs-desktop-environment
|
| 2071 | sway wmenu foot)
|
| 2072 | %base-packages))
|
| 2073 | (services
|
| 2074 | (append
|
| 2075 | (list (service gnome-desktop-service-type)
|
| 2076 | (service xfce-desktop-service-type)
|
| 2077 | (service mate-desktop-service-type)
|
| 2078 | (service plasma-desktop-service-type)
|
| 2079 | (set-xorg-configuration
|
| 2080 | (xorg-configuration
|
| 2081 | (keyboard-layout keyboard-layout)))
|
| 2082 | (service marionette-service-type
|
| 2083 | (marionette-configuration
|
| 2084 | (imported-modules '((gnu services herd)
|
| 2085 | (guix build utils)
|
| 2086 | (guix combinators))))))
|
| 2087 | %desktop-services))))
|
| 2088 |
|
| 2089 | (define* (guided-installation-test name
|
| 2090 | #:key
|
| 2091 | (desktop? #f)
|
| 2092 | (encrypted? #f)
|
| 2093 | (uefi-support? #f)
|
| 2094 | target-os
|
| 2095 | (installer-memory "2048")
|
| 2096 | (install-size 'guess)
|
| 2097 | (target-size (* 2200 MiB)))
|
| 2098 | (system-test
|
| 2099 | (name name)
|
| 2100 | (description
|
| 2101 | "Install an OS using the graphical installer and test it.")
|
| 2102 | (value
|
| 2103 | (mlet* %store-monad
|
| 2104 | ((images (run-install target-os '(this is unused)
|
| 2105 | #:script #f
|
| 2106 | #:os installation-os-for-gui-tests
|
| 2107 | #:uefi-support? uefi-support?
|
| 2108 | #:install-size install-size
|
| 2109 | #:target-size target-size
|
| 2110 | #:memory installer-memory
|
| 2111 | #:installation-image-type
|
| 2112 | 'uncompressed-iso9660
|
| 2113 | #:gui-test
|
| 2114 | (lambda (marionette)
|
| 2115 | (gui-test-program
|
| 2116 | marionette
|
| 2117 | #:desktop? desktop?
|
| 2118 | #:encrypted? encrypted?
|
| 2119 | #:uefi-support? uefi-support?))))
|
| 2120 | (command (qemu-command* images
|
| 2121 | #:uefi-support? uefi-support?
|
| 2122 | #:memory-size 512)))
|
| 2123 | (run-basic-test target-os command name
|
| 2124 | #:initialization (and encrypted? enter-luks-passphrase)
|
| 2125 | #:root-password %root-password
|
| 2126 | #:desktop? desktop?)))))
|
| 2127 |
|
| 2128 | (define %test-gui-installed-os
|
| 2129 | (guided-installation-test
|
| 2130 | "gui-installed-os"
|
| 2131 | #:target-os (installation-target-os-for-gui-tests)))
|
| 2132 |
|
| 2133 | |
| 2134 | (define %test-gui-uefi-installed-os
|
| 2135 | (guided-installation-test
|
| 2136 | "gui-uefi-installed-os"
|
| 2137 | #:uefi-support? #t
|
| 2138 | #:target-os (installation-target-os-for-gui-tests
|
| 2139 | #:uefi-support? #t)
|
| 2140 | #:target-size (* 4100 MiB)))
|
| 2141 |
|
| 2142 | (define %test-gui-installed-os-encrypted
|
| 2143 | (guided-installation-test
|
| 2144 | "gui-installed-os-encrypted"
|
| 2145 | #:encrypted? #t
|
| 2146 | #:target-os (installation-target-os-for-gui-tests
|
| 2147 | #:encrypted? #t)))
|
| 2148 |
|
| 2149 | |
| 2150 | |
| 2151 | (define %test-gui-installed-desktop-os-encrypted
|
| 2152 | (guided-installation-test "gui-installed-desktop-os-encrypted"
|
| 2153 | #:desktop? #t
|
| 2154 | #:encrypted? #t
|
| 2155 | #:target-os
|
| 2156 | (installation-target-desktop-os-for-gui-tests
|
| 2157 | #:encrypted? #t)
|
| 2158 | |
| 2159 | |
| 2160 | #:install-size (* 15000 MiB)
|
| 2161 | #:target-size (* 15000 MiB)))
|
| 2162 |
|
| 2163 | |