# HG changeset patch # User Augie Fackler # Date 2019-01-22 16:02:10 # Node ID ebe51a2e75be64f23c459f51be28d707750aeb32 # Parent afc33a5705b992c9a0a5de9cf7d7c298b8a5b92d 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 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 @@ from parsers import parse_index2 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