]> git.ozlabs.org Git - petitboot/blob - test/parser/test-syslinux-explicit.c
ui/ncurses: Allow IPv6 addresses in address fields
[petitboot] / test / parser / test-syslinux-explicit.c
1 /* test a standard yocto syslinux wic cfg */
2
3 #include "parser-test.h"
4
5 #if 0 /* PARSER_EMBEDDED_CONFIG */
6
7
8 DEFAULT boot
9
10 KERNEL /vmlinuz
11 APPEND console=tty0
12
13 LABEL backup
14 KERNEL /backup/vmlinuz
15 APPEND root=/dev/sdb
16 INITRD /boot/initrd
17
18 IMPLICIT 0
19
20 #endif
21
22 void run_test(struct parser_test *test)
23 {
24         struct discover_boot_option *opt;
25         struct discover_context *ctx;
26
27         test_read_conf_embedded(test, "/boot/syslinux/syslinux.cfg");
28
29         test_run_parser(test, "syslinux");
30
31         ctx = test->ctx;
32
33         check_boot_option_count(ctx, 1);
34
35         opt = get_boot_option(ctx, 0);
36
37         check_name(opt, "backup");
38         check_resolved_local_resource(opt->boot_image, ctx->device, "/backup/vmlinuz");
39         check_args(opt, "root=/dev/sdb");
40         check_resolved_local_resource(opt->initrd, ctx->device, "/boot/initrd");
41 }