From 9c1e1bbc0585c43c46ef450dff42b465af1a97da Mon Sep 17 00:00:00 2001 From: ptarjan Date: Thu, 26 Sep 2013 00:18:05 -0700 Subject: fix many parallel test issues While running these on HHVM I've run into a lot of parallelism issues. I'm backporting all the fixes I had to do in https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650 to php core. Most of these changes were just filenames that were shared between tests, but I did more surgery on the fixed ports. I can apreciate port 31337 as much as the next nerd, but random ports are better for tests. --- ext/ftp/tests/ftp_fget_basic1.phpt | 4 ++-- ext/ftp/tests/ftp_fget_basic2.phpt | 4 ++-- ext/ftp/tests/ftp_fget_basic3.phpt | 4 ++-- ext/ftp/tests/ftp_nb_fget_basic1.phpt | 4 ++-- ext/ftp/tests/ftp_nb_fget_basic2.phpt | 4 ++-- ext/ftp/tests/ftp_nb_fget_basic3.phpt | 4 ++-- ext/ftp/tests/ftp_nb_get_large.phpt | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) (limited to 'ext/ftp') diff --git a/ext/ftp/tests/ftp_fget_basic1.phpt b/ext/ftp/tests/ftp_fget_basic1.phpt index 475f7183d2..5909d35cef 100644 --- a/ext/ftp/tests/ftp_fget_basic1.phpt +++ b/ext/ftp/tests/ftp_fget_basic1.phpt @@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); ftp_set_option($ftp, FTP_AUTOSEEK, false); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"; $handle = fopen($local_file, 'w'); var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME)); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_fget_basic2.phpt b/ext/ftp/tests/ftp_fget_basic2.phpt index 00a26752d9..622cea3683 100644 --- a/ext/ftp/tests/ftp_fget_basic2.phpt +++ b/ext/ftp/tests/ftp_fget_basic2.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_fget_basic3.phpt b/ext/ftp/tests/ftp_fget_basic3.phpt index b7098701ab..9485473b1c 100644 --- a/ext/ftp/tests/ftp_fget_basic3.phpt +++ b/ext/ftp/tests/ftp_fget_basic3.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_nb_fget_basic1.phpt b/ext/ftp/tests/ftp_nb_fget_basic1.phpt index cac4eec56b..5e6389ff13 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic1.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic1.phpt @@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); ftp_set_option($ftp, FTP_AUTOSEEK, false); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt"; $handle = fopen($local_file, 'w'); var_dump(ftp_nb_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME)); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_fget_basic2.phpt b/ext/ftp/tests/ftp_nb_fget_basic2.phpt index dc92f4e23b..215b79ac4a 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic2.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic2.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_fget_basic3.phpt b/ext/ftp/tests/ftp_nb_fget_basic3.phpt index d1a87c4f3d..66daf2ba0a 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic3.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic3.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_get_large.phpt b/ext/ftp/tests/ftp_nb_get_large.phpt index 3fbf2a4831..0c354d7c19 100644 --- a/ext/ftp/tests/ftp_nb_get_large.phpt +++ b/ext/ftp/tests/ftp_nb_get_large.phpt @@ -18,7 +18,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt"; +$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt"; touch($local_file); ftp_nb_get($ftp, $local_file, 'fget_large.txt', FTP_BINARY, 5368709119); $fp = fopen($local_file, 'r'); @@ -29,7 +29,7 @@ fclose($fp); ?> --CLEAN-- --EXPECT-- string(1) "X" -- cgit v1.2.1