components/bash/patches/solaris-031.use_dynamic_temp_file.patch
author Vladimir Marek <Vladimir.Marek@oracle.com>
Thu, 26 Jan 2017 12:24:45 +0100
branchs11u3-sru
changeset 7627 4758b76d5ad5
permissions -rw-r--r--
25123965 Update bash to version 4.4 24689447 problem in UTILITY/BASH 21341453 process hangs when terminated with unfinished command 21196056 bash test is failing to finish 19394218 bash : Parameter Substitution Causing Memory Leak

# The test new-exp1 used /tmp/x which is too common file to and might be
# already present. The test then fails with:
#
# run-new-exp
# ...
# 171,172c171
# < ./new-exp1.sub: line 8: /tmp/x: Permission denied
# < rm: cannot remove '/tmp/x': Permission denied
# ---
# > this is test 2
#
# Reported to [email protected]

--- tests/new-exp1.sub	2016-12-07 07:06:57.268664317 +0000
+++ tests/new-exp1.sub	2016-12-07 07:06:13.299361999 +0000
@@ -5,7 +5,8 @@ expect()
 
 expect this is a test of proc subst
 cat <(echo this is a test of proc subst)
-echo this is test 2 > /tmp/x
+OUTFILE=${BASH_TSTOUT}.new-exp1
+echo this is test 2 > "$OUTFILE"
 expect this is test 2
-cat <(cat /tmp/x)
-rm -f /tmp/x
+cat <(cat "$OUTFILE")
+rm -f "$OUTFILE"