Skip to content

Commit f0160cd

Browse files
committed
Fix variation5-win32(-mb).phpt wrt. parallel test execution
Each test should use its own temporary filenames to avoid issues when the tests are executed in parallel[1]. We also silence the `unlink()` calls in the CLEAN section just in case. And while we're at it, we also remove the erroneous comment; there is no symlinking involved for the Windows test variants. [1] <php#10175 (comment)>
1 parent f40c3fc commit f0160cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/standard/tests/file/file_variation5-win32-mb.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ chdir($script_directory);
1414
$test_dirname = basename(__FILE__, ".php") . "私はガラスを食べられますtestdir";
1515
mkdir($test_dirname);
1616

17-
$filepath = __DIR__ . '/file_variation_5.tmp';
17+
$filepath = __DIR__ . '/file_variation_5_mb.tmp';
1818
$filename = basename($filepath);
1919
$fd = fopen($filepath, "w+");
2020
fwrite($fd, "Line 1\nLine 2\nLine 3");
@@ -35,8 +35,8 @@ chdir($script_directory);
3535
--CLEAN--
3636
<?php
3737
$test_dirname = __DIR__ . '/' . basename(__FILE__, ".clean.php") . "私はガラスを食べられますtestdir";
38-
$filepath = __DIR__ . '/file_variation_5.tmp';
39-
unlink($filepath);
38+
$filepath = __DIR__ . '/file_variation_5_mb.tmp';
39+
@unlink($filepath);
4040
rmdir($test_dirname);
4141
?>
4242
--EXPECT--

ext/standard/tests/file/file_variation5-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ chdir($script_directory);
3636
<?php
3737
$test_dirname = __DIR__ . '/' . basename(__FILE__, ".clean.php") . "testdir";
3838
$filepath = __DIR__ . '/file_variation_5.tmp';
39-
unlink($filepath); // Should be delete via the symlink deletion
39+
@unlink($filepath);
4040
rmdir($test_dirname);
4141
?>
4242
--EXPECT--

0 commit comments

Comments
 (0)