fuzz: exercise more of the revlog API
I noticed in the coverage report that we didn't have much coverage in
revlog.py. Let's try and get some of the more interesting bits tested
by the fuzzer. I ran this locally for a few minutes to verify that I
appear to be calling the various functions in reasonable ways.
Differential Revision: https://phab.mercurial-scm.org/D5641
--- a/contrib/fuzz/revlog.cc Tue Jan 22 11:18:05 2019 -0500
+++ b/contrib/fuzz/revlog.cc Tue Jan 22 11:02:10 2019 -0500
@@ -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