]> git.ozlabs.org Git - petitboot/blob - test/parser/test-yaboot-partition-override.c
discover: Allow an in-progress boot to be cancelled
[petitboot] / test / parser / test-yaboot-partition-override.c
1 #include "parser-test.h"
2
3 #if 0 /* PARSER_EMBEDDED_CONFIG */
4 device=sda1
5 partition=2
6
7 image=/vmlinux
8         label=linux
9 #endif
10
11 void run_test(struct parser_test *test)
12 {
13         struct discover_boot_option *opt;
14         struct discover_context *ctx;
15         struct discover_device *dev;
16
17         test_read_conf_embedded(test);
18         test_run_parser(test, "yaboot");
19
20         ctx = test->ctx;
21
22         check_boot_option_count(ctx, 1);
23
24         opt = get_boot_option(ctx, 0);
25
26         check_name(opt, "linux");
27         check_unresolved_resource(opt->boot_image);
28
29         dev = test_create_device(test, "sda2");
30         test_hotplug_device(test, dev);
31
32         check_resolved_local_resource(opt->boot_image, dev, "/vmlinux");
33 }