com php-src: Improve create_verify_dir() diagnostics : ext/standard/tests/file/windows_mb_path/util.inc
| From: | Christoph Michael Becker | Date: | Mon, 17 Jun 2019 14:49:52 +0000 |
| Subject: | com php-src: Improve create_verify_dir() diagnostics : ext/standard/tests/file/windows_mb_path/util.inc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106844@lists.php.net to get a copy of this message | ||
Commit: e58e2fd0d49c0509b7aebc66f74dd003904cfb74
Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 17 Jun 2019 16:44:49 +0200
Parents: 4e9a65447f748d634f1777287e2dbc65c8a71e05
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e58e2fd0d49c0509b7aebc66f74dd003904cfb74
Log:
Improve create_verify_dir() diagnostics
If create_verify_dir() fails[1], we need more info why that happened.
[1] <https://ci.appveyor.com/project/cmb69/php-src/builds/25324138/job/dm1n12gqhdqa3ln5#L5753>
Changed paths:
M ext/standard/tests/file/windows_mb_path/util.inc
Diff:
diff --git a/ext/standard/tests/file/windows_mb_path/util.inc
b/ext/standard/tests/file/windows_mb_path/util.inc
index de4072a..fc80a76 100644
--- a/ext/standard/tests/file/windows_mb_path/util.inc
+++ b/ext/standard/tests/file/windows_mb_path/util.inc
@@ -94,8 +94,14 @@ function create_verify_dir($prefix, $basename, $cp = 65001)
{
$full = $prefix . DIRECTORY_SEPARATOR . $basename;
- if (!mkdir($full) || get_basename_with_cp($full, $cp, false) !== $basename) {
+ if (!mkdir($full)) {
echo "failed to create dir '$full'\n";
+ return;
+ }
+
+ $now = get_basename_with_cp($full, $cp, false);
+ if ($now !== $basename) {
+ echo "expected '$basename', got '$now'\n";
}
}