Re: [PATCH 0/4] Various test fixes proposed by Thomas Schmitt

2024-10-05 Thread Thomas Schmitt via Grub-devel
Hi, Glenn Washburn wrote: > > > if [ -z "$debug" ] && [ "$RET" -eq "$xfail" ]; then I wrote: > > If indeed in a successful --xfail test RET must have the value of "$xfail" > > (i guess 1), then it is concise and sufficient. > [...] the only acceptable xfail case is for RET=1. If > RET is greate

Re: [PATCH 0/4] Various test fixes proposed by Thomas Schmitt

2024-10-02 Thread Thomas Schmitt via Grub-devel
Hi, i wrote: > > Assuming variable "xfail" is be set to a non-empty string exactly if > > argument "--xfail" is given, i'd replace: > > > > if [ -z "$debug" ] && [ "${RET:-1}" -eq 0 ]; then > > rm -rf "$lukstestdir" || : > > fi Glenn Washburn wrote: > RET should never be undefined

Re: [PATCH 0/4] Various test fixes proposed by Thomas Schmitt

2024-09-27 Thread Thomas Schmitt via Grub-devel
Hi, Glenn Washburn wrote: > [...] grub-shell-luks-tester cleans up after > itself, if it returns success. grub_cmd_cryptomount has a test that > expects failure. But grub-shell-luks-tester doesn't know that this is > an expected failure and should cleanup and grub_cmd_cryptomount doesn't > ever cl

Re: [PATCH 0/4] Various test fixes proposed by Thomas Schmitt

2024-09-26 Thread Thomas Schmitt via Grub-devel
Hi, i wrote: > > I meanwhile forgot why i proposed > > > +unset TMPDIR > > but there was some theoretical reason for this ... Glenn Washburn wrote: > My guess was that you wanted to unexport TMPDIR. Yes. The reason was that i wanted to limit the effect of exporting to the run of grub-shell-l

Re: [PATCH 1/4] tests/util/grub-shell-luks-tester: Add missing line to create RET variable in cleanup

2024-09-24 Thread Thomas Schmitt via Grub-devel
Hi, please ignore my proposal about "set -e". My assessment of "set -e" in tests/util/grub-shell-luks-tester.in is obviously wrong, probably because "set -e" is not inherited by sub-shells. The line #! @BUILD_SHEBANG@ -e enables script abort on command error, but causes reply errexit

Re: [PATCH 1/4] tests/util/grub-shell-luks-tester: Add missing line to create RET variable in cleanup

2024-09-23 Thread Thomas Schmitt via Grub-devel
Hi, (adding Vladimir Serbinenko to Cc) Glenn Washburn wrote: > --- a/tests/util/grub-shell-luks-tester.in > +++ b/tests/util/grub-shell-luks-tester.in > @@ -143,6 +143,7 @@ fi > > # Make sure that the dm-crypto device is shutdown > cleanup() { > +RET=$? > if [ -e "$luksdev" ]; then >

Re: [PATCH 0/4] Various test fixes proposed by Thomas Schmitt

2024-09-23 Thread Thomas Schmitt via Grub-devel
Hi, The patches apply without complaints by "git am". But when i run (again as superuser, shudder): make check TESTS=grub_cmd_cryptomount i still get in /tmp the empty direcories /tmp/17*.LUKS2_*. Minor nitpick: > [PATCH 2/4] tests: Cleaup the cryptsetup script in grub_cmd_cryptomount > un

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-07 Thread Thomas Schmitt via Grub-devel
Hi, Pascal Hambourg wrote: > When > booting from a EFI partition on a regular disk, then $root is set to the > EFI partition (hdX,Y). When booting from a EFI El Torito image on a CD, > then $root is set to the whole CD (cdX), and the El Torito image is not > visible. That's a surprise to me. I w

Re: [PATCH] Change "efi" to "EFI" in grub-mkrescue for secure boot

2024-09-06 Thread Thomas Schmitt via Grub-devel
Hi, Askar Safin wrote: > I CC Thomas Schmitt, because my work seems to be related to xorriso. I checked that grub-mkrescue variables efidir_efi and efidir_efi_boot are not leading to arguments of the xorriso run. Insofar this change is transparent from the view of xorriso. I can confirm that ma

Re: [PATCH] tests: Let grub_cmd_cryptomount by default operate in /tmp rather than in /

2024-08-18 Thread Thomas Schmitt via Grub-devel
Hi, i post this as base of discussion, not yet as sincere patch proposal. It seems desirable to bundle the temporary data of each particular test in tests/grub_cmd_cryptomount.in in a single directory, as it seems intended by the code but currently is not achieved. So i propose to default TMPDIR

Re: [PATCH] tests: Let grub_cmd_cryptomount by default operate in /tmp rather than in /

