From b9b49cfb7b88e0d95d91ea82b75b2b19ca88331a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 30 Mar 2020 10:52:25 +0200 Subject: [PATCH] Don't check directory nlink in stat tests It seems like on many filesystems nlink for directories is the number of subdirectories (plus two, due to . and ..). However, this is not a POSIX requirement, and some filesystems don't implement it this way. This seems to be the case for whatever is used on the Travis AArch64 builders now. --- .../tests/file/lstat_stat_variation8.phpt | 4 +- .../tests/file/lstat_stat_variation9.phpt | 67 ------------------- 2 files changed, 2 insertions(+), 69 deletions(-) delete mode 100644 ext/standard/tests/file/lstat_stat_variation9.phpt diff --git a/ext/standard/tests/file/lstat_stat_variation8.phpt b/ext/standard/tests/file/lstat_stat_variation8.phpt index db7f87f7f7..5dc45e02f5 100644 --- a/ext/standard/tests/file/lstat_stat_variation8.phpt +++ b/ext/standard/tests/file/lstat_stat_variation8.phpt @@ -39,8 +39,8 @@ $new_stat = stat($dirname); // compare self stats var_dump( compare_self_stat($old_stat) ); var_dump( compare_self_stat($new_stat) ); -// compare the stats -$affected_members = array(3, 9, 10, 'nlink', 'mtime', 'ctime'); +// compare the stat +$affected_members = array(9, 10, 'mtime', 'ctime'); clearstatcache(); var_dump(compare_stats($old_stat, $new_stat, $affected_members, "<")); diff --git a/ext/standard/tests/file/lstat_stat_variation9.phpt b/ext/standard/tests/file/lstat_stat_variation9.phpt deleted file mode 100644 index a73b126174..0000000000 --- a/ext/standard/tests/file/lstat_stat_variation9.phpt +++ /dev/null @@ -1,67 +0,0 @@ ---TEST-- -Test lstat() and stat() functions: usage variations - deleting file/subdir ---SKIPIF-- - ---FILE-- -")); - -echo "\n--- Done ---"; -?> ---CLEAN-- - ---EXPECT-- -*** Testing stat() for comparing stats after the deletion of subdir and file *** -bool(true) -bool(true) -bool(true) - ---- Done --- -- 2.50.1