# HG changeset patch # User Augie Fackler # Date 1548172930 18000 # 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 -r afc33a5705b9 -r ebe51a2e75be contrib/fuzz/revlog.cc --- 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