From 9f5fd6fe1a3835945ce119f2b5d3633d3b81ff61 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Nov 2019 12:37:52 +0100 Subject: 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 --- pkg/bisect/bisect_test.go | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'pkg/bisect/bisect_test.go') 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 -- cgit mrf-deployment