From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Josselin Poiret <dev@jpoiret.xyz>, tiantian <typ22@foxmail.com>,
57307@debbugs.gnu.org
Subject: bug#57307: [PATCH 2/2] tests: Add test for menu-entry roundtrips as sexps.
Date: Sun, 21 Aug 2022 10:41:16 +0200 [thread overview]
Message-ID: <fd9865596fd75213c4b6bc2595300ba1294b1a81.1661070933.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <87sflquh1o.fsf@jpoiret.xyz>
* 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
next prev parent reply other threads:[~2022-08-21 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 10:08 bug#57307: guix system reports an error when uuid is used in menu-entry tiantian
2022-08-21 8:39 ` Josselin Poiret via Bug reports for GNU Guix
2022-08-21 8:41 ` bug#57307: [PATCH 1/2] bootloader: Convert device in menu-entry to proper sexp Josselin Poiret via Bug reports for GNU Guix
2022-08-21 8:41 ` Josselin Poiret via Bug reports for GNU Guix [this message]
[not found] ` <016c770e-b5d6-e2ab-b6b3-552b83496cc9@foxmail.com>
[not found] ` <tencent_2CD86BF61F4285B61885E32B31122D6A0C09@qq.com>
2022-08-21 13:03 ` bug#57307: guix system reports an error when uuid is used in menu-entry Josselin Poiret via Bug reports for GNU Guix
2022-08-28 21:46 ` Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd9865596fd75213c4b6bc2595300ba1294b1a81.1661070933.git.dev@jpoiret.xyz \
--to=bug-guix@gnu.org \
--cc=57307@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=typ22@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.