GNU bug report logs - #57307
guix system reports an error when uuid is used in menu-entry

Previous Next

Package: guix;

Reported by: tiantian <typ22 <at> foxmail.com>

Date: Sat, 20 Aug 2022 10:17:02 UTC

Severity: normal

Done: Marius Bakke <marius <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 57307 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Josselin Poiret <dev <at> jpoiret.xyz>, tiantian <typ22 <at> foxmail.com>,
 57307 <at> debbugs.gnu.org
Subject: [PATCH 2/2] tests: Add test for menu-entry roundtrips as sexps.
Date: Sun, 21 Aug 2022 10:41:16 +0200
* tests/boot-parameters.scm (%uuid-menu-entry,
%file-system-label-menu-entry): New variables.
("menu-entry roundtrip, uuid", "menu-entry roundtrip,
file-system-label"): New tests.
---
 tests/boot-parameters.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm
index 8e48e1775e..811ecffd75 100644
--- a/tests/boot-parameters.scm
+++ b/tests/boot-parameters.scm
@@ -303,4 +303,26 @@ (define operating-system-boot-parameters
    (operating-system-boot-parameters %default-operating-system
                                      %default-root-device)))
 
+(define %uuid-menu-entry
+  (menu-entry
+   (label "test")
+   (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc"))
+   (linux "/boot/bzImage")
+   (initrd "/boot/initrd.cpio.gz")))
+
+(define %file-system-label-menu-entry
+  (menu-entry
+   (label "test")
+   (device (file-system-label "test-label"))
+   (linux "/boot/bzImage")
+   (initrd "/boot/initrd.cpio.gz")))
+
+(test-equal "menu-entry roundtrip, uuid"
+  %uuid-menu-entry
+  (sexp->menu-entry (menu-entry->sexp %uuid-menu-entry)))
+
+(test-equal "menu-entry roundtrip, file-system-label"
+  %file-system-label-menu-entry
+  (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry)))
+
 (test-end "boot-parameters")
-- 
2.37.1





This bug report was last modified 2 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.