2024-08-18 Thread Thomas Schmitt via Grub-devel
Hi, the submission of v2 is hampered by the fact that the artful composition of TMPDIR in tests/grub_cmd_cryptomount.in does not influence the worker tests/util/grub-shell-luks-tester.in because TMPDIR is not exported. So grub-shell-luks-tester creates its workdirectory directly in /tmp rather th

Re: [PATCH] tests: Let grub_cmd_cryptomount by default operate in /tmp rather than in /

2024-08-13 Thread Thomas Schmitt via Grub-devel
Hi, thinking more i believe that the currently used mkdir option -p is inappropriate in tests/grub_cmd_cryptomount.in . It hampers proper cleanup because the script cannot know how many directories in the path to TMPDIR were created and need to be removed. It is unusual because about all other t

Re: [PATCH] tests: Let grub_cmd_cryptomount by default operate in /tmp rather than in /

2024-08-13 Thread Thomas Schmitt via Grub-devel
Hi, i wrote: > > Further delete each created directory as soon as the command of its > > test case is finished. > > [...] > > mkdir -p "$TMPDIR" > > > > output=`"$@" 2>&1` || res=$? > > + > > +rmdir "$TMPDIR" Daniel Kiper wrote: > s/rmdir/rm -rf/? This is equivalent to the question

Re: make check as superuser leaves empty directories in /-directory

2024-07-24 Thread Thomas Schmitt via Grub-devel
Hi, with the freshly submitted patch applied, i see as superuser: # make check TESTS=grub_cmd_cryptomount ... PASS: grub_cmd_cryptomount ... # echo $? 0 # No new directories appeared in the root directory. During the "make check" run i could spot single files /tmp/*LUKS* which did

[PATCH] tests: Let grub_cmd_cryptomount by default operate in /tmp rather than in /

2024-07-24 Thread Thomas Schmitt via Grub-devel
If not TMPDIR is set by the user then the test grub_cmd_cryptomount creates about 20 directories named *LUKS*_test* in the root directory and leaves them there when the test ends. Initialize in the test script the variable TMPDIR to /tmp if it is not set or if it set to empty text. To be consisten

Re: make check as superuser leaves empty directories in /-directory

2024-07-24 Thread Thomas Schmitt via Grub-devel
Hi, i believe to have found out what's wrong with TMPDIR in tests/grub_cmd_cryptomount.in It does not get assigned a default value and is used without such a value. Many other tests have the following gesture before using $TMPDIR: : "${TMPDIR=/tmp}" But grub_cmd_cryptomount.in has not and u

make check as superuser leaves empty directories in /-directory

2024-07-24 Thread Thomas Schmitt via Grub-devel
Hi, i find in the root directory of my system a lot of empty directories like /1678114331.LUKS1_test_with_twofish_cipher /1678114333.LUKS1_test_key_file_support I believe they come from tests/grub_cmd_cryptomount.in where i read eval testcase "'LUKS1 test with twofish cipher:'" \ @bu

Re: [PATCH] fs/iso9660.c: Correct error message for missing UUID

2024-07-01 Thread Thomas Schmitt via Grub-devel
Hi, sorry for goofing up "git send-email" again. This time not by omitting the empty line after the subject of a cover letter but probably by leaving the commit id of the previous "git format-patch" in the "git send-email" command line. git send-email --to=grub-devel@gnu.org $directory $surplus

[PATCH] fs/iso9660.c: Correct error message for missing UUID

2024-07-01 Thread Thomas Schmitt via Grub-devel
The UUID emitted by function grub_iso9660_uuid is derived from the ISO 9660 Primary Volume Descriptor field "Volume Modification Date and Time". But the error message about possible invalid content of this field talks of "creation date" rather than of "modification date". Signed-off-by: Thomas Sch

[PATCH] fs/iso9660.c: Correct error message for missing UUID

2024-07-01 Thread Thomas Schmitt via Grub-devel
The UUID emitted by function grub_iso9660_uuid is derived from the ISO 9660 Primary Volume Descriptor field "Volume Modification Date and Time". But the error message about possible invalid content of this field talks of "creation date" rather than of "modification date". Signed-off-by: Thomas Sch

Re: How to test grub_iso9660_uuid from userland ?

2024-07-01 Thread Thomas Schmitt via Grub-devel
Hi, the question is now: Is it worth to correct an error text which i cannot get to show up ? Vladimir 'phcoder' Serbinenko wrote: > grub-fstest IMAGE ls -- -l $ gunzip /tmp/iso9660_early_ce.iso $ ./grub-fstest /tmp/iso9660_early_ce.iso ls -- -l ... Device loop0: Filesystem type iso966

How to test grub_iso9660_uuid from userland ?

2024-07-01 Thread Thomas Schmitt via Grub-devel
Hi, i found a wrong word in an error message of grub-core/fs/iso9660.c function grub_iso9660_uuid(): grub_error (GRUB_ERR_BAD_NUMBER, "no creation date in filesystem to generate UUID"); The missing entity would be the modification date data->voldesc.modified rather than the creation

