Skip to content

POC: lightweight subprocess isolation via pcntl_fork() #1230

POC: lightweight subprocess isolation via pcntl_fork()

POC: lightweight subprocess isolation via pcntl_fork() #1230

Triggered via pull request April 14, 2024 08:07
@staabmstaabm
synchronize #5751
staabm:fork
Status Failure
Total duration 4m 38s
Artifacts 1

ci.yaml

on: pull_request
Dependency Validation
16s
Dependency Validation
Coding Guidelines
58s
Coding Guidelines
Matrix: Unit Tests
Type Checker
33s
Type Checker
Matrix: End-to-End Tests
Build PHAR
35s
Build PHAR
Code Coverage
1m 33s
Code Coverage
Mutation Testing
36s
Mutation Testing
Matrix: Test PHAR
Fit to window
Zoom out
Zoom in

Annotations

11 errors and 7 warnings
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L64
src/Util/PHP/PcntlFork.php:64:13: MissingThrowsDocblock: Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Runner\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Framework\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Event\NoPreviousThrowableException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L94
src/Util/PHP/PcntlFork.php:94:17: MissingThrowsDocblock: PHPUnit\Event\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Runner\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Framework\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Event\NoPreviousThrowableException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Util\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
MissingThrowsDocblock: src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: SebastianBergmann\CodeCoverage\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
Coding Guidelines
Process completed with exit code 8.
Mutation Testing: src/Framework/TestBuilder.php#L66
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } /** @psalm-suppress UnsafeInstantiation */ $test = new $className($methodName); - $this->configureTestCase($test, $this->shouldTestMethodBeRunInSeparateProcess($className, $methodName), $this->shouldGlobalStateBePreserved($className, $methodName), $this->shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess($className), $this->shouldForkIfPossible($className, $methodName), $this->backupSettings($className, $methodName)); + return $test; } /**
Mutation Testing: src/Framework/TestBuilder.php#L101
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ /** @psalm-suppress UnsafeInstantiation */ $_test = new $className($methodName); $_test->setData($_dataName, $_data); - $this->configureTestCase($_test, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $forkIfPossible, $backupSettings); + $dataProviderTestSuite->addTest($_test, $groups); } return $dataProviderTestSuite;
Mutation Testing: src/Framework/TestBuilder.php#L129
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ if ($runClassInSeparateProcess) { $test->setRunClassInSeparateProcess(true); } - if ($forkIfPossible) { + if (!$forkIfPossible) { $test->setForkIfPossible(true); } if ($preserveGlobalState !== null) {
Mutation Testing: src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $test->setRunClassInSeparateProcess(true); } if ($forkIfPossible) { - $test->setForkIfPossible(true); + $test->setForkIfPossible(false); } if ($preserveGlobalState !== null) { $test->setPreserveGlobalState($preserveGlobalState);
Mutation Testing: src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $test->setRunClassInSeparateProcess(true); } if ($forkIfPossible) { - $test->setForkIfPossible(true); + } if ($preserveGlobalState !== null) { $test->setPreserveGlobalState($preserveGlobalState);
Mutation Testing: src/Framework/TestBuilder.php#L301
Escaped Mutant for Mutator "NotIdentical": --- Original +++ New @@ @@ $metadata = $metadataForMethod->isRunInSeparateProcess()->asArray()[0]; assert($metadata instanceof RunInSeparateProcess); $forkIfPossible = $metadata->forkIfPossible(); - if ($forkIfPossible !== null) { + if ($forkIfPossible === null) { return $forkIfPossible; } }
Mutation Testing: src/Framework/TestBuilder.php#L332
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ return $forkIfPossible; } } - return false; + return true; } }

Artifacts

Produced during runtime
Name Size
phpunit-snapshot-phar Expired
679 KB