]> git.ozlabs.org Git - petitboot/blob - test/parser/test-yaboot-partition.c
ui/ncurses/nc-config: Add validation for network settings
[petitboot] / test / parser / test-yaboot-partition.c
1 #include "parser-test.h"
2 #include <stdio.h>
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 device=sda
6 partition=2
7
8 image=/vmlinux
9         label=linux
10 #endif
11
12 void run_test(struct parser_test *test)
13 {
14         struct discover_boot_option *opt;
15         struct discover_context *ctx;
16         struct discover_device *dev;
17
18         test_read_conf_embedded(test, "/yaboot.conf");
19
20         test_run_parser(test, "yaboot");
21
22         ctx = test->ctx;
23
24         check_boot_option_count(ctx, 1);
25
26         opt = get_boot_option(ctx, 0);
27
28         check_name(opt, "linux");
29         check_unresolved_resource(opt->boot_image);
30
31         dev = test_create_device(test, "sda2");
32         test_hotplug_device(test, dev);
33
34         check_resolved_local_resource(opt->boot_image, dev, "/vmlinux");
35 }