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 
> unless debug is enabled

Typo in subject: "Cleaup".


I think the reason for the remaining empty directories is that i do not
find in the patches any equivalent of this proposal of mine:

--- a/tests/grub_cmd_cryptomount.in
+++ b/tests/grub_cmd_cryptomount.in
@@ -46,10 +48,22 @@ _testcase() {
...
>     mkdir -p "$TMPDIR"
>
>     output=`"$@" 2>&1` || res=$?
> +
> +    if [ -z "$debug" ]; then
> +        if ! rmdir "$TMPDIR" >/dev/null 2>&1; then
> +            echo
> +            echo "Note: Temporary directory cannot be removed:"
> +            echo "        $TMPDIR"
> +            echo "      Please inspect and remove manually."
> +            echo
> +        fi
> +    fi
> +    unset TMPDIR
>      TMPDIR=$_TMPDIR
>
>     if [ "$res" -eq "$EXPECTEDRES" ]; then

Essential would be some  rmdir  to remove the directory created by
    mkdir -p "$TMPDIR"


If i add above proposed code to tests/grub_cmd_cryptomount.in then no
empty directories of form /tmp/17*.LUKS2_* remain.
See below for non-empty /tmp/1727105940.LUKS2_test_with_argon2_pbkdf .

I meanwhile forgot why i proposed
> +    unset TMPDIR
but there was some theoretical reason for this ...

----------------------------------------------------------------------
Possibly another problem to tackle:

One of the debris directories is not empty and thus would trigger the
"cannot be removed" warning:
  /tmp/1727104207.LUKS2_test_with_argon2_pbkdf
contains
  grub-shell-luks-tester.Pb6yqhgZSr

The offender is itself a directory with this content:

  -rw-r--r-- 1 root root 20971520 Sep 23 17:10 luks.disk
  -rw-r--r-- 1 root root        8 Sep 23 17:10 luks.key
  drwxr-xr-x 2 root root     4096 Sep 23 17:10 mnt
  -rw-r--r-- 1 root root     1203 Sep 23 17:10 testcase.cfg
  -rw-r--r-- 1 root root       23 Sep 23 17:10 testoutput
  -rw-r--r-- 1 root root      243 Sep 23 17:10 testvars

Subdirectory ./mnt is empty.

File
  grub_cmd_cryptomount.log
contains among many "PASS" lines:

  LUKS2 test with argon2 pbkdf: XFAIL

but nothing more enlightening.
The last line says
  PASS grub_cmd_cryptomount (exit status: 0)

-----------------------------------------------------------------------


Have a nice day :)

Thomas


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to