Skip to content

Commit 9999d66

Browse files
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.
1 parent 4754d30 commit 9999d66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/standard/tests/file/bug81145.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ if (PHP_OS_FAMILY !== "Windows") {
99
$src = __DIR__ . "/bug81145_src.bin";
1010
define('SIZE_4G', 0x100000000);
1111
exec("fallocate -l " . (SIZE_4G-0x100) . " " . escapeshellarg($src), $output, $status);
12-
if ($status !== 0) die("skip fallocate() not supported");
1312
@unlink(__DIR__ . "/bug81145_src.bin");
13+
if ($status !== 0) die("skip fallocate() not supported");
1414
}
1515
?>
1616
--CONFLICTS--

0 commit comments

Comments
 (0)