diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-27 12:37:52 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-27 12:37:52 +0100 |
| commit | 9f5fd6fe1a3835945ce119f2b5d3633d3b81ff61 (patch) | |
| tree | cfdd469790105e25a7c5f5927d2619f6c57b5ac1 /pkg/bisect/bisect_test.go | |
| parent | 5a38f3f0660c5210d57304a7e6519d9f56bfffba (diff) | |
pkg/bisect: fix some off-by-ones
3/4 added tests currently fail.
The problem is that we don't collect results
from initial bisection range detection.
As the result we won't detect "same binary"
for release and first commit in a release.
Update #1271
Diffstat (limited to 'pkg/bisect/bisect_test.go')
| -rw-r--r-- | pkg/bisect/bisect_test.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go index 04609e701..01dbfd44e 100644 --- a/pkg/bisect/bisect_test.go +++ b/pkg/bisect/bisect_test.go @@ -245,6 +245,46 @@ func TestBisectionResults(t *testing.T) { sameBinaryEnd: 504, noopChange: true, }, + { + name: "cause-same-binary-release1", + startCommit: 905, + commitLen: 1, + expectRep: true, + culprit: 500, + sameBinaryStart: 405, + sameBinaryEnd: 500, + noopChange: true, + }, + { + name: "cause-same-binary-release2", + startCommit: 905, + commitLen: 1, + expectRep: true, + culprit: 501, + sameBinaryStart: 500, + sameBinaryEnd: 501, + noopChange: true, + }, + { + name: "cause-same-binary-release3", + startCommit: 905, + commitLen: 1, + expectRep: true, + culprit: 405, + sameBinaryStart: 404, + sameBinaryEnd: 405, + noopChange: true, + }, + { + name: "fix-same-binary-last", + fix: true, + startCommit: 400, + commitLen: 1, + culprit: 905, + sameBinaryStart: 904, + sameBinaryEnd: 905, + noopChange: true, + }, } for _, test := range tests { test := test |
