diff options
-rwxr-xr-x | selftest/gdb_backtrace | 12 | ||||
-rwxr-xr-x | selftest/gdb_run | 9 |
2 files changed, 15 insertions, 6 deletions
diff --git a/selftest/gdb_backtrace b/selftest/gdb_backtrace index 28ac064bcd4..ef02e784efc 100755 --- a/selftest/gdb_backtrace +++ b/selftest/gdb_backtrace @@ -90,8 +90,16 @@ test x"${need_binary}" = x"yes" && { } } -BATCHFILE_PRE=/tmp/gdb_backtrace_pre.$$ -BATCHFILE_MAIN=/tmp/gdb_backtrace_main.$$ +BATCHFILE_PRE=`mktemp --tmpdir gdb_backtrace_pre.XXXXXXXXXX` +test -n "${BATCHFILE_PRE}" || { + echo "mktemp doesn't work" 1>&2 + exit 1 +} +BATCHFILE_MAIN=`mktemp --tmpdir gdb_backtrace_main.XXXXXXXXXX` +test -n "${BATCHFILE_MAIN}" || { + echo "mktemp doesn't work" 1>&2 + exit 1 +} case "${DB}" in ladebug) cat << EOF > ${BATCHFILE_PRE} diff --git a/selftest/gdb_run b/selftest/gdb_run index 8ad101ed60a..42d91b8559b 100755 --- a/selftest/gdb_run +++ b/selftest/gdb_run @@ -4,11 +4,12 @@ ENV="$1" shift 1 -if test -z "$TMPDIR"; then - TMPDIR="/tmp" -fi +TMPFILE=`mktemp --tmpdir gdb_run.XXXXXXXXXX` +test -n "${TMPFILE}" || { + echo "mktemp doesn't work" 1>&2 + exit 1 +} -TMPFILE=$TMPDIR/gdb_run.$$ cat << EOF > $TMPFILE run bt |