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 "/boot/grub2/grub.cfg");
14 test_run_parser(test, "grub2");
18 check_boot_option_count(ctx, 2);
20 for (i = 0; i < 2; i++) {
21 opt = get_boot_option(ctx, i);
23 check_unresolved_resource(opt->boot_image);
24 check_unresolved_resource(opt->initrd);
26 check_args(opt, "root=/dev/mapper/fedora_ltcfbl8eb-root ro "
27 "rd.lvm.lv=fedora_ltcfbl8eb/swap rd.dm=0 "
28 "rd.lvm.lv=fedora_ltcfbl8eb/root rd.md=0 "
29 "rd.luks=0 vconsole.keymap=us rhgb quiet");
31 check_name(opt, i == 0 ?
33 "Fedora, with Linux 3.6.10-4.fc18.ppc64p7");
35 check_name(opt, "Fedora");
37 check_name(opt, "Fedora, "
38 "with Linux 3.6.10-4.fc18.ppc64p7");
41 /* hotplug a device with a maching UUID, and check that our
42 * resources become resolved */
43 dev = test_create_device(test, "external");
44 dev->uuid = "773653a7-660e-490e-9a74-d9fdfc9bbbf6";
45 test_hotplug_device(test, dev);
47 for (i = 0; i < 2; i++) {
48 opt = get_boot_option(ctx, i);
50 check_resolved_local_resource(opt->boot_image, dev,
51 "/vmlinuz-3.6.10-4.fc18.ppc64p7");
52 check_resolved_local_resource(opt->initrd, dev,
53 "/initramfs-3.6.10-4.fc18.ppc64p7.img");