Mutations and infinite loops
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Mutations and infinite loops
I was thinking about this the other day... so here it is: What if a mutation creates an infinite loop? How would you make sure the mutation doesn't run too long?
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
Re: Mutations and infinite loops
In Mutation Testing?
For PHPMutagen at least it, when finished (currently has a nasty maximum process count bug, let alone infinite loops from running it!), will run the tests/spec suite for each mutation in a new PHP process which will carry an optional time limit for a) overall execution, and b) each executed test. Even without these the running process will terminate once the maximum time limit set in php.ini is reached. PHPMutagen would take the lack of a passing reponse as an escaped Mutant and report it from the parent process.
For PHPMutagen at least it, when finished (currently has a nasty maximum process count bug, let alone infinite loops from running it!), will run the tests/spec suite for each mutation in a new PHP process which will carry an optional time limit for a) overall execution, and b) each executed test. Even without these the running process will terminate once the maximum time limit set in php.ini is reached. PHPMutagen would take the lack of a passing reponse as an escaped Mutant and report it from the parent process.