summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/install.scm68
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index b26dc890a44..cb845c64cc2 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -67,6 +67,7 @@
67 %test-separate-home-os 67 %test-separate-home-os
68 %test-raid-root-os 68 %test-raid-root-os
69 %test-encrypted-root-os 69 %test-encrypted-root-os
70 %test-encrypted-root-extra-options-os
70 %test-encrypted-home-os 71 %test-encrypted-home-os
71 %test-encrypted-home-os-key-file 72 %test-encrypted-home-os-key-file
72 %test-encrypted-root-not-boot-os 73 %test-encrypted-root-not-boot-os
@@ -844,6 +845,73 @@ build (current-guix) and then store a couple of full system images.")
844 845
845 846
846;;; 847;;;
848;;; LUKS-encrypted root with extra options: --allow-discards,
849;;; --perf-no_read_workqueue and --perf-no_write_workqueue
850;;;
851
852;; Except for the 'mapped-devices' field, this is exactly the same as
853;; %encrypted-root-os.
854(define-os-with-source (%encrypted-root-extra-options-os
855 %encrypted-root-extra-options-os-source)
856 ;; The OS we want to install.
857 (use-modules (gnu) (gnu tests) (srfi srfi-1))
858
859 (operating-system
860 (host-name "liberigilo")
861 (timezone "Europe/Paris")
862 (locale "en_US.UTF-8")
863
864 (bootloader (bootloader-configuration
865 (bootloader grub-bootloader)
866 (targets '("/dev/vdb"))))
867
868 ;; Note: Do not pass "console=ttyS0" so we can use our passphrase prompt
869 ;; detection logic in 'enter-luks-passphrase'.
870
871 (mapped-devices (list (mapped-device
872 (source (uuid "12345678-1234-1234-1234-123456789abc"))
873 (target "the-root-device")
874 (type luks-device-mapping)
875 (arguments '(#:allow-discards? #t
876 #:extra-options
877 ("--perf-no_read_workqueue"
878 "--perf-no_write_workqueue"))))))
879 (file-systems (cons (file-system
880 (device "/dev/mapper/the-root-device")
881 (mount-point "/")
882 (type "ext4"))
883 %base-file-systems))
884 (users (cons (user-account
885 (name "charlie")
886 (group "users")
887 (supplementary-groups '("wheel" "audio" "video")))
888 %base-user-accounts))
889 (services (cons (service marionette-service-type
890 (marionette-configuration
891 (imported-modules '((gnu services herd)
892 (guix combinators)))))
893 %base-services))))
894
895(define %test-encrypted-root-extra-options-os
896 (system-test
897 (name "encrypted-root-extra-options-os")
898 (description
899 "Test basic functionality of an OS installed like one would do by hand,
900with an LUKS-encrypted root partition opened with extra options
901(--allow-discards, --perf-no_read_workqueue and --perf-no_write_workqueue).
902This test is expensive in terms of CPU and storage usage since we need to
903build (current-guix) and then store a couple of full system images.")
904 (value
905 (mlet* %store-monad ((images (run-install %encrypted-root-extra-options-os
906 %encrypted-root-extra-options-os-source
907 #:script
908 %encrypted-root-installation-script))
909 (command (qemu-command* images)))
910 (run-basic-test %encrypted-root-os command "encrypted-root-extra-options-os"
911 #:initialization enter-luks-passphrase)))))
912
913
914;;;
847;;; Separate /home on LVM 915;;; Separate /home on LVM
848;;; 916;;;
849 917