2 #include "parser-test.h"
4 void run_test(struct parser_test *test)
6 struct discover_boot_option *opt;
7 struct discover_context *ctx;
8 struct discover_device *dev;
11 test_read_conf_file(test, "grub2-f18-ppc64.conf");
12 test_run_parser(test, "grub2");
16 check_boot_option_count(ctx, 2);
18 for (i = 0; i < 2; i++) {
19 opt = get_boot_option(ctx, i);
21 check_unresolved_resource(opt->boot_image);
22 check_unresolved_resource(opt->initrd);
24 check_args(opt, "root=/dev/mapper/fedora_ltcfbl8eb-root ro "
25 "rd.lvm.lv=fedora_ltcfbl8eb/swap rd.dm=0 "
26 "rd.lvm.lv=fedora_ltcfbl8eb/root rd.md=0 "
27 "rd.luks=0 vconsole.keymap=us rhgb quiet");
29 check_name(opt, i == 0 ?
31 "Fedora, with Linux 3.6.10-4.fc18.ppc64p7");
33 check_name(opt, "Fedora");
35 check_name(opt, "Fedora, "
36 "with Linux 3.6.10-4.fc18.ppc64p7");
39 /* hotplug a device with a maching UUID, and check that our
40 * resources become resolved */
41 dev = test_create_device(test, "external");
42 dev->uuid = "773653a7-660e-490e-9a74-d9fdfc9bbbf6";
43 test_hotplug_device(test, dev);
45 for (i = 0; i < 2; i++) {
46 opt = get_boot_option(ctx, i);
48 check_resolved_local_resource(opt->boot_image, dev,
49 "/vmlinuz-3.6.10-4.fc18.ppc64p7");
50 check_resolved_local_resource(opt->initrd, dev,
51 "/initramfs-3.6.10-4.fc18.ppc64p7.img");