Re: [PATCH 0/2] grub-fstest: Show error message if command causes grub_errno

2024-06-21 Thread Thomas Schmitt via Grub-devel
Hi, somehow i managed to omit the first paragraph of the cover letter: - grub-fstest describes itself as "debug tool for filesystem driver" but fails to forward to the user the grub_errno status and grub_errmsg of the drivers und

[PATCH 0/2] grub-fstest: Show error message if command causes grub_errno

2024-06-20 Thread Thomas Schmitt via Grub-devel
Most return values of function execute_command() are ignored in util/grub-fstest.c. Only one of two "loopback" occasions and the command "cryptomount" care. They perform grub_util_error() if the return value is non-zero. So there seems to be a general lack of handling of problems found in the drive

[PATCH 2/2] tests: Use new grub-fstest option -E with iso9660_ce_loop test

2024-06-20 Thread Thomas Schmitt via Grub-devel
This part of tests/iso9660_test works on an intentionally bad ISO which with older versions of GRUB will cause an endless cycle. Therefore the test runs grub-fstest under the program timeout. A non-zero exit value is taken as indication that the timeout was triggered. Non-empty output from grub-fst

[PATCH 1/2] grub-fstest: Show error message if command causes grub_errno

2024-06-20 Thread Thomas Schmitt via Grub-devel
Check grub_errno after a command was performed. If not GRUB_ERR_NONE then print grub_errno and grub_errmsg. Count the errors and exit 1 with a message if the count is larger than zero when function fs_test() ends. The number of printed messages is restricted to 3. Introduce a new option -E which r

[PATCH 1/1] util/grub-mkrescue: Check existence of option arguments

2024-06-17 Thread Thomas Schmitt via Grub-devel
As reported by Victoriia Egorova in bug 65880, grub-mkrescue does not verify that the expected argument of an option like -d or -k does really exist in argv. So check the loop counter before incrementing it inside the loop which copies argv to argp_argv. Issue an error message similar to what older

Re: [PATCH v2] util/grub-mkrescue: use capitalised paths for removable EFI images

2024-06-16 Thread Thomas Schmitt via Grub-devel
Hi, now that i know how to test grub-mkrescue out of the git clone, i also gave your patch v2 a run. Its mail form seems to be problematic: - Alpine shows two leading blanks in the context lines instead of one. Empty context lines show no leading blank. Long lines show intermediate line break

[Solved] Re: How to test the git clone without "make install" ?

2024-06-14 Thread Thomas Schmitt via Grub-devel
Hi, i wrote: > > So i will start a new thread with the question: > > How do i convince the git clone to produce programs and ISO for 64 bit > > EFI. Vladimir 'phcoder' Serbinenko wrote: > ./configure --with-platform=efi --target=x86_64 Fast and concise as ever. :)) Thanks, Vladimir. It works i

[Solved] Re: How to test the git clone without "make install" ?

2024-06-14 Thread Thomas Schmitt via Grub-devel
Hi, Maximilian Stendler wrote: > to keep the host installation clean, I would probably use a container. Yes, a virtual machine came to my mind. Easy to clone and to dispose. But there must be some better way to test a utility built from git independenly of systemwide directories. Vladimir 'phco

How to test the git clone without "make install" ?

2024-06-14 Thread Thomas Schmitt via Grub-devel
Hi, on occasion of https://savannah.gnu.org/bugs/index.php?65880 "heap-buffer-overflow in grub-mkrescue.c" i try to get grub-mkrescue running from git. My problem is that grub_util_get_pkglibdir() returns /usr/local/lib/grub and grub_util_get_pkgdatadir() returns /usr/local/share/grub whi

Re: [PATCH] util/grub-mkrescue: use capitalised paths for removable EFI images

2024-06-13 Thread Thomas Schmitt via Grub-devel
Hi, Mingcong Bai wrote: > I was testing for loongarch64-efi. As noted in the commit message, I > found that Loongson's firmware incapable of handling non-upper-case EFI > boot paths If no test reports emerge about other platforms, then i would consider to reduce the patch to what was tested and i

Re: [PATCH] util/grub-mkrescue: use capitalised paths for removable EFI images

2024-06-13 Thread Thomas Schmitt via Grub-devel
Hi, Mingcong Bai wrote: > Thanks for your review. I will now submit v2. Well, it's not actually a review but rather pointing out a problem which would probably cause a failure of the xorriso run, when the option -hfs-bless-by i /System/Library/CoreServices/boot.efi does not find "boot.efi" beca

Re: [PATCH] util/grub-mkrescue: use capitalised paths for removable EFI images

2024-06-11 Thread Thomas Schmitt via Grub-devel
Hi, Mingcong Bai wrote: > While FAT < 32 filesystems are not case sensitive (which grub-mkrescue > creates > as a FAT12 image via mformat with a size of 2.88MiB), it seems that > some of Loongson's LoongArch-based firmware (namely those found on their > latest XA61200 boards) seems to treat this f