From 9999d66bce256ef90a31a24b3390c3c6f99fa8cb Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Wed, 30 Jul 2025 13:14:10 -0700 Subject: [PATCH] ext/standard/tests/file/bug81145.phpt: unlink file before exit (#19293) If the test is skipped, the `--SKIPIF--` section exits (via `die()`) without removing the "bug81145_src.bin" file that gets created, and because the test was skipped the `--CLEAN--` section is not run, leaving the .bin file behind. Adjust the `--SKIPIF--` section to remove the .bin file before exiting. --- ext/standard/tests/file/bug81145.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/file/bug81145.phpt b/ext/standard/tests/file/bug81145.phpt index f3258ff6019..27026176193 100644 --- a/ext/standard/tests/file/bug81145.phpt +++ b/ext/standard/tests/file/bug81145.phpt @@ -9,8 +9,8 @@ if (PHP_OS_FAMILY !== "Windows") { $src = __DIR__ . "/bug81145_src.bin"; define('SIZE_4G', 0x100000000); exec("fallocate -l " . (SIZE_4G-0x100) . " " . escapeshellarg($src), $output, $status); - if ($status !== 0) die("skip fallocate() not supported"); @unlink(__DIR__ . "/bug81145_src.bin"); + if ($status !== 0) die("skip fallocate() not supported"); } ?> --CONFLICTS--