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 than in /tmp/1724008906.LUKS1_test_key_file_with_offset_and_size/ .

More problems show up:
-------------------------------------------------------------------------

grub-shell-luks-tester does _not_ clean up.
That's because in a run of
  make check TESTS=grub_cmd_cryptomount
the situation in function cleanup() of grub-shell-luks-tester is:

  lukstestdir='/tmp/grub-shell-luks-tester.S2rhmuJJlf'
  debug=''
  RET=''
  {RET:-1}='1'

So the condition in the following if-clause is false because [ 1 -eq 0 ]:

  if [ -z "$debug" ] && [ "${RET:-1}" -eq 0 ]; then
      rm -rf "$lukstestdir" || :
  fi

and no rm -rf happens.

I riddle from where RET shall get its expected content 0.

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

After each make check round, another single directory is left:

  /tmp/tmp.yp1z11pq2w

of the same age as the grub-shell-luks-tester directories.
It stems from this gesture in grub-shell-luks-tester.in:

  # Add good password to second slot and change first slot to unchecked password
  csscript=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 99

I proved this by changing "tmp.XXXXXXXXXX" to "tmp_css.XXXXXXXXXX" and
then getting  /tmp/tmp_css.5wRYh4CUaL .

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

Another problem is that the test leaves empty directories of the form

  /tmp/grub-shell.2jWNHEhpA2

(which also end up in TMPDIR if it is exported).

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

So i will have to investigate more ... and would not mind if others
would take this issue out of my hands.


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