]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/tests/gfxterm_menu.c (gfxterm_menu): Handle out-of-memory
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 11 Nov 2013 23:44:00 +0000 (00:44 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 11 Nov 2013 23:44:00 +0000 (00:44 +0100)
condition.
* tests/grub_func_test.in: Increase memory allocation.

ChangeLog
grub-core/tests/gfxterm_menu.c
tests/grub_func_test.in

index 304874db3172be6a9854af7e0cfc07cc4d8ba4e0..fdbf83aea7971ee3227b696fd9fa8555a6a9b8f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/tests/gfxterm_menu.c (gfxterm_menu): Handle out-of-memory
+       condition.
+       * tests/grub_func_test.in: Increase memory allocation.
+
 2013-11-11  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/osdep/unix/getroot.c [HAVE_STRUCT_STATFS_F_FSTYPENAME
index 82c38027a6e917d7c5a3b3390a0c19fe0ef8617e..bb456a2aebbe8bb9ee558b58b9d43738c10794fa 100644 (file)
@@ -116,6 +116,12 @@ gfxterm_menu (void)
        grub_video_capture_start (&grub_test_video_modes[i],
                                  grub_video_fbstd_colors,
                                  grub_test_video_modes[i].number_of_colors);
+       if (grub_errno)
+         {
+           grub_test_assert (0, "can't start capture: %d: %s",
+                             grub_errno, grub_errmsg);
+           return;
+         }
        grub_terminal_input_fake_sequence ((int []) { -1, -1, -1, GRUB_TERM_KEY_DOWN, -1, 'e',
              -1, GRUB_TERM_KEY_RIGHT, -1, 'x', -1,  '\e', -1, '\e' }, 14);
 
index 62eb07c516c0e615859d9f97d33590c7d73dfe65..c039ffde0949ad3d110889ecf526bc1e4a69fcaa 100644 (file)
@@ -3,7 +3,8 @@ set -e
 
 . "@builddir@/grub-core/modinfo.sh"
 
-out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/boot/grub/fonts/unicode.pf2"="@builddir@/"unicode.pf2`
+# Increase memory as some of tests are high-resolution and need a lot of memory.
+out=`echo all_functional_test | @builddir@/grub-shell --timeout=3600 --files="/boot/grub/fonts/unicode.pf2"="@builddir@/"unicode.pf2 --qemu-opts="-m 512"`
 
 if [ "$(echo "$out" | tail -n 1)" != "ALL TESTS PASSED" ]; then
   echo "Functional test failure: $out"