Patchwork D5641: fuzz: exercise more of the revlog API

login
register
mail settings
Submitter phabricator
Date Jan. 23, 2019, 5:46 a.m.
Message ID <69743142a941b0db3f08b5801fbeff51@localhost.localdomain>
Download mbox | patch
Permalink /patch/37915/
State Not Applicable
Headers show

Comments

phabricator - Jan. 23, 2019, 5:46 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGebe51a2e75be: fuzz: exercise more of the revlog API (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5641?vs=13337&id=13354

REVISION DETAIL
  https://phab.mercurial-scm.org/D5641

AFFECTED FILES
  contrib/fuzz/revlog.cc

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: martinvonz, mercurial-devel

Patch

diff --git a/contrib/fuzz/revlog.cc b/contrib/fuzz/revlog.cc
--- a/contrib/fuzz/revlog.cc
+++ b/contrib/fuzz/revlog.cc
@@ -19,6 +19,11 @@ 
 for inline in (True, False):
     try:
         index, cache = parse_index2(data, inline)
+        index.slicechunktodensity(list(range(len(index))), 0.5, 262144)
+        for rev in range(len(index)):
+            node = index[rev][7]
+            partial = index.shortest(node)
+            index.partialmatch(node[:partial])
     except Exception as e:
         pass
         # uncomment this print if you're editing this Python code