Locating A Bug by Binary Search of Revisions
Locating A Bug by Binary Search of Revisions
Bad News: A New Failure Case
We find a bug when searching \w{4}\s+\w{4}\s+\w{4}
.
icgrep-build/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file provide fodder for some simple
- Create a test case that forces failure. Revision 5164
- Try to find a previous revision that did not have the bug.
Check out and build revision 5020.
build5020/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file provide fodder for some simple
Check out and build revision 4820.
build4820/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file
Success!
r4974 might have been OK.
build4974/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file provide fodder for some simple
Nope!
- We continue to perform binary search to find the exact revision at which the bug was introduced.
. . .
Revision 4840
build4840/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file
Revision 4841
build4841/icgrep '\w{4}\s+\w{4}\s+\w{4}' QA/testfiles/simple1 in this simple test file provide fodder for some simple
We found the revision - now let's locate and fix the bug. The fix
Automation
git-bisect is a tool that can automate this process based on git repositories.
But there may be problems in successfully building older revisions, if there are environmental changes that affect the build process (e.g., updates to tools or changes to external libraries.)
Updated Tue Sept. 27 2016, 17:35 by cameron.