summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-06-25 21:23:07 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-06-27 00:27:10 +0200
commit4ff44a916155e0ebcb749566da59ab177965c85c (patch)
tree87b4ae93e0f6e40f0f55a96a73309cb9bfbc96b3
parenta29bf46b68cf1974cdd3cd80d3669a7d08e3a7f8 (diff)
downloadphp-git-4ff44a916155e0ebcb749566da59ab177965c85c.tar.gz
Fix concurrent testing of bug 61964
When tests are run concurrently using the -j option there might be a change of failure and writing to the same directory from both tests. Use test filenames for generated temp dirs
-rw-r--r--ext/fileinfo/tests/bug61964-mb.phpt4
-rw-r--r--ext/fileinfo/tests/bug61964.phpt4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/fileinfo/tests/bug61964-mb.phpt b/ext/fileinfo/tests/bug61964-mb.phpt
index a0f198e682..bee1c8f9ad 100644
--- a/ext/fileinfo/tests/bug61964-mb.phpt
+++ b/ext/fileinfo/tests/bug61964-mb.phpt
@@ -10,7 +10,7 @@ $magic_file = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べら
$ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits私はガラスを食べられます");
var_dump($ret);
-$dir = __DIR__ . "/test-folder";
+$dir = __DIR__ . "/bug61964-mb";
@mkdir($dir);
$magic_file_copy = $dir . "/magic私はガラスを食べられます.copy";
@@ -60,6 +60,6 @@ Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964-mb.php on line %
Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964-mb.php on line %d
-Warning: finfo_open(): Failed to load magic database at '%stest-folder'. in %sbug61964-mb.php on line %d
+Warning: finfo_open(): Failed to load magic database at '%sbug61964-mb'. in %sbug61964-mb.php on line %d
DONE: testing dir with files
===DONE===
diff --git a/ext/fileinfo/tests/bug61964.phpt b/ext/fileinfo/tests/bug61964.phpt
index d6782a2072..49829e98d8 100644
--- a/ext/fileinfo/tests/bug61964.phpt
+++ b/ext/fileinfo/tests/bug61964.phpt
@@ -10,7 +10,7 @@ $magic_file = __DIR__ . DIRECTORY_SEPARATOR . 'magic';
$ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits");
var_dump($ret);
-$dir = __DIR__ . "/test-folder";
+$dir = __DIR__ . "/bug61964";
@mkdir($dir);
$magic_file_copy = $dir . "/magic.copy";
@@ -60,6 +60,6 @@ Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964.php on line %d
Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964.php on line %d
-Warning: finfo_open(): Failed to load magic database at '%stest-folder'. in %sbug61964.php on line %d
+Warning: finfo_open(): Failed to load magic database at '%sbug61964'. in %sbug61964.php on line %d
DONE: testing dir with files
===DONE===