mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
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.
This commit is contained in:
parent
4754d302bf
commit
9999d66bce
1 changed files with 1 additions and 1 deletions
|
@ -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--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue