mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
tests/grub_cmd_cryptomount: Default TMPDIR to /tmp
This fixes behavior where grub_cmd_cryptomount temporary files, which are some times not cleaned up, are left in the / directory. Set TMPDIR if your system does not have /tmp or it can not be used for some reason. Reported-by: Thomas Schmitt <scdbackup@gmx.net> Signed-off-by: Glenn Washburn <development@efficientek.com> Tested-by: Thomas Schmitt <scdbackup@gmx.net> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
32b02bb92e
commit
e6e2b73db8
1 file changed
+3
-2
@@ -47,8 +47,9 @@ _testcase() {
|
|||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
# Create a subdir in TMPDIR for each testcase
|
# Create a subdir in TMPDIR for each testcase
|
||||||
_TMPDIR=$TMPDIR
|
_TMPDIR=${TMPDIR:-/tmp}
|
||||||
TMPDIR=$TMPDIR/`echo -n "$(date +%s).$LOGPREFIX" | sed -e 's,[ /],_,g' -e 's,:$,,g'`
|
TMPDIR=${_TMPDIR}/`echo -n "$(date +%s).${LOGPREFIX}" | sed -e 's,[ /],_,g' -e 's,:$,,g'`
|
||||||
|
export TMPDIR
|
||||||
mkdir -p "$TMPDIR"
|
mkdir -p "$TMPDIR"
|
||||||
set -- "$@" $([ "${EXPECTEDRES}" -eq 1 ] && echo "--xfail")
|
set -- "$@" $([ "${EXPECTEDRES}" -eq 1 ] && echo "--xfail")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user