From patchwork Wed Oct 9 15:00:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7032: fuzz: exercise a little more revlog code From: phabricator X-Patchwork-Id: 42138 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 9 Oct 2019 15:00:30 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7032 AFFECTED FILES contrib/fuzz/revlog.cc CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/contrib/fuzz/revlog.cc b/contrib/fuzz/revlog.cc --- a/contrib/fuzz/revlog.cc +++ b/contrib/fuzz/revlog.cc @@ -20,17 +20,22 @@ try: index, cache = parse_index2(data, inline) index.slicechunktodensity(list(range(len(index))), 0.5, 262144) + index.stats() + index.findsnapshots({}, 0) + 10 in index for rev in range(len(index)): + index.reachableroots(0, [len(index)-1], [rev]) node = index[rev][7] partial = index.shortest(node) index.partialmatch(node[:partial]) + index.deltachain(rev, None, True) except Exception as e: pass # uncomment this print if you're editing this Python code # to debug failures. # print e )py", - "fuzzer", Py_file_input); + "fuzzer", Py_file_input); return 0; }