From 4ff44a916155e0ebcb749566da59ab177965c85c Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 25 Jun 2019 21:23:07 +0200 Subject: [PATCH] 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 --- ext/fileinfo/tests/bug61964-mb.phpt | 4 ++-- ext/fileinfo/tests/bug61964.phpt | 4 ++-- 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=== -- 2.50.1