]> git.ozlabs.org Git - petitboot/blob - test/parser/test-pxe-ipxe.c
ui/ncurses: Allow IPv6 addresses in address fields
[petitboot] / test / parser / test-pxe-ipxe.c
1
2
3 #include "parser-test.h"
4
5 #if 0 /* PARSER_EMBEDDED_CONFIG */
6 #!ipxe
7 kernel vmlinux append kernel args
8 initrd initrd
9 #endif
10
11 /**
12  * Test that we recognise an ipxe-formatted script obtained from bootfile_url
13  * (DHCPv6 option 59) that some vendors use.
14  */
15
16 void run_test(struct parser_test *test)
17 {
18         struct discover_boot_option *opt;
19         struct discover_context *ctx;
20
21         test_read_conf_embedded_url(test, "tftp://host/dir1/conf");
22
23         test_set_event_source(test);
24         test_set_event_param(test->ctx->event, "bootfile_url", "tftp://host/dir1/conf");
25
26         test_run_parser(test, "pxe");
27
28         ctx = test->ctx;
29
30         check_boot_option_count(ctx, 1);
31         opt = get_boot_option(ctx, 0);
32
33         check_name(opt, "ipxe option (tftp://host/dir1/vmlinux)");
34
35         check_resolved_url_resource(opt->boot_image,
36                         "tftp://host/dir1/vmlinux");
37         check_resolved_url_resource(opt->initrd,
38                         "tftp://host/dir1/initrd");
39         check_args(opt, "append kernel args");
40 }