Patchwork D7032: fuzz: exercise a little more revlog code

login
register
mail settings
Submitter phabricator
Date Oct. 10, 2019, 3:23 a.m.
Message ID <847c5d25b0260c42d2ee38dd90468993@localhost.localdomain>
Download mbox | patch
Permalink /patch/42174/
State Not Applicable
Headers show

Comments

phabricator - Oct. 10, 2019, 3:23 a.m.
Closed by commit rHGdc827f5aba93: fuzz: exercise a little more revlog code (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7032?vs=16988&id=17033

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7032/new/

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

AFFECTED FILES
  contrib/fuzz/revlog.cc

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: 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
@@ -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;
 }