Blame SOURCES/0411-New-series-of-tests-for-gfxterm-and-gfxmenu.patch

f96e0b
From 5a030df7b1a5e9a15689be38a09c7ff37d874fbc Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Fri, 3 May 2013 14:09:55 +0200
f96e0b
Subject: [PATCH 411/482] 	New series of tests for gfxterm and gfxmenu.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                             |   4 +
f96e0b
 grub-core/Makefile.core.def           |   5 +
f96e0b
 grub-core/tests/checksums.c           | 108 ++++++++++---
f96e0b
 grub-core/tests/fake_input.c          |   2 +
f96e0b
 grub-core/tests/gfxterm_menu.c        | 113 ++++++++++++++
f96e0b
 grub-core/tests/lib/functional_test.c |   3 +-
f96e0b
 grub-core/tests/video_checksum.c      | 204 ++++++++++++++++++++++++-
f96e0b
 grub-core/tests/videotest_checksum.c  | 279 +---------------------------------
f96e0b
 include/grub/test.h                   |   5 +
f96e0b
 tests/util/grub-shell.in              |   3 +
f96e0b
 10 files changed, 426 insertions(+), 300 deletions(-)
f96e0b
 create mode 100644 grub-core/tests/gfxterm_menu.c
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index ed99c80..5fc7372 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,9 @@
f96e0b
 2013-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	New series of tests for gfxterm and gfxmenu.
f96e0b
+
f96e0b
+2013-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/gfxmenu/gfxmenu.c (grub_gfxmenu_try): Allow specifying
f96e0b
 	the theme path relative to $prefix/themes.
f96e0b
 
f96e0b
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
f96e0b
index 2fa0ea7..da7637f 100644
f96e0b
--- a/grub-core/Makefile.core.def
f96e0b
+++ b/grub-core/Makefile.core.def
f96e0b
@@ -1747,6 +1747,11 @@ module = {
f96e0b
 };
f96e0b
 
