1 #include "parser-test.h"
3 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 menuentry 'title Fedora (4.15-9-304.fc28.x86_64) 28 (Twenty Eight)' {
6 linux /vmlinuz-4.15-9-301.fc28.x86_64
9 menuentry 'title Fedora (4.15.6-300.fc28.x86_64) 28 (Twenty Eight)' {
10 linux /vmlinuz-4.15.6-300.fc28.x86_64
15 void run_test(struct parser_test *test)
17 struct discover_boot_option *opt;
18 struct discover_context *ctx;
20 test_add_file_string(test, test->ctx->device,
21 "/loader/entries/6c063c8e48904f2684abde8eea303f41-4.15.2-300.fc28.x86_64.conf",
22 "title Fedora (4.15.2-300.fc28.x86_64) 28 (Twenty Eight)\n"
23 "linux /vmlinuz-4.15.2-300.fc28.x86_64\n"
24 "initrd /initramfs-4.15.2-300.fc28.x86_64.img\n"
25 "options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root\n\n");
27 test_add_file_string(test, test->ctx->device,
28 "/loader/entries/6c063c8e48904f2684abde8eea303f41-4.14.18-300.fc28.x86_64.conf",
29 "title Fedora (4.14.18-300.fc28.x86_64) 28 (Twenty Eight)\n"
30 "linux /vmlinuz-4.14.18-300.fc28.x86_64\n"
31 "initrd /initramfs-4.14.18-300.fc28.x86_64.img\n"
32 "options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root\n");
34 test_read_conf_embedded(test, "/boot/grub2/grub.cfg");
36 test_run_parser(test, "grub2");
40 opt = get_boot_option(ctx, 2);
42 check_name(opt, "Fedora (4.15.2-300.fc28.x86_64) 28 (Twenty Eight)");
44 check_is_default(opt);