make check: grub-mkrescue fails missing unicode.pf2. Leftovers in /tmp
Hi,
i encountered some stumblestones after running "make check":
-------------------------------------------------------------------------
I see in file ./test-suite.log :
FAIL: grub_func_test
====================
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
...
xorriso : FAILURE : Cannot determine attributes of source file '[...]/unicode.pf2' : No such file or directory
...
./grub-mkrescue: error: xorriso invocation failed
.
FAIL grub_func_test (exit status: 1)
Instead of "[...]/" before "unicode.pf2" the log shows the absolute path of the local git repository of GRUB.
I do not see a file unicode.pf2 anywhere in the repo tree after "make".
I ran "make check" as ordinary user. But it would be strange if the existence of that file depends on superuser powers.
-------------------------------------------------------------------------
The /tmp directory is full of "grub" directories, like:
drwx------ 2 thomas thomas 4096 Feb 10 09:54 grub-shell.0DW38c5CQP
They are mostly empty, except a few with sub-directory "netdir":
/tmp/grub-shell.OS3deKSNYs:
total 4
drwxr-xr-x 3 thomas thomas 4096 Feb 10 10:25 netdir
and some with more content:
/tmp/grub-shell.wi7ZdDgpLf:
total 12
-rw-r--r-- 1 thomas thomas 347 Feb 10 10:25 grub.cfg drwxr-xr-x 2 thomas thomas 4096 Feb 10 10:25 rom_directory
-rw-r--r-- 1 thomas thomas 20 Feb 10 10:25 testcase.cfg
The timestamps of a group of data files in /tmp suggests that they stem from the "make check: run, too:
-rw-r--r-- 1 thomas thomas 17408 Feb 10 10:13 tmp.2XL4eFJ59j
(No .iso files are to see. I looked into /tmp after realizing that those would not appear in the repo but in /tmp.)
-------------------------------------------------------------------------
And a noob question:
Is there a way to only run the iso9660_test with all surrounding code of "make check" being in effect ?
(I looked into Makefile but got stuck when looking for the entrails of target "check-recursive".)
Have a nice day :)
Thomas
Look at the end of configure message. Is free type enabled? Was unifont found?
Quoted 73 lines · Thomas Schmitt
Hi,
i encountered some stumblestones after running "make check":
-------------------------------------------------------------------------
I see in file ./test-suite.log :FAIL:
grub_func_test
====================xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
...
xorriso : FAILURE : Cannot determine attributes of source file
'[...]/unicode.pf2' : No such file or directory
...
./grub-mkrescue: error:xorrisoinvocation failed
.
FAILgrub_func_test(exit status: 1)Instead of "[...]/" before "unicode.pf2" the log shows the absolute path of the local git repository of GRUB.
I do not see a file unicode.pf2 anywhere in the repo tree after "make".I ran "make check" as ordinary user. But it would be strange if the existence of that file depends on superuser powers.
-------------------------------------------------------------------------
The /tmp directory is full of "grub" directories, like:drwx------ 2 thomas thomas 4096 Feb 10 09:54 grub-shell.0DW38c5CQP
They are mostly empty, except a few with sub-directory "netdir":
/tmp/grub-shell.OS3deKSNYs:
total 4
drwxr-xr-x 3 thomas thomas 4096 Feb 10 10:25 netdirand some with more content:
/tmp/grub-shell.wi7ZdDgpLf:
total 12
-rw-r--r-- 1 thomas thomas 347 Feb 10 10:25 grub.cfg drwxr-xr-x 2 thomas thomas 4096 Feb 10 10:25rom_directory
-rw-r--r-- 1 thomas thomas 20 Feb 10 10:25 testcase.cfgThe timestamps of a group of data files in /tmp suggests that they stem from the "make check: run, too:
-rw-r--r-- 1 thomas thomas 17408 Feb 10 10:13 tmp.2XL4eFJ59j
(No .iso files are to see. I looked into /tmp after realizing that those would not appear in the repo but in /tmp.)
-------------------------------------------------------------------------
And a noob question:Is there a way to only run the
iso9660_testwith all surrounding code of "make check" being in effect ?
(I looked intoMakefilebut got stuck when looking for the entrails of target "check-recursive".)Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Hi,
Quoted 2 lines · Vladimir Serbinenko
Look at the end of configure message. Is free type enabled? Was unifont found?
--------------------------------------------------------------------
$ ./configure ... checking whether -Wtrampolines work... yes checking for freetype2... yes checking ft2build.h usability... yes checking ft2build.h presence... yes checking for ft2build.h... yes checking whether byte ordering is bigendian... no checking for freetype2... yes checking ft2build.h usability... yes checking ft2build.h presence... yes checking for ft2build.h... yes checking for fuse3... no ... ******************************************************* GRUB2 will be compiled with following components: Platform: i386-pc With devmapper support: No (need libdevmapper header) With memory debugging: No With disk cache statistics: No With boot time statistics: No efiemu runtime: Yes grub-mkfont: Yes grub-mount: No (need fuse or fuse3 libraries) starfield theme: No (No DejaVu found) With libzfs support: No (need zfs library) Build-time grub-mkfont: No (no fonts) Without unifont (no build-time grub-mkfont) With liblzma from -llzma (support for XZ-compressed mips images) With stack smashing protector: No ******************************************************* --------------------------------------------------------------------
So i would say "freetype2" yes, "unifont" no.
(The system is Debian 11 amd64.)
The test log says:
FAIL grub_func_test (exit status: 1)
In ./grub_func_test i see
# Increase memory as some of tests are high-resolution and need a lot of memory. out=`echo all_functional_test | ./grub-shell --timeout=3600 --files="/boot/grub/fonts/unicode.pf2"="./"unicode.pf2 --qemu-opts="-m $mem"`
I believe to see the grub-mkrescue invocation in tests/util/grub-shell.in
exec_show_error "${builddir}/grub-mkrescue" "--output=${isofile}" \
"--override-directory=${builddir}/grub-core" \
--rom-directory="${rom_directory}" \
--locale-directory="${srcdir}/po" \
--themes-directory="${srcdir}/themes" \
$mkimage_extra_arg ${mkrescue_args} \
"/boot/grub/grub.cfg=${cfgfile}" "/boot/grub/testcase.cfg=${source}" \
${files} || exit $?As proof i added a pathspec with an existing filename before ${files}:
- ${files} || exit $?
+ /x=/home/thomas/x ${files} || exit $?
This file path then appears in the test failure message:
Added to ISO image: file '/x'='/home/thomas/x'
xorriso : FAILURE : Cannot determine attributes of source file '/home/thomas/projekte/grub_dir/grub/unicode.pf2' : No such file or directory
So i am sure that the xorriso run in grub-shell.in is the one which fails and that the bad filename comes from ${files}.
I suspect that ${files} comes from the "--files=" argument that is given to ./grub-shell by tests/util/grub-shell.in.
Have a nice day :)
Thomas
Hi,
i have to correct a confused statement of mine:
Quoted 2 lines
I suspect that ${files} comes from the "--files=" argument that is given to ./grub-shell by tests/util/grub-shell.in.
The "--files=" argument is given by tests/grub_func_test.in.
Meanwhile i verified that this argument is the origin of the wish for file unicode.pf2 by changing it from
--files="/boot/grub/fonts/unicode.pf2"="@builddir@/"unicode.pf2
to
--files="/x=/home/thomas/x /boot/grub/fonts/unicode.pf2"="@builddir@/"unicode.pf2
This yields again the name of my existing /home/thomas/x before the xorriso error message about unicode.pf2:
Added to ISO image: file '/x'='/home/thomas/x'
xorriso : FAILURE : Cannot determine attributes of source file '/home/thomas/projekte/grub_dir/grub/unicode.pf2' : No such file or directory
Have a nice day :)
Thomas
Quoted 40 lines · On Mon, 13 Feb 2023 09:53:20 +0100 "Thomas Schmitt" <[email protected]> wrote:
Hi,
Quoted 2 lines · Vladimir Serbinenko
Look at the end of configure message. Is free type enabled? Was unifont found?
--------------------------------------------------------------------
$ ./configure ... checking whether -Wtrampolines work... yes checking for freetype2... yes checking ft2build.h usability... yes checking ft2build.h presence... yes checking for ft2build.h... yes checking whether byte ordering is bigendian... no checking for freetype2... yes checking ft2build.h usability... yes checking ft2build.h presence... yes checking for ft2build.h... yes checking for fuse3... no ... ******************************************************* GRUB2 will be compiled with following components: Platform: i386-pc With devmapper support: No (need libdevmapper header) With memory debugging: No With disk cache statistics: No With boot time statistics: No efiemu runtime: Yes grub-mkfont: Yes grub-mount: No (need fuse or fuse3 libraries) starfield theme: No (No DejaVu found) With libzfs support: No (need zfs library) Build-time grub-mkfont: No (no fonts) Without unifont (no build-time grub-mkfont) With liblzma from -llzma (support for XZ-compressed mips images) With stack smashing protector: No ******************************************************* --------------------------------------------------------------------
Quoted 1 line
So i would say "freetype2" yes, "unifont" no.
You have the package xfonts-unifont installed correct? You also don't have the djvu fonts, but I don't think that's affecting this issue.
If you do have the unifonts installed, you may need to run configure with shell tracing on to see whats really going on. You can do this like:
sh -x ./configure
If you don't see where the issue is, xz the output and send it here.
Quoted 1 line
(The system is Debian 11 amd64.)
This is the recommended OS for running the test suite.
Quoted 8 lines
The test log says:
FAILgrub_func_test(exit status: 1)
In ./grub_func_test i see# Increase memory as some of tests are high-resolution and need a
lot of memory. out=echo all_functional_test | ./grub-shell --timeout=3600 --files="/boot/grub/fonts/unicode.pf2"="./"unicode.pf2 --qemu-opts="-m $mem"
IIRC, grub-mkfont creates unicode.pf2 and puts it in the root of the build directory. Since grub-mkfont is not being built, this generated file will not be created.
Glenn
Quoted 40 lines
I believe to see the grub-mkrescue invocation in
tests/util/grub-shell.inexec_show_error "${builddir}/grub-mkrescue" "--output=${isofile}" \ "--override-directory=${builddir}/grub-core" \ --rom-directory="${rom_directory}" \ --locale-directory="${srcdir}/po" \ --themes-directory="${srcdir}/themes" \ $mkimage_extra_arg ${mkrescue_args} \ "/boot/grub/grub.cfg=${cfgfile}""/boot/grub/testcase.cfg=${source}" \ ${files} || exit $?
As proof i added a pathspec with an existing filename before ${files}:
(quoted diff) +1
-1- ${files} || exit $? + /x=/home/thomas/x ${files} || exit $?This file path then appears in the test failure message:
Added to ISO image: file '/x'='/home/thomas/x'
xorriso : FAILURE : Cannot determine attributes of source file
'/home/thomas/projekte/grub_dir/grub/unicode.pf2' : No such file or directorySo i am sure that the xorriso run in grub-shell.in is the one which fails and that the bad filename comes from ${files}.
I suspect that ${files} comes from the "--files=" argument that is given to ./grub-shell by tests/util/grub-shell.in.Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Hi,
Quoted 1 line · Glenn Washburn
You have the package xfonts-unifont installed correct?
Urm, no. (I have no desktop running. Just fvwm.) Is the need for this package documented somewhere ?
Well, now it is installed. I do
$ ./configure ... GRUB2 will be compiled with following components: ... With unifont from /usr/share/fonts/X11/misc/unifont.pcf.gz ... $ make ... $ make check
The complaints about the xorriso run do not appear any more.
Now grub_func_test fails with other log messages:
qemu-system-i386: -fw_cfg name=etc/sercon-port,string=0: warning: externally provided fw_cfg item names should be prefixed with "opt/" Functional test failure: shift_test:
shift_test: PASS
...
cmdline_cat_test:
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum cmdline_cat_2560x1440xrgba8888:44 failed: 0x62031fea vs 0x8071678a ... about 300 lines of this kind ...
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum cmdline_cat_640x480xi16:1 failed: 0x46514dfc vs 0xc69be699
cmdline_cat_test: FAIL
...
gfxterm_menu:
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum gfxterm_high_2560x1440xrgba8888:18 failed: 0xc4dbc501 vs 0xfc345163 ... about 1400 lines ...
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum gfxterm_menu_640x480xi16:1 failed: 0x3bc388a0 vs 0xd9f04953
gfxterm_menu: FAIL
... more passed tests ...
TEST FAILURE
FAIL grub_func_test (exit status: 1)
Those messages are outside my range of knowledge. If i shall try to tackle them, i'd need exact instructions.
Have a nice day :)
Thomas
Quoted 7 lines · On Tue, 14 Feb 2023 10:10:02 +0100 "Thomas Schmitt" <[email protected]> wrote:
Hi,
Quoted 1 line · Glenn Washburn
You have the package xfonts-unifont installed correct?
Urm, no. (I have no desktop running. Just fvwm.) Is the need for this package documented somewhere ?
IIRC, xfonts-unifont is pulled in by the unifont package on Debian, but it is the one with the files you need. No, its not documented, but then not every single debian package name needed is documented because the documentation is partially distribution agnostic. If it were documented it would be in ./INSTALL, which does talk about needing unifonts. If you'd like to modify that file to help other Debian users, I'm supportive.
Quoted 37 lines
Well, now it is installed. I do
$ ./configure ... GRUB2 will be compiled with following components: ... With unifont from /usr/share/fonts/X11/misc/unifont.pcf.gz ... $ make ... $ make checkThe complaints about the xorriso run do not appear any more.
Now
grub_func_testfails with other log messages:qemu-system-i386: -fw_cfg name=etc/sercon-port,string=0: warning:
externally providedfw_cfgitem names should be prefixed with "opt/" Functional test failure:shift_test:shift_test: PASS
...
cmdline_cat_test:
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum
cmdline_cat_2560x1440xrgba8888:44 failed:0x62031feavs0x8071678a... about 300 lines of this kind ... tests/video_checksum.c:checksum:615: assert failed: 0 Checksum cmdline_cat_640x480xi16:1 failed:0x46514dfcvs0xc69be699cmdline_cat_test: FAIL ...gfxterm_menu:
tests/video_checksum.c:checksum:615: assert failed: 0 Checksum
gfxterm_high_2560x1440xrgba8888:18 failed:0xc4dbc501vs0xfc345163... about 1400 lines ... tests/video_checksum.c:checksum:615: assert
failed: 0 Checksum gfxterm_menu_640x480xi16:1 failed:0x3bc388a0vs0xd9f04953gfxterm_menu: FAIL ... more passed tests ...
TEST FAILURE
FAILgrub_func_test(exit status: 1)
Quoted 2 lines
Those messages are outside my range of knowledge. If i shall try to tackle them, i'd need exact instructions.
These are very old, well known, and expected failures. I would love for someone to fix them, but there's little interest. Daniel Axten looked into fixing them a couple years ago, but looks like a pain[1]. I think we should either only checksum the part of the image that doesn't contain the version number, or generate the checksums in grub-core/tests/checksums.h at build time.
Glenn
[1] https://lists.gnu.org/archive/html/grub-devel/2020-08/msg00018.html
Hi,
Quoted 7 lines · Glenn Washburn
IIRC, xfonts-unifont is pulled in by the unifont package on Debian, but it is the one with the files you need. No, its not documented, but then not every single debian package name needed is documented because the documentation is partially distribution agnostic. If it were documented it would be in ./INSTALL, which does talk about needing unifonts. If you'd like to modify that file to help other Debian users, I'm supportive.
Unicode is mentioned two times in INSTALL.
Once for building "GRUB's graphical terminal (gfxterm)", once as "Platform-agnostic tools and data".
There is also a section "Debian named packages required mostly for the full suite of filesystem testing" which could host the name of the needed package. Although it is not about filesystems the mentioning could be justified by the word "mostly" in the headline.
Or it could be mentioned as own point one level higher under "Prerequisites for make-check".
But actually the lack of unifont did not hamper building GRUB from git. So i would expect that this tolerance is somewhat reflected by the tests.
How about putting in tests/grub_func_test.in a test for the existence of /boot/grub/fonts/unicode.pf2 with an informative error message if it is missing ?
Since we know that xorriso under grub-mkrescue will cause early failure if the file is missing, there is no use in running grub-shell with the demand for unicode.pf2.
I see that grub_func_test.in already has provisions to declare "Functional test failure". Maybe the new code path could join that. Or it could be declared as skipped. (I still have to find out how to cause a SKIP message in the test log.)
Have a nice day :)
Thomas
Hi,
another confused statement of mine:
Quoted 1 line
Unicode is mentioned two times in INSTALL.
I meant "Unifont" and "unifont".
Have a nice day :)
Thomas
Quoted 15 lines · On Wed, 15 Feb 2023 09:51:18 +0100 "Thomas Schmitt" <[email protected]> wrote:
Hi,
Quoted 7 lines · Glenn Washburn
IIRC, xfonts-unifont is pulled in by the unifont package on Debian, but it is the one with the files you need. No, its not documented, but then not every single debian package name needed is documented because the documentation is partially distribution agnostic. If it were documented it would be in ./INSTALL, which does talk about needing unifonts. If you'd like to modify that file to help other Debian users, I'm supportive.
Unicode is mentioned two times in INSTALL.
Once for building "GRUB's graphical terminal (gfxterm)", once as "Platform-agnostic tools and data".
Quoted 6 lines
There is also a section "Debian named packages required mostly for the full suite of filesystem testing" which could host the name of the needed package. Although it is not about filesystems the mentioning could be justified by the word "mostly" in the headline.
Or it could be mentioned as own point one level higher under "Prerequisites for make-check".
Yes, this makes sense.
Quoted 10 lines
But actually the lack of unifont did not hamper building GRUB from git. So i would expect that this tolerance is somewhat reflected by the tests.
How about putting in tests/grub_func_test.in a test for the existence of
/boot/grub/fonts/unicode.pf2with an informative error message if it is missing ?
Since we know that xorriso under grub-mkrescue will cause early failure if the file is missing, there is no use in running grub-shell with the demand for unicode.pf2.
Yes, I like this. And in your case you got a test failure, when you should get a test error, which indicates that the test could not actually be run and so was not a true failure.
Quoted 4 lines
I see that grub_func_test.in already has provisions to declare "Functional test failure". Maybe the new code path could join that. Or it could be declared as skipped. (I still have to find out how to cause a SKIP message in the test log.)
A SKIP is caused by exiting with code 77. However, that's not what should be done in this case.
I'll send a patch for this soon based on these suggestions.
Glenn
Quoted 46 lines · On Fri, 10 Feb 2023 12:10:39 +0100 "Thomas Schmitt" <[email protected]> wrote:
Hi,
i encountered some stumblestones after running "make check":
-------------------------------------------------------------------------
I see in file ./test-suite.log :FAIL:
grub_func_test
====================xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
...
xorriso : FAILURE : Cannot determine attributes of source file
'[...]/unicode.pf2' : No such file or directory ...
./grub-mkrescue: error:xorrisoinvocation failed
.
FAILgrub_func_test(exit status: 1)Instead of "[...]/" before "unicode.pf2" the log shows the absolute path of the local git repository of GRUB.
I do not see a file unicode.pf2 anywhere in the repo tree after "make".I ran "make check" as ordinary user. But it would be strange if the existence of that file depends on superuser powers.
-------------------------------------------------------------------------
The /tmp directory is full of "grub" directories, like:drwx------ 2 thomas thomas 4096 Feb 10 09:54
grub-shell.0DW38c5CQPThey are mostly empty, except a few with sub-directory "netdir":
/tmp/grub-shell.OS3deKSNYs:
total 4
drwxr-xr-x 3 thomas thomas 4096 Feb 10 10:25 netdirand some with more content:
/tmp/grub-shell.wi7ZdDgpLf:
total 12
-rw-r--r-- 1 thomas thomas 347 Feb 10 10:25 grub.cfg drwxr-xr-x 2 thomas thomas 4096 Feb 10 10:25rom_directory
-rw-r--r-- 1 thomas thomas 20 Feb 10 10:25 testcase.cfg
Quoted 4 lines
The timestamps of a group of data files in /tmp suggests that they stem from the "make check: run, too:
-rw-r--r-- 1 thomas thomas 17408 Feb 10 10:13 tmp.2XL4eFJ59j
Yes, I think these are made by some of the test scripts. I think these should be better named (like "grub-tmp.TEST_NAME.XXXXXXX").
Quoted 4 lines
(No .iso files are to see. I looked into /tmp after realizing that those would not appear in the repo but in /tmp.)
You can change the tmp used via the TMPDIR envvar. It would be nice for the grub-shell script to cleanup these empty grub-shell.* temporary directories. Although there are reasons not to cleanup them up, like for debug purposes or not test error.
Glenn
-------------------------------------------------------------------------
Quoted 17 lines
And a noob question:
Is there a way to only run the
iso9660_testwith all surrounding code of "make check" being in effect ?
(I looked intoMakefilebut got stuck when looking for the entrails of target "check-recursive".)Have a nice day :)
Thomas
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel