diff options
author | Sergey Trofimov <sarg@sarg.org.ru> | 2023-03-22 13:53:28 +0100 |
---|---|---|
committer | Josselin Poiret <dev@jpoiret.xyz> | 2023-07-07 21:14:10 +0200 |
commit | 209204e23b39af09e0ea92540b6fa00a60e6a0ae (patch) | |
tree | 0afbe82bb47d5447de481bef6d002d90d4b867e2 /gnu/tests | |
parent | 4722496292ea282db7d1779bfada1e6a3813be99 (diff) | |
download | guix-209204e23b39af09e0ea92540b6fa00a60e6a0ae.tar.gz |
image: Prefer gpt partition table for efi images
* gnu/system/image.scm (efi-disk-image): Use gpt partition-table-type. (efi32-disk-image): Use gpt partition-table-type. (qcow2-image-type): Use mbr partition-table-type explicitly. * gnu/tests/image.scm: Assert partition table type of efi-disk-image. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/image.scm | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gnu/tests/image.scm b/gnu/tests/image.scm index 99d34b7670..be6852cae0 100644 --- a/gnu/tests/image.scm +++ b/gnu/tests/image.scm @@ -20,7 +20,7 @@ #:use-module (gnu) #:use-module (gnu image) #:use-module (gnu tests) - #:autoload (gnu system image) (system-image root-offset) + #:autoload (gnu system image) (system-image root-offset image-with-os efi-disk-image) #:use-module (gnu system uuid) #:use-module (gnu system vm) #:use-module (gnu packages guile) @@ -153,6 +153,10 @@ (flags '(boot)) (initializer dummy-initializer)))))) +;; A efi disk image with default partitions +(define i6 + (image-with-os efi-disk-image %simple-efi-os)) + (define (run-images-test) (define test (with-imported-modules '((srfi srfi-64) @@ -202,10 +206,10 @@ (disk-get-primary-partition-count (disk-new d2-device))) (test-equal "test" - (let* ((disk (disk-new d2-device)) - (partitions (disk-partitions disk)) - (boot-partition (find normal-partition? partitions))) - (partition-get-name boot-partition))) + (let* ((disk (disk-new d2-device)) + (partitions (disk-partitions disk)) + (boot-partition (find normal-partition? partitions))) + (partition-get-name boot-partition))) ;; Image i3. (define i3-image @@ -259,6 +263,15 @@ (filter data-partition? (disk-partitions (disk-new d5-device))))) + ;; Image i6. + (define i6-image + #$(system-image i6)) + (define d6-device + (get-device i6-image)) + + (test-equal "gpt" + (disk-type-name (disk-probe d6-device))) + (test-end))))) (gexp->derivation "images-test" test)) |