]> granicus.if.org Git - php/commitdiff
Fix zlib/tests/gzseek to create unique temporary files
authorptarjan <ptarjan@fb.com>
Thu, 25 Apr 2013 07:13:30 +0000 (00:13 -0700)
committerSara Golemon <pollita@php.net>
Wed, 24 Apr 2013 08:06:55 +0000 (01:06 -0700)
When running tests in parallel these create a race condition.
Race conditions are bad.

ext/zlib/tests/gzseek_basic2.phpt
ext/zlib/tests/gzseek_variation1.phpt
ext/zlib/tests/gzseek_variation4.phpt
ext/zlib/tests/gzseek_variation5.phpt
ext/zlib/tests/gzseek_variation7.phpt

index a815b8ff4173bcc4188a3068b7ea2d6acd18ed0b..82d305d0fb41965a74385dd02d287028183640f7 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$f = "temp3.txt.gz";
+$f = "gzseek_basic2.gz";
 $h = gzopen($f, 'w'); 
 $str1 = "This is the first line.";
 $str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
 This is the first line.
 string(40) "0000000000000000000000000000000000000000"
 This is the second line.
-===DONE===
\ No newline at end of file
+===DONE===
index 301b57d151fbd1ff7aae0a7a8367b76b704510ea..b260783f11812d6ab1aded191913144628d652d0 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$f = "temp3.txt.gz";
+$f = "gzseek_variation1.gz";
 $h = gzopen($f, 'w'); 
 $str1 = "This is the first line.";
 $str2 = "This is the second line.";
@@ -30,4 +30,4 @@ unlink($f);
 This is the first line.
 string(40) "0000000000000000000000000000000000000000"
 This is the second line.
-===DONE===
\ No newline at end of file
+===DONE===
index fc641f6c82c11c339105cde08225de67e7973939..3d0cf67ceb0e6a80390de63a830c6ba73d49b2ae 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$f = "temp3.txt.gz";
+$f = "gzseek_variation5.gz";
 $h = gzopen($f, 'w'); 
 $str1 = "This is the first line.";
 $str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
 This is the first line.
 string(40) "0000000000000000000000000000000000000000"
 This is the second line.
-===DONE===
\ No newline at end of file
+===DONE===
index 0167e204c23633aeab33d83b9046c025ce87d2a4..93fb19fdbbdc84e8239270679e822cf2130fbcc7 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$f = "temp3.txt.gz";
+$f = "gzseek_variation5.gz";
 $h = gzopen($f, 'w'); 
 $str1 = "This is the first line.";
 $str2 = "This is the second line.";
@@ -39,4 +39,4 @@ reading the output file
 This is the first line.
 string(40) "0000000000000000000000000000000000000000"
 This is the second line.
-===DONE===
\ No newline at end of file
+===DONE===
index aab0834652208f40d4fa20312ef4defd52421dfb..a365272ba21cbd1eadbccc1816fa226380faef67 100644 (file)
@@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
 ?>
 --FILE--
 <?php
-$f = "temp3.txt.gz";
+$f = "gzseek_variation7.gz";
 $h = gzopen($f, 'w'); 
 $str1 = "This is the first line.";
 $str2 = "This is the second line.";
@@ -44,4 +44,4 @@ tell=int(47)
 
 reading the output file
 This is the first line.This is the second line.
-===DONE===
\ No newline at end of file
+===DONE===