f96e0b
 module = {
f96e0b
+  name = gfxterm_menu;
f96e0b
+  common = tests/gfxterm_menu.c;
f96e0b
+};
f96e0b
+
f96e0b
+module = {
f96e0b
   name = bitmap;
f96e0b
   common = video/bitmap.c;
f96e0b
   enable = videomodules;
f96e0b
diff --git a/grub-core/tests/checksums.c b/grub-core/tests/checksums.c
f96e0b
index 583c696..c2d2f5a 100644
f96e0b
--- a/grub-core/tests/checksums.c
f96e0b
+++ b/grub-core/tests/checksums.c
f96e0b
@@ -1,30 +1,90 @@
f96e0b
+  { "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa14ad466, 0x69520db1, 0xa14ad466, 0xe82e990f, 0x59c36f00, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xa3faf149, 0xb4654ad0, 0xa3faf149, 0xff6942c6, 0xaa4593fe, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xd5e4100a, 0x39522e26, 0xd5e4100a, 0x2e0276, 0xc9cbf769, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi256 */, (grub_uint32_t []) { 0x59c36f00, 0xa14ad466, 0x69520db1, 0xa14ad466, 0xe82e990f, 0x59c36f00, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi256 */, (grub_uint32_t []) { 0xaa4593fe, 0xa3faf149, 0xb4654ad0, 0xa3faf149, 0xff6942c6, 0xaa4593fe, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi256 */, (grub_uint32_t []) { 0xc9cbf769, 0xd5e4100a, 0x39522e26, 0xd5e4100a, 0x2e0276, 0xc9cbf769, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgba5550 */, (grub_uint32_t []) { 0x5387d57f, 0x9093f849, 0xc02929e3, 0x9093f849, 0xe2f077d4, 0x5387d57f, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgba5550 */, (grub_uint32_t []) { 0xf83ee7aa, 0xbbe054f6, 0xbef13bfe, 0xbbe054f6, 0xa23fcfe0, 0xf83ee7aa, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgba5550 */, (grub_uint32_t []) { 0x724366e5, 0x8cea8db2, 0x9688dd3b, 0x8cea8db2, 0x6fe82515, 0x724366e5, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgba5650 */, (grub_uint32_t []) { 0x5387d57f, 0x25e346a1, 0xbd5eb38b, 0x25e346a1, 0x9d469431, 0x5387d57f, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgba5650 */, (grub_uint32_t []) { 0xf83ee7aa, 0x6f33e7a0, 0x5716dafe, 0x6f33e7a0, 0xbfa18d18, 0xf83ee7aa, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgba5650 */, (grub_uint32_t []) { 0x724366e5, 0xffb24323, 0x6e8fa0be, 0xffb24323, 0xad5c8fa5, 0x724366e5, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgba8880 */, (grub_uint32_t []) { 0x1c955882, 0x5a925b39, 0x36226b, 0x5a925b39, 0xafa322b7, 0x1c955882, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgba8880 */, (grub_uint32_t []) { 0x4d266f7a, 0xfb4aecf8, 0x17b91739, 0xfb4aecf8, 0xf7e3d211, 0x4d266f7a, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgba8880 */, (grub_uint32_t []) { 0x1ed9d731, 0x4015c90f, 0x430ae98c, 0x4015c90f, 0xeb61f90d, 0x1ed9d731, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4df27666, 0xb8015ce1, 0x4df27666, 0x8bef2cac, 0x9813a416, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x6d1d5058, 0xb2d8ed2c, 0x6d1d5058, 0xe8936168, 0x5fcf013d, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xeec86af1, 0x13493ea, 0xeec86af1, 0xee83739a, 0xdd28f52b, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgra5550 */, (grub_uint32_t []) { 0x5387d57f, 0x9093f849, 0xc02929e3, 0x9093f849, 0xe2f077d4, 0x5387d57f, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgra5550 */, (grub_uint32_t []) { 0xf83ee7aa, 0xbbe054f6, 0xbef13bfe, 0xbbe054f6, 0xa23fcfe0, 0xf83ee7aa, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgra5550 */, (grub_uint32_t []) { 0x724366e5, 0x8cea8db2, 0x9688dd3b, 0x8cea8db2, 0x6fe82515, 0x724366e5, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgra5650 */, (grub_uint32_t []) { 0x5387d57f, 0x25e346a1, 0xbd5eb38b, 0x25e346a1, 0x9d469431, 0x5387d57f, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgra5650 */, (grub_uint32_t []) { 0xf83ee7aa, 0x6f33e7a0, 0x5716dafe, 0x6f33e7a0, 0xbfa18d18, 0xf83ee7aa, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgra5650 */, (grub_uint32_t []) { 0x724366e5, 0xffb24323, 0x6e8fa0be, 0xffb24323, 0xad5c8fa5, 0x724366e5, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgra8880 */, (grub_uint32_t []) { 0x1c955882, 0x5a925b39, 0x36226b, 0x5a925b39, 0xafa322b7, 0x1c955882, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgra8880 */, (grub_uint32_t []) { 0x4d266f7a, 0xfb4aecf8, 0x17b91739, 0xfb4aecf8, 0xf7e3d211, 0x4d266f7a, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgra8880 */, (grub_uint32_t []) { 0x1ed9d731, 0x4015c90f, 0x430ae98c, 0x4015c90f, 0xeb61f90d, 0x1ed9d731, }, 6 },
f96e0b
+  { "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgra8888 */, (grub_uint32_t []) { 0x9813a416, 0x4df27666, 0xb8015ce1, 0x4df27666, 0x8bef2cac, 0x9813a416, }, 6 },
f96e0b
+  { "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgra8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x6d1d5058, 0xb2d8ed2c, 0x6d1d5058, 0xe8936168, 0x5fcf013d, }, 6 },
f96e0b
+  { "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgra8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xeec86af1, 0x13493ea, 0xeec86af1, 0xee83739a, 0xdd28f52b, }, 6 },
f96e0b
+  { "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x7a3f695f, 0xac449d41, 0x7a3f695f, 0x28a073b1, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2ee70aea, 0x8f5328d2, 0x2ee70aea, 0x19fb9508, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xef842e14, 0x9b7cdc00, 0xef842e14, 0x750c3145, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi256 */, (grub_uint32_t []) { 0x59c36f00, 0xcfa0e627, 0x8b7088da, 0xcfa0e627, 0xcd807142, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi256 */, (grub_uint32_t []) { 0xaa4593fe, 0x64807934, 0x85d684c9, 0x64807934, 0x61726a79, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi256 */, (grub_uint32_t []) { 0xc9cbf769, 0x9792b643, 0x1d769dd8, 0x9386dd8c, 0x9792b643, 0x3d74bd2f, }, 6 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgba5550 */, (grub_uint32_t []) { 0x5387d57f, 0xbdb8f583, 0x1e27b76, 0xbdb8f583, 0x91be6e17, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgba5550 */, (grub_uint32_t []) { 0xf83ee7aa, 0xbe72e1cb, 0x4943add3, 0xbe72e1cb, 0xa207f983, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgba5550 */, (grub_uint32_t []) { 0x724366e5, 0xbc064047, 0x9e12d9ac, 0xbc064047, 0xf9bdce43, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgba5650 */, (grub_uint32_t []) { 0x5387d57f, 0x6181ad43, 0xe570d91, 0x6181ad43, 0x567fb1cc, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgba5650 */, (grub_uint32_t []) { 0xf83ee7aa, 0x1e5b6982, 0x789f961c, 0x1e5b6982, 0xc1ad694a, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgba5650 */, (grub_uint32_t []) { 0x724366e5, 0x73f85cef, 0x9469d68d, 0x73f85cef, 0x24779078, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgba8880 */, (grub_uint32_t []) { 0x1c955882, 0xa6ddcb95, 0xa3934314, 0xa6ddcb95, 0x16ab9b6c, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgba8880 */, (grub_uint32_t []) { 0x4d266f7a, 0x18e25ecc, 0xe52f7def, 0x18e25ecc, 0x5bd10081, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgba8880 */, (grub_uint32_t []) { 0x1ed9d731, 0xa845bba2, 0xb67fe791, 0xa845bba2, 0x80452493, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xf162dfa3, 0xe0f86fe6, 0xf162dfa3, 0x51f56384, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x644b801, 0x8a201b04, 0x644b801, 0xa4508ec0, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0x1e1a41fe, 0x237e53c4, 0x1e1a41fe, 0xd5890062, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgra5550 */, (grub_uint32_t []) { 0x5387d57f, 0xa35a45c5, 0xacbc8410, 0xa35a45c5, 0xed2e11bd, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgra5550 */, (grub_uint32_t []) { 0xf83ee7aa, 0x8a6fa170, 0x7605140e, 0x8a6fa170, 0xc030feb1, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgra5550 */, (grub_uint32_t []) { 0x724366e5, 0x49ddd3e4, 0xbfaeedf9, 0x49ddd3e4, 0xcde1d4b5, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgra5650 */, (grub_uint32_t []) { 0x5387d57f, 0x98a8e7a8, 0xd9cab55f, 0x98a8e7a8, 0xf2b7dd05, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgra5650 */, (grub_uint32_t []) { 0xf83ee7aa, 0xa000334f, 0xa1b11a86, 0xa000334f, 0x8ac1b99f, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgra5650 */, (grub_uint32_t []) { 0x724366e5, 0xc662fb1, 0x673baf90, 0xc662fb1, 0xfb88406, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgra8880 */, (grub_uint32_t []) { 0x1c955882, 0x33d4530e, 0x11ff262b, 0x33d4530e, 0xbb511beb, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgra8880 */, (grub_uint32_t []) { 0x4d266f7a, 0x8b2e9364, 0x1d99d298, 0x8b2e9364, 0x958d5e8d, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgra8880 */, (grub_uint32_t []) { 0x1ed9d731, 0x6e78baae, 0xaedcda00, 0x6e78baae, 0x9399bef9, }, 5 },
f96e0b
+  { "gfxmenu", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgra8888 */, (grub_uint32_t []) { 0x1c3742c9, 0x42860f9a, 0x57da9ef, 0x42860f9a, 0x221db42c, }, 5 },
f96e0b
+  { "gfxmenu", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgra8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x2ade7eff, 0xc91e0e0c, 0x2ade7eff, 0x8ad4bad6, }, 5 },
f96e0b
+  { "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgra8888 */, (grub_uint32_t []) { 0xef4a3312, 0x4c493c2d, 0x487c542b, 0x4c493c2d, 0xfec68cd6, }, 5 },
f96e0b
   { "videotest", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x7f1853ba, 0x7f1853ba, 0x7f1853ba, 0x7f1853ba, 0x7f1853ba, }, 5 },
f96e0b
   { "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xff1957f0, 0xff1957f0, 0xff1957f0, 0xff1957f0, 0xff1957f0, }, 5 },
f96e0b
   { "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xcb45d8c5, 0xcb45d8c5, 0xcb45d8c5, 0xcb45d8c5, 0xcb45d8c5, }, 5 },
f96e0b
   { "videotest", 640, 480, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi256 */, (grub_uint32_t []) { 0x2d1b122b, 0x2d1b122b, 0x2d1b122b, 0x2d1b122b, 0x2d1b122b, }, 5 },
f96e0b
   { "videotest", 800, 600, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi256 */, (grub_uint32_t []) { 0x327d1082, 0x327d1082, 0x327d1082, 0x327d1082, 0x327d1082, }, 5 },
f96e0b
   { "videotest", 1024, 768, 0x2, 256, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi256 */, (grub_uint32_t []) { 0xadd0f186, 0xadd0f186, 0xadd0f186, 0xadd0f186, 0xadd0f186, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgb555 */, (grub_uint32_t []) { 0x2c97569c, 0x2c97569c, 0x2c97569c, 0x2c97569c, 0x2c97569c, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgb555 */, (grub_uint32_t []) { 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgb555 */, (grub_uint32_t []) { 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgb565 */, (grub_uint32_t []) { 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgb565 */, (grub_uint32_t []) { 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgb565 */, (grub_uint32_t []) { 0x66cee14c, 0x66cee14c, 0x66cee14c, 0x66cee14c, 0x66cee14c, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgb888 */, (grub_uint32_t []) { 0x61db45b7, 0x1d867efe, 0x99613325, 0xe53c086c, 0x9543de62, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgb888 */, (grub_uint32_t []) { 0xa46eb37f, 0xd2a59656, 0x49f8f92d, 0x3f33dc04, 0x7aae512a, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgb888 */, (grub_uint32_t []) { 0xb864a496, 0x6c22313b, 0x1505f93d, 0xc1436c90, 0xe74a6931, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgb888 */, (grub_uint32_t []) { 0x2b154617, 0x692e98df, 0xaf62fb87, 0xed59254f, 0x26164bc6, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgb888 */, (grub_uint32_t []) { 0x3b0fbc56, 0xd9d57c0e, 0xfb564a17, 0x198c8a4f, 0xbe502625, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgb888 */, (grub_uint32_t []) { 0x6e6c9b36, 0x4ae9f137, 0x27664f34, 0x3e32535, 0xfc793332, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgr555 */, (grub_uint32_t []) { 0x9056f776, 0x9056f776, 0x9056f776, 0x9056f776, 0x9056f776, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgr555 */, (grub_uint32_t []) { 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgr555 */, (grub_uint32_t []) { 0xb04615f3, 0xb04615f3, 0xb04615f3, 0xb04615f3, 0xb04615f3, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgr565 */, (grub_uint32_t []) { 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgr565 */, (grub_uint32_t []) { 0x84ac1329, 0x84ac1329, 0x84ac1329, 0x84ac1329, 0x84ac1329, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgr565 */, (grub_uint32_t []) { 0x145ad698, 0x145ad698, 0x145ad698, 0x145ad698, 0x145ad698, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgr888 */, (grub_uint32_t []) { 0x4af6b480, 0x923db79c, 0xfe8cc449, 0x2647c755, 0x27ee23e3, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgr888 */, (grub_uint32_t []) { 0x121d5e29, 0xf66c0aed, 0xdf138150, 0x3b62d594, 0x8dec962a, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgr888 */, (grub_uint32_t []) { 0xae86a12c, 0x4dabbe89, 0x6d30e897, 0x8e1df732, 0x2c0644ab, }, 5 },
f96e0b
-  { "videotest", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgr888 */, (grub_uint32_t []) { 0x2605d280, 0xc06e3172, 0xef3e6395, 0x9558067, 0xb19ec65b, }, 5 },
f96e0b
-  { "videotest", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgr888 */, (grub_uint32_t []) { 0x9404ef3b, 0xa4fdf18, 0xad7ef98c, 0x3335c9af, 0xe6f0c255, }, 5 },
f96e0b
-  { "videotest", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgr888 */, (grub_uint32_t []) { 0xa008b770, 0xb98eb0d8, 0x9304b820, 0x8a82bf88, 0xc610a9d0, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 640x480xrgba5550 */, (grub_uint32_t []) { 0x2c97569c, 0x2c97569c, 0x2c97569c, 0x2c97569c, 0x2c97569c, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 800x600xrgba5550 */, (grub_uint32_t []) { 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, 0x9bd7a3ac, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 15, 2, 10, 5, 5, 5, 0, 5, 0, 0 /* 1024x768xrgba5550 */, (grub_uint32_t []) { 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, 0xedbceb9c, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 640x480xrgba5650 */, (grub_uint32_t []) { 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, 0x3c2a42f1, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 800x600xrgba5650 */, (grub_uint32_t []) { 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, 0xb25ce62a, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 16, 2, 11, 5, 5, 6, 0, 5, 0, 0 /* 1024x768xrgba5650 */, (grub_uint32_t []) { 0x66cee14c, 0x66cee14c, 0x66cee14c, 0x66cee14c, 0x66cee14c, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 640x480xrgba8880 */, (grub_uint32_t []) { 0x61db45b7, 0x1d867efe, 0x99613325, 0xe53c086c, 0x9543de62, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 800x600xrgba8880 */, (grub_uint32_t []) { 0xa46eb37f, 0xd2a59656, 0x49f8f92d, 0x3f33dc04, 0x7aae512a, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 24, 3, 16, 8, 8, 8, 0, 8, 0, 0 /* 1024x768xrgba8880 */, (grub_uint32_t []) { 0xb864a496, 0x6c22313b, 0x1505f93d, 0xc1436c90, 0xe74a6931, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x2b154617, 0x692e98df, 0xaf62fb87, 0xed59254f, 0x26164bc6, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x3b0fbc56, 0xd9d57c0e, 0xfb564a17, 0x198c8a4f, 0xbe502625, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0x6e6c9b36, 0x4ae9f137, 0x27664f34, 0x3e32535, 0xfc793332, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 640x480xbgra5550 */, (grub_uint32_t []) { 0x9056f776, 0x9056f776, 0x9056f776, 0x9056f776, 0x9056f776, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 800x600xbgra5550 */, (grub_uint32_t []) { 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, 0x2bde3c67, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 15, 2, 0, 5, 5, 5, 10, 5, 0, 0 /* 1024x768xbgra5550 */, (grub_uint32_t []) { 0xb04615f3, 0xb04615f3, 0xb04615f3, 0xb04615f3, 0xb04615f3, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 640x480xbgra5650 */, (grub_uint32_t []) { 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, 0xba8df8dd, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 800x600xbgra5650 */, (grub_uint32_t []) { 0x84ac1329, 0x84ac1329, 0x84ac1329, 0x84ac1329, 0x84ac1329, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 16, 2, 0, 5, 5, 6, 11, 5, 0, 0 /* 1024x768xbgra5650 */, (grub_uint32_t []) { 0x145ad698, 0x145ad698, 0x145ad698, 0x145ad698, 0x145ad698, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 640x480xbgra8880 */, (grub_uint32_t []) { 0x4af6b480, 0x923db79c, 0xfe8cc449, 0x2647c755, 0x27ee23e3, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 800x600xbgra8880 */, (grub_uint32_t []) { 0x121d5e29, 0xf66c0aed, 0xdf138150, 0x3b62d594, 0x8dec962a, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 24, 3, 0, 8, 8, 8, 16, 8, 0, 0 /* 1024x768xbgra8880 */, (grub_uint32_t []) { 0xae86a12c, 0x4dabbe89, 0x6d30e897, 0x8e1df732, 0x2c0644ab, }, 5 },
f96e0b
+  { "videotest", 640, 480, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 640x480xbgra8888 */, (grub_uint32_t []) { 0x2605d280, 0xc06e3172, 0xef3e6395, 0x9558067, 0xb19ec65b, }, 5 },
f96e0b
+  { "videotest", 800, 600, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 800x600xbgra8888 */, (grub_uint32_t []) { 0x9404ef3b, 0xa4fdf18, 0xad7ef98c, 0x3335c9af, 0xe6f0c255, }, 5 },
f96e0b
+  { "videotest", 1024, 768, 0x1, 256, 32, 4, 0, 8, 8, 8, 16, 8, 24, 8 /* 1024x768xbgra8888 */, (grub_uint32_t []) { 0xa008b770, 0xb98eb0d8, 0x9304b820, 0x8a82bf88, 0xc610a9d0, }, 5 },
f96e0b
diff --git a/grub-core/tests/fake_input.c b/grub-core/tests/fake_input.c
f96e0b
index b514c2a..3c24e0f 100644
f96e0b
--- a/grub-core/tests/fake_input.c
f96e0b
+++ b/grub-core/tests/fake_input.c
f96e0b
@@ -55,6 +55,7 @@ grub_terminal_input_fake_sequence (int *seq_in, int nseq_in)
f96e0b
       grub_memcpy (seq, seq_in, nseq_in * sizeof (seq[0]));
f96e0b
     }
f96e0b
   nseq = nseq_in;
f96e0b
+  seqptr = 0;
f96e0b
 }
f96e0b
 
f96e0b
 void
f96e0b
@@ -64,4 +65,5 @@ grub_terminal_input_fake_sequence_end (void)
f96e0b
   grub_free (seq);
f96e0b
   seq = 0;
f96e0b
   nseq = 0;
f96e0b
+  seqptr = 0;
f96e0b
 }
f96e0b
diff --git a/grub-core/tests/gfxterm_menu.c b/grub-core/tests/gfxterm_menu.c
f96e0b
new file mode 100644
f96e0b
index 0000000..e4aae12
f96e0b
--- /dev/null
f96e0b
+++ b/grub-core/tests/gfxterm_menu.c
f96e0b
@@ -0,0 +1,113 @@
f96e0b
+/*
f96e0b
+ *  GRUB  --  GRand Unified Bootloader
f96e0b
+ *  Copyright (C) 2013 Free Software Foundation, Inc.
f96e0b
+ *
f96e0b
+ *  GRUB is free software: you can redistribute it and/or modify
f96e0b
+ *  it under the terms of the GNU General Public License as published by
f96e0b
+ *  the Free Software Foundation, either version 3 of the License, or
f96e0b
+ *  (at your option) any later version.
f96e0b
+ *
f96e0b
+ *  GRUB is distributed in the hope that it will be useful,
f96e0b
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
f96e0b
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f96e0b
+ *  GNU General Public License for more details.
f96e0b
+ *
f96e0b
+ *  You should have received a copy of the GNU General Public License
f96e0b
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
f96e0b
+ */
f96e0b
+
f96e0b
+/* All tests need to include test.h for GRUB testing framework.  */
f96e0b
+#include <grub/test.h>
f96e0b
+#include <grub/dl.h>
f96e0b
+#include <grub/video.h>
f96e0b
+#include <grub/video_fb.h>
f96e0b
+#include <grub/command.h>
f96e0b
+#include <grub/font.h>
f96e0b
+#include <grub/procfs.h>
f96e0b
+#include <grub/env.h>
f96e0b
+#include <grub/normal.h>
f96e0b
+
f96e0b
+GRUB_MOD_LICENSE ("GPLv3+");
f96e0b
+
f96e0b
+
f96e0b
+static const char testfile[] =
f96e0b
+  "terminal_output gfxterm\n"
f96e0b
+  "menuentry \"test\" {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "menuentry \"s̛ ơ t o̒ s̒ u o̕̚ 8.04 m̂ñåh̊z̆x̣ a̡ b̢g̢ u᷎ô᷎ ô᷎ O̷ a̖̣ ȃ̐\" --class ubuntu --class linux --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "menuentry \" הַרמלל(טוֹבָ) לֶךְ\" --class opensuse --class linux --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "menuentry \"الرملل جِداً لِكَ\" --class gentoo --class linux --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "menuentry \"ὑπόγυͅον\" --class kubuntu --class linux --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "menuentry \"سَّ نِّ نَّ نٌّ نّْ\" --class linuxmint --class linux --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  /* Chinese & UTF-8 test from Carbon Jiao. */
f96e0b
+  "menuentry \"从硬盘的第一主分区启动\" --class \"windows xp\" --class windows --class os {\n"
f96e0b
+  "\ttrue\n"
f96e0b
+  "}\n"
f96e0b
+  "timeout=3\n";
f96e0b
+
f96e0b
+static char *
f96e0b
+get_test_cfg (void)
f96e0b
+{
f96e0b
+  return grub_strdup (testfile);
f96e0b
+}
f96e0b
+
f96e0b
+struct grub_procfs_entry test_cfg = 
f96e0b
+{
f96e0b
+  .name = "test.cfg",
f96e0b
+  .get_contents = get_test_cfg
f96e0b
+};
f96e0b
+
f96e0b
+
f96e0b
+/* Functional test main method.  */
f96e0b
+static void
f96e0b
+gfxterm_menu (void)
f96e0b
+{
f96e0b
+  unsigned i, j;
f96e0b
+  if (grub_font_load ("unicode") == 0)
f96e0b
+    {
f96e0b
+      grub_test_assert (0, "unicode font not found: %s", grub_errmsg);
f96e0b
+      return;
f96e0b
+    }
f96e0b
+
f96e0b
+  grub_procfs_register ("test.cfg", &test_cfg);
f96e0b
+  
f96e0b
+  for (j = 0; j < 2; j++)
f96e0b
+    for (i = 0; i < ARRAY_SIZE (grub_test_video_modes); i++)
f96e0b
+      {
f96e0b
+	grub_video_capture_start (&grub_test_video_modes[i],
f96e0b
+				  grub_video_fbstd_colors,
f96e0b
+				  grub_test_video_modes[i].number_of_colors);
f96e0b
+	grub_terminal_input_fake_sequence ((int []) { -1, -1, -1, GRUB_TERM_KEY_DOWN, -1, '\e' }, 6);
f96e0b
+
f96e0b
+	grub_video_checksum (j ? "gfxmenu" : "gfxterm_menu");
f96e0b
+
f96e0b
+	grub_env_context_open ();
f96e0b
+	if (j)
f96e0b
+	  grub_env_set ("theme", "starfield/theme.txt");
f96e0b
+	grub_normal_execute ("(proc)/test.cfg", 1, 0);
f96e0b
+	grub_env_context_close ();
f96e0b
+
f96e0b
+	char *args[] = { (char *) "console", 0 };
f96e0b
+	grub_command_execute ("terminal_output", 1, args);
f96e0b
+
f96e0b
+	grub_terminal_input_fake_sequence_end ();
f96e0b
+	grub_video_checksum_end ();
f96e0b
+	grub_video_capture_end ();
f96e0b
+      }
f96e0b
+
f96e0b
+  grub_procfs_unregister (&test_cfg);
f96e0b
+}
f96e0b
+
f96e0b
+/* Register example_test method as a functional test.  */
f96e0b
+GRUB_FUNCTIONAL_TEST (gfxterm_menu, gfxterm_menu);
f96e0b
diff --git a/grub-core/tests/lib/functional_test.c b/grub-core/tests/lib/functional_test.c
f96e0b
index da4d5f8..c70e1ad 100644
f96e0b
--- a/grub-core/tests/lib/functional_test.c
f96e0b
+++ b/grub-core/tests/lib/functional_test.c
f96e0b
@@ -51,9 +51,10 @@ grub_functional_all_tests (grub_extcmd_context_t ctxt __attribute__ ((unused)),
f96e0b
 
f96e0b
   grub_dl_load ("exfctest");
f96e0b
   grub_dl_load ("videotest_checksum");
f96e0b
+  grub_dl_load ("gfxterm_menu");
f96e0b
 
f96e0b
   FOR_LIST_ELEMENTS (test, grub_test_list)
f96e0b
-    ok = ok && !grub_test_run (test);
f96e0b
+    ok = !grub_test_run (test) && ok;
f96e0b
   if (ok)
f96e0b
     grub_printf ("ALL TESTS PASSED\n");
f96e0b
   else
f96e0b
diff --git a/grub-core/tests/video_checksum.c b/grub-core/tests/video_checksum.c
f96e0b
index cf47fa2..c678059 100644
f96e0b
--- a/grub-core/tests/video_checksum.c
f96e0b
+++ b/grub-core/tests/video_checksum.c
f96e0b
@@ -31,6 +31,208 @@ static char *basename;
f96e0b
 static const grub_uint32_t *checksums;
f96e0b
 static struct grub_video_mode_info capt_mode_info;
f96e0b
 
f96e0b
+struct grub_video_mode_info grub_test_video_modes[30] = {
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024,
f96e0b
+    .mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
+    .bpp = 8,
f96e0b
+    .bytes_per_pixel = 1,
f96e0b
+    .number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 1280,
f96e0b
+    GRUB_VIDEO_MI_RGB555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 1600,
f96e0b
+    GRUB_VIDEO_MI_RGB555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 2048,
f96e0b
+    GRUB_VIDEO_MI_RGB555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 1280,
f96e0b
+    GRUB_VIDEO_MI_RGB565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 1600,
f96e0b
+    GRUB_VIDEO_MI_RGB565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 2048,
f96e0b
+    GRUB_VIDEO_MI_RGB565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640 * 3,
f96e0b
+    GRUB_VIDEO_MI_RGB888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800 * 3,
f96e0b
+    GRUB_VIDEO_MI_RGB888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024 * 3,
f96e0b
+    GRUB_VIDEO_MI_RGB888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640 * 4,
f96e0b
+    GRUB_VIDEO_MI_RGBA8888()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800 * 4,
f96e0b
+    GRUB_VIDEO_MI_RGBA8888()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024 * 4,
f96e0b
+    GRUB_VIDEO_MI_RGBA8888()
f96e0b
+  },
f96e0b
+
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 1280,
f96e0b
+    GRUB_VIDEO_MI_BGR555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 1600,
f96e0b
+    GRUB_VIDEO_MI_BGR555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 2048,
f96e0b
+    GRUB_VIDEO_MI_BGR555 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 1280,
f96e0b
+    GRUB_VIDEO_MI_BGR565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 1600,
f96e0b
+    GRUB_VIDEO_MI_BGR565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 2048,
f96e0b
+    GRUB_VIDEO_MI_BGR565 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640 * 3,
f96e0b
+    GRUB_VIDEO_MI_BGR888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800 * 3,
f96e0b
+    GRUB_VIDEO_MI_BGR888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024 * 3,
f96e0b
+    GRUB_VIDEO_MI_BGR888 ()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 640,
f96e0b
+    .height = 480,
f96e0b
+    .pitch = 640 * 4,
f96e0b
+    GRUB_VIDEO_MI_BGRA8888()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 800,
f96e0b
+    .height = 600,
f96e0b
+    .pitch = 800 * 4,
f96e0b
+    GRUB_VIDEO_MI_BGRA8888()
f96e0b
+  },
f96e0b
+  {
f96e0b
+    .width = 1024,
f96e0b
+    .height = 768,
f96e0b
+    .pitch = 1024 * 4,
f96e0b
+    GRUB_VIDEO_MI_BGRA8888()
f96e0b
+  },
f96e0b
+};
f96e0b
+
f96e0b
 #ifdef GRUB_MACHINE_EMU
f96e0b
 #include <grub/emu/misc.h>
f96e0b
 #include <sys/types.h>
f96e0b
@@ -262,7 +464,7 @@ get_modename (void)
f96e0b
   return buf;
f96e0b
 }
f96e0b
 
f96e0b
-//#define GENERATE_MODE 1
f96e0b
+#define GENERATE_MODE 1
f96e0b
 
f96e0b
 #if defined (GENERATE_MODE) && defined (GRUB_MACHINE_EMU)
f96e0b
 int genfd = -1;
f96e0b
diff --git a/grub-core/tests/videotest_checksum.c b/grub-core/tests/videotest_checksum.c
f96e0b
index 7833d04..ee7058f 100644
f96e0b
--- a/grub-core/tests/videotest_checksum.c
f96e0b
+++ b/grub-core/tests/videotest_checksum.c
f96e0b
@@ -26,292 +26,23 @@
f96e0b
 
f96e0b
 GRUB_MOD_LICENSE ("GPLv3+");
f96e0b
 
f96e0b
-struct
f96e0b
-{
f96e0b
-  struct grub_video_mode_info mode_info;
f96e0b
-} tests[] = {
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-
f96e0b
-
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024,
f96e0b
-	.mode_type = GRUB_VIDEO_MODE_TYPE_INDEX_COLOR,
f96e0b
-	.bpp = 8,
f96e0b
-	.bytes_per_pixel = 1,
f96e0b
-	.number_of_colors = GRUB_VIDEO_FBSTD_EXT_NUMCOLORS
f96e0b
-      },
f96e0b
-    },
f96e0b
-
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 1280,
f96e0b
-	GRUB_VIDEO_MI_RGB555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 1600,
f96e0b
-	GRUB_VIDEO_MI_RGB555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 2048,
f96e0b
-	GRUB_VIDEO_MI_RGB555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 1280,
f96e0b
-	GRUB_VIDEO_MI_RGB565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 1600,
f96e0b
-	GRUB_VIDEO_MI_RGB565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 2048,
f96e0b
-	GRUB_VIDEO_MI_RGB565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640 * 3,
f96e0b
-	GRUB_VIDEO_MI_RGB888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800 * 3,
f96e0b
-	GRUB_VIDEO_MI_RGB888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024 * 3,
f96e0b
-	GRUB_VIDEO_MI_RGB888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640 * 4,
f96e0b
-	GRUB_VIDEO_MI_RGBA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800 * 4,
f96e0b
-	GRUB_VIDEO_MI_RGBA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024 * 4,
f96e0b
-	GRUB_VIDEO_MI_RGBA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 1280,
f96e0b
-	GRUB_VIDEO_MI_BGR555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 1600,
f96e0b
-	GRUB_VIDEO_MI_BGR555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 2048,
f96e0b
-	GRUB_VIDEO_MI_BGR555 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 1280,
f96e0b
-	GRUB_VIDEO_MI_BGR565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 1600,
f96e0b
-	GRUB_VIDEO_MI_BGR565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 2048,
f96e0b
-	GRUB_VIDEO_MI_BGR565 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640 * 3,
f96e0b
-	GRUB_VIDEO_MI_BGR888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800 * 3,
f96e0b
-	GRUB_VIDEO_MI_BGR888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024 * 3,
f96e0b
-	GRUB_VIDEO_MI_BGR888 ()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 640,
f96e0b
-	.height = 480,
f96e0b
-	.pitch = 640 * 4,
f96e0b
-	GRUB_VIDEO_MI_BGRA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 800,
f96e0b
-	.height = 600,
f96e0b
-	.pitch = 800 * 4,
f96e0b
-	GRUB_VIDEO_MI_BGRA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-    {
f96e0b
-      .mode_info = {
f96e0b
-	.width = 1024,
f96e0b
-	.height = 768,
f96e0b
-	.pitch = 1024 * 4,
f96e0b
-	GRUB_VIDEO_MI_BGRA8888()
f96e0b
-      },
f96e0b
-    },
f96e0b
-
f96e0b
-  };
f96e0b
-      
f96e0b
-
f96e0b
 /* Functional test main method.  */
f96e0b
 static void
f96e0b
 videotest_checksum (void)
f96e0b
 {
f96e0b
   unsigned i;
f96e0b
+
f96e0b
   if (grub_font_load ("unicode") == 0)
f96e0b
     {
f96e0b
       grub_test_assert (0, "unicode font not found: %s", grub_errmsg);
f96e0b
       return;
f96e0b
     }
f96e0b
-  
f96e0b
-  for (i = 0; i < ARRAY_SIZE (tests); i++)
f96e0b
+
f96e0b
+  for (i = 0; i < ARRAY_SIZE (grub_test_video_modes); i++)
f96e0b
     {
f96e0b
-      grub_video_capture_start (&tests[i].mode_info,
f96e0b
+      grub_video_capture_start (&grub_test_video_modes[i],
f96e0b
 				grub_video_fbstd_colors,
f96e0b
-				tests[i].mode_info.number_of_colors);
f96e0b
+				grub_test_video_modes[i].number_of_colors);
f96e0b
       grub_terminal_input_fake_sequence ((int []) { '\n' }, 1);
f96e0b
 
f96e0b
       grub_video_checksum ("videotest");
f96e0b
diff --git a/include/grub/test.h b/include/grub/test.h
f96e0b
index 6aa4069..946a81b 100644
f96e0b
--- a/include/grub/test.h
f96e0b
+++ b/include/grub/test.h
f96e0b
@@ -25,6 +25,9 @@
f96e0b
 #include <grub/types.h>
f96e0b
 #include <grub/symbol.h>
f96e0b
 
f96e0b
+#include <grub/video.h>
f96e0b
+#include <grub/video_fb.h>
f96e0b
+
f96e0b
 struct grub_test
f96e0b
 {
f96e0b
   /* The next test.  */
f96e0b
@@ -99,4 +102,6 @@ grub_terminal_input_fake_sequence (int *seq_in, int nseq_in);
f96e0b
 void
f96e0b
 grub_terminal_input_fake_sequence_end (void);
f96e0b
 
f96e0b
+extern struct grub_video_mode_info grub_test_video_modes[30];
f96e0b
+
f96e0b
 #endif /* ! GRUB_TEST_HEADER */
f96e0b
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
f96e0b
index dfde836..dee3962 100644
f96e0b
--- a/tests/util/grub-shell.in
f96e0b
+++ b/tests/util/grub-shell.in
f96e0b
@@ -22,6 +22,7 @@ prefix="@prefix@"
f96e0b
 exec_prefix="@exec_prefix@"
f96e0b
 datarootdir="@datarootdir@"
f96e0b
 builddir="@builddir@"
f96e0b
+srcdir="@srcdir@"
f96e0b
 PACKAGE_NAME=@PACKAGE_NAME@
f96e0b
 PACKAGE_TARNAME=@PACKAGE_TARNAME@
f96e0b
 PACKAGE_VERSION=@PACKAGE_VERSION@
f96e0b
@@ -409,7 +410,9 @@ if [ x$boot = xnet ]; then
f96e0b
 elif [ x$boot = xemu ]; then
f96e0b
     grubdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")"
f96e0b
     mkdir -p "$grubdir/fonts"
f96e0b
+    mkdir -p "$grubdir/themes"
f96e0b
     cp "@builddir@/"unicode.pf2 "$grubdir/fonts/unicode.pf2"
f96e0b
+    cp -R "@srcdir@/themes/starfield" "$grubdir/themes/starfield"
f96e0b
     cp "${cfgfile}" "$grubdir/grub.cfg"
f96e0b
     cp "${source}" "$grubdir/testcase.cfg"
f96e0b
     @builddir@/grub-core/grub-emu -m "$device_map" -d "$grubdir" | tr -d "\r" | do_trim
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b