All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Schmitt via Grub-devel <grub-devel@gnu.org>
To: grub-devel@gnu.org
Cc: Thomas Schmitt <scdbackup@gmx.net>, development@efficientek.com
Subject: make check as superuser leaves empty directories in /-directory
Date: Wed, 24 Jul 2024 12:31:34 +0200	[thread overview]
Message-ID: <1301302379834618572@scdbackup.webframe.org> (raw)

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:'" \
    @builddir@/grub-shell-luks-tester --luks=1 $COMMON_OPTS \
        "--cs-opts='--cipher twofish-xts-plain64'"

  eval testcase "'LUKS1 test key file support:'" \
    @builddir@/grub-shell-luks-tester --luks=1 $COMMON_OPTS \
        --keyfile

In the function _testcase() of that file i see

  mkdir -p "$TMPDIR"

but the whole file contains no rmdir command.
The path "$TMPDIR" is composed by
  # Create a subdir in TMPDIR for each testcase
  _TMPDIR=$TMPDIR
  TMPDIR=$TMPDIR/`echo -n "$(date +%s).$LOGPREFIX" | sed -e 's,[ /],_,g' -e 's,:$,,g'`


So "$TMPDIR" would initially have been empty. I wonder why.

I fail to see what else but mkdir is done to "$TMPDIR". So i cannot tell
when it can be removed.


"git blame" points to commit a7b540e6 by Glenn Washburn. (Cc'ed)
The later commit 56b367d by Glenn Washburn is old enough to have been in
effect when i first ran "make check" as superuser.

Commit 5a311d0 by Gary Lin is too young for having caused my oldest
/LUKS* directories.

----------------------------------------------------------------------
Why i think GRUB "make check" as superuser is to blame:

The timestamps of the directories correlate with my memory of when i ran
"make check" as superuser to check the impact of my proposed patch:

  https://lists.gnu.org/archive/html/grub-devel/2024-06/msg00197.html
  "[PATCH 0/2] grub-fstest: Show error message if command causes
   grub_errno"
  (The first paragraph of the cover letter is in
    https://lists.gnu.org/archive/html/grub-devel/2024-06/msg00201.html
  )

I ran "make check" as superuser last year with Debian 11 and this year
with Debian 12. Both occasions obviously left their /*.LUKS* directories.

A google search with "LUKS1_test_detached_header_support" leads
to an earlier patch proposal by Glenn Washburn of 2020:
  https://www.mail-archive.com/grub-devel@gnu.org/msg30613.html


Have a nice day :)

Thomas


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

             reply	other threads:[~2024-07-24 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 10:31 Thomas Schmitt via Grub-devel [this message]
2024-07-24 12:55 ` make check as superuser leaves empty directories in /-directory Thomas Schmitt via Grub-devel
2024-07-24 17:08   ` Thomas Schmitt via Grub-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301302379834618572@scdbackup.webframe.org \
    --to=grub-devel@gnu.org \
    --cc=development@efficientek.com \
    --cc=scdbackup@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.