]> git.ozlabs.org Git - petitboot/blob - test/parser/test-kboot-single.c
discover/grub2: handle search commands to specify root filesystems
[petitboot] / test / parser / test-kboot-single.c
1
2 #include "parser-test.h"
3
4 static const char config[] =
5         "linux='/vmlinux initrd=/initrd arg1=value1 arg2'\n";
6
7 void run_test(struct parser_test *test)
8 {
9         struct discover_boot_option *opt;
10         struct discover_context *ctx;
11
12         test_read_conf_data(test, config);
13         test_run_parser(test, "kboot");
14
15         ctx = test->ctx;
16
17         check_boot_option_count(ctx, 1);
18         opt = get_boot_option(ctx, 0);
19
20         check_name(opt, "linux");
21         check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinux");
22         check_resolved_local_resource(opt->initrd, ctx->device, "/initrd");
23
24         check_args(opt, "arg1=value1 arg2");
25 }