com php-src: Fix conflicts in windows ACL tests: ext/standard/t ests/file/windows_acls/bug44859.phpt ext/standa
rd/tests/file/windows_acls/bug44859_2.phpt ext/standard/tests/file/windows_acls/bug44859_4 .phpt ext/standard/tests/file/windows_acls/common.inc

From: Date: Sat, 09 Nov 2019 12:55:42 +0000
Subject: com php-src: Fix conflicts in windows ACL tests: ext/standard/t ests/file/windows_acls/bug44859.phpt ext/standa
rd/tests/file/windows_acls/bug44859_2.phpt ext/standard/tests/file/windows_acls/bug44859_4 .phpt ext/standard/tests/file/windows_acls/common.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-109227@lists.php.net to get a copy of this message
Commit: ce41795a9f7eac181e6ac38daf3964fc7eb822e2 Author: Fabien Villepinte <fabien.villepinte@gmail.com> Sat, 9 Nov 2019 13:55:42 +0100 Parents: 9c4b989c751204ce25f85c9e9b97bff1cd897165 Branches: PHP-7.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ce41795a9f7eac181e6ac38daf3964fc7eb822e2 Log: Fix conflicts in windows ACL tests Closes GH-4898. Changed paths: M ext/standard/tests/file/windows_acls/bug44859.phpt M ext/standard/tests/file/windows_acls/bug44859_2.phpt M ext/standard/tests/file/windows_acls/bug44859_4..phpt M ext/standard/tests/file/windows_acls/common.inc Diff: diff --git a/ext/standard/tests/file/windows_acls/bug44859.phpt b/ext/standard/tests/file/windows_acls/bug44859.phpt index 20e10f5c5b6..679734b3792 100644 --- a/ext/standard/tests/file/windows_acls/bug44859.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859.phpt @@ -7,6 +7,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.')); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -19,7 +20,7 @@ $iteration = array( echo "Testing file:\n"; $i = 1; -$path = __DIR__ . '/a.txt'; +$path = $uniqueBasePath . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory:\n"; -$path = __DIR__ . '/adir'; +$path = $uniqueBasePath . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/bug44859_2.phpt b/ext/standard/tests/file/windows_acls/bug44859_2.phpt index 583e63a2a6a..b88d07f8200 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_2.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_2.phpt @@ -7,6 +7,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBasePath = substr(__FILE__, 0, strrpos(__FILE__, '.')); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -19,7 +20,7 @@ $iteration = array( echo "Testing file:\n"; $i = 1; -$path = __DIR__ . '/a.txt'; +$path = $uniqueBasePath . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -34,7 +35,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory:\n"; -$path = __DIR__ . '/adir'; +$path = $uniqueBasePath . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/bug44859_4.phpt b/ext/standard/tests/file/windows_acls/bug44859_4.phpt index 452581fa054..e0fbe11f4b2 100644 --- a/ext/standard/tests/file/windows_acls/bug44859_4.phpt +++ b/ext/standard/tests/file/windows_acls/bug44859_4.phpt @@ -9,6 +9,7 @@ skipif(); ?> --FILE-- <?php +$uniqueBaseName = basename(substr(__FILE__, 0, strrpos(__FILE__, '.'))); include_once __DIR__ . '/common.inc'; fix_acls(); @@ -21,7 +22,7 @@ $iteration = array( echo "Testing file with relative path:\n"; $i = 1; -$path = './a.txt'; +$path = './' . $uniqueBaseName . '_file.txt'; foreach ($iteration as $perms => $exp) { create_file($path, $perms); clearstatcache(true, $path); @@ -36,7 +37,7 @@ foreach ($iteration as $perms => $exp) { } echo "Testing directory with relative path:\n"; -$path = 'adir'; +$path = $uniqueBaseName . '_dir'; $i = 1; foreach ($iteration as $perms => $exp) { create_dir($path, $perms); diff --git a/ext/standard/tests/file/windows_acls/common.inc b/ext/standard/tests/file/windows_acls/common.inc index b292745a6be..5d4b402840f 100644 --- a/ext/standard/tests/file/windows_acls/common.inc +++ b/ext/standard/tests/file/windows_acls/common.inc @@ -168,32 +168,3 @@ function delete_dir($path) { return; } } -if (0) { -$path = __DIR__ . '/a.txt'; -create_file($path, PHPT_ACL_NONE); -if (!is_writable($path)) { - echo "PHPT_ACL_NONE success!!\n"; -} else { - echo "PHPT_ACL_NONE failed!!\n"; -} -delete_file($path); - -$path = __DIR__ . '/a.txt'; -create_file($path, PHPT_ACL_READ); -if (!is_writable($path)) { - echo "PHPT_ACL_READ success!!\n"; -} else { - echo "PHPT_ACL_READ failed!!\n"; -} -delete_file($path); - -$path = __DIR__ . '/adir'; -create_dir($path, PHPT_ACL_READ); -if (!is_writable($path)) { - echo "PHPT_ACL_READ dir success!!\n"; -} else { - echo "PHPT_ACL_READ dir failed!!\n"; -} -delete_dir($path); - -}

« previous php.cvs (#109227) next »