]> git.ozlabs.org Git - petitboot/blobdiff - test/parser/test-grub2-blscfg-multiple-bls.c
lib/process: Add process_get_stdout
[petitboot] / test / parser / test-grub2-blscfg-multiple-bls.c
index 8fd218c371e8b92135a565f8ed82c30a346dcb09..d15fb24fd7ef3f84cfdbd0252e1db5bed2fd1655 100644 (file)
@@ -1,6 +1,7 @@
 #include "parser-test.h"
 
 #if 0 /* PARSER_EMBEDDED_CONFIG */
+set os_name=Fedora
 blscfg
 #endif
 
@@ -9,16 +10,18 @@ void run_test(struct parser_test *test)
        struct discover_boot_option *opt;
        struct discover_context *ctx;
 
+       test_add_dir(test, test->ctx->device, "/loader/entries");
+
        test_add_file_string(test, test->ctx->device,
                             "/loader/entries/6c063c8e48904f2684abde8eea303f41-4.15.2-302.fc28.x86_64.conf",
-                            "title Fedora (4.15.2-302.fc28.x86_64) 28 (Twenty Eight)\n"
+                            "title $os_name (4.15.2-302.fc28.x86_64) 28 (Twenty Eight)\n"
                             "linux /vmlinuz-4.15.2-302.fc28.x86_64\n"
                             "initrd /initramfs-4.15.2-302.fc28.x86_64.img\n"
                             "options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root\n\n");
 
        test_add_file_string(test, test->ctx->device,
                             "/loader/entries/6c063c8e48904f2684abde8eea303f41-4.14.18-300.fc28.x86_64.conf",
-                            "title Fedora (4.14.18-300.fc28.x86_64) 28 (Twenty Eight)\n"
+                            "title $os_name (4.14.18-300.fc28.x86_64) 28 (Twenty Eight)\n"
                             "linux /vmlinuz-4.14.18-300.fc28.x86_64\n"
                             "initrd /initramfs-4.14.18-300.fc28.x86_64.img\n"
                             "options root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root\n");