components/bash/patches/solaris-031.use_dynamic_temp_file.patch
branchs11u3-sru
changeset 7627 4758b76d5ad5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bash/patches/solaris-031.use_dynamic_temp_file.patch	Thu Jan 26 12:24:45 2017 +0100
@@ -0,0 +1,27 @@
+# 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"