From 40e5fea59fc1244e15bb1995d427daa16dc4940f Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 18 Mar 2025 08:30:42 +0100 Subject: [PATCH] community/php84: fix tests upstream: https://github.com/php/php-src/commit/bd7d3c38ad2e7f67e24014fc5651471ce29487a7 --- community/php84/APKBUILD | 2 + ...-testing-in-bug72666_variation3.phpt.patch | 45 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 community/php84/Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch diff --git a/community/php84/APKBUILD b/community/php84/APKBUILD index 8f8ab428679..67339abf4b2 100644 --- a/community/php84/APKBUILD +++ b/community/php84/APKBUILD @@ -114,6 +114,7 @@ source="https://www.php.net/distributions/php-$pkgver.tar.xz $pkgname-fpm-version-suffix.patch fix-tests-devserver.patch phpinfo-avif.patch + Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch " builddir="$srcdir/php-$pkgver" @@ -620,4 +621,5 @@ ec206639d076ddac6c2d1db697a5428ed3be979157db39417af7fbe6ab837e8dc00315ae0e55aea4 135a23b015ec7fb5be19dc8e12c79f8c044d1e8d2931df1336abebdeacc711d305f311f7b05e750ffbf19a6244c3c03b890664e4a07691daef8e7997158ad49f php84-fpm-version-suffix.patch cc1de2f8d33fccb605c621ac90bdf9202af90006e7d07598dfbe0fece2e30ad69d575966858700d1a5ca940c670709451c421140adfe08ed535271966ccdb2b6 fix-tests-devserver.patch 8bafce5e474f96b5b54c13c92a5216fa77cdc93ad0dce84e74998ad7a7acc822c1c6dc70c0e9a80bbf5a30e0df2b34f434985b8ded96625a843df795d396b31d phpinfo-avif.patch +1c84fa1cdcb9f183ffc8fd5f81d8c985b661cfe36ac7569e6d019f6ee66104f1dc791e57f1ad6cf7f3405936f3f576b58fccb0dd5bdc4b1038fbafc821f8a597 Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch " diff --git a/community/php84/Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch b/community/php84/Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch new file mode 100644 index 00000000000..8d1a776516c --- /dev/null +++ b/community/php84/Get-rid-of-atime-change-testing-in-bug72666_variation3.phpt.patch @@ -0,0 +1,45 @@ +From bd7d3c38ad2e7f67e24014fc5651471ce29487a7 Mon Sep 17 00:00:00 2001 +From: Jakub Zelenka +Date: Mon, 17 Mar 2025 14:49:22 +0100 +Subject: [PATCH] Get rid of atime change testing in bug72666_variation3.phpt + +--- + ext/standard/tests/file/bug72666_variation3.phpt | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/ext/standard/tests/file/bug72666_variation3.phpt b/ext/standard/tests/file/bug72666_variation3.phpt +index a491640c4f746..7937bd904ad7d 100644 +--- a/ext/standard/tests/file/bug72666_variation3.phpt ++++ b/ext/standard/tests/file/bug72666_variation3.phpt +@@ -5,23 +5,11 @@ Bug #72666 (stat cache clearing inconsistent - plain wrapper) + $filename = __DIR__ . '/bug72666_variation3.txt'; + + file_put_contents($filename, "test"); +-$fd = fopen($filename, "r"); +-$atime1 = fileatime($filename); +-sleep(1); +-var_dump(fread($fd, 4)); +-$atime2 = fileatime($filename); + $mtime1 = filemtime($filename); +-fclose($fd); + $fd = fopen($filename, "w"); + sleep(1); + var_dump(fwrite($fd, "data")); + $mtime2 = filemtime($filename); +-if (substr(PHP_OS, 0, 3) == 'WIN') { +- // Windows do not hundle atime +- var_dump($atime2 == $atime1); +-} else { +- var_dump($atime2 > $atime1); +-} + var_dump($mtime2 > $mtime1); + ?> + --CLEAN-- +@@ -29,7 +17,5 @@ var_dump($mtime2 > $mtime1); + unlink(__DIR__ . '/bug72666_variation3.txt'); + ?> + --EXPECT-- +-string(4) "test" + int(4) + bool(true) +-bool(true)