Skip to content

Commit

Permalink
Fix variation5-win32(-mb).phpt wrt. parallel test execution
Browse files Browse the repository at this point in the history
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] <#10175 (comment)>

Closes GH-10189.
  • Loading branch information
cmb69 committed Dec 30, 2022
1 parent 11f6022 commit 0aa1fdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ext/standard/tests/file/file_variation5-win32-mb.phpt
Expand Up @@ -14,7 +14,7 @@ chdir($script_directory);
$test_dirname = basename(__FILE__, ".php") . "私はガラスを食べられますtestdir";
mkdir($test_dirname);

$filepath = __DIR__ . '/file_variation_5.tmp';
$filepath = __DIR__ . '/file_variation_5_mb.tmp';
$filename = basename($filepath);
$fd = fopen($filepath, "w+");
fwrite($fd, "Line 1\nLine 2\nLine 3");
Expand All @@ -35,8 +35,8 @@ chdir($script_directory);
--CLEAN--
<?php
$test_dirname = __DIR__ . '/' . basename(__FILE__, ".clean.php") . "私はガラスを食べられますtestdir";
$filepath = __DIR__ . '/file_variation_5.tmp';
unlink($filepath);
$filepath = __DIR__ . '/file_variation_5_mb.tmp';
@unlink($filepath);
rmdir($test_dirname);
?>
--EXPECT--
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/file/file_variation5-win32.phpt
Expand Up @@ -36,7 +36,7 @@ chdir($script_directory);
<?php
$test_dirname = __DIR__ . '/' . basename(__FILE__, ".clean.php") . "testdir";
$filepath = __DIR__ . '/file_variation_5.tmp';
unlink($filepath); // Should be delete via the symlink deletion
@unlink($filepath);
rmdir($test_dirname);
?>
--EXPECT--
Expand Down

0 comments on commit 0aa1fdf

Please sign in to comment.