ci: Run fuzz target even if input folder is empty #27919

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2306-ci-fuzz- changing 2 files +19 −5
  1. maflcko commented at 1:14 pm on June 20, 2023: member
    This should catch trivial integer sanitizer bugs if the author and all reviewers forget to look for them.
  2. maflcko force-pushed on Jun 20, 2023
  3. DrahtBot commented at 1:14 pm on June 20, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK brunoerg, dergoegge

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Jun 20, 2023
  5. dergoegge commented at 1:18 pm on June 20, 2023: member
    Concept ACK
  6. in test/fuzz/test_runner.py:272 in fa39e50e41 outdated
    270             os.path.join(build_dir, 'src', 'test', 'fuzz', 'fuzz'),
    271             '-runs=1',
    272-            corpus_path,
    273         ]
    274+        if not any(corpus_path.iterdir()) and empty_min_time:
    275+            args.append(f"-max_total_time={empty_min_time}")
    


    dergoegge commented at 1:23 pm on June 20, 2023:

    this would still include runs=1 which for an empty corpus would only generate 1 input.

    0Run process_messages with args ['/home/dergoegge/workspace/bitcoin/src/test/fuzz/fuzz', '-runs=1', '-max_total_time=10']INFO: Running with entropic power schedule (0xFF, 100).
    1INFO: Seed: 2455678762
    2INFO: Loaded 1 modules   (350793 inline 8-bit counters): 350793 [0x55c579a854b0, 0x55c579adaef9),
    3INFO: Loaded 1 PC tables (350793 PCs): 350793 [0x55c579adaf00,0x55c57a035390),
    4INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
    5INFO: A corpus is not provided, starting from an empty corpus
    6[#2](/bitcoin-bitcoin/2/)      INITED cov: 2324 ft: 2325 corp: 1/1b exec/s: 0 rss: 115Mb
    7[#2](/bitcoin-bitcoin/2/)      DONE   cov: 2324 ft: 2325 corp: 1/1b lim: 4 exec/s: 0 rss: 115Mb
    8Done 2 runs in 0 second(s)
    
  7. maflcko force-pushed on Jun 20, 2023
  8. maflcko force-pushed on Jun 20, 2023
  9. dergoegge commented at 2:03 pm on June 20, 2023: member
    Tested it locally, seems to work. We should also see this work in the CI here shortly for the utxo_total_supply, wallet_fees and coincontrol targets.
  10. brunoerg commented at 2:16 pm on June 20, 2023: contributor
    Strong Concept ACK
  11. dergoegge approved
  12. dergoegge commented at 2:21 pm on June 20, 2023: member

    ACK fae0c9955ed8254665c9afbaf940f1f4295bfa29

    It is working and found the wallet_fees bug.

    We should probably wait with merging until #27917 is in.

  13. DrahtBot added the label CI failed on Jun 20, 2023
  14. dergoegge commented at 3:52 pm on June 20, 2023: member
    #27917 was merged, so this should have a green CI after rebase.
  15. brunoerg commented at 4:11 pm on June 20, 2023: contributor
    Tested locally and it got wallet_fees bug.
  16. brunoerg approved
  17. brunoerg commented at 4:12 pm on June 20, 2023: contributor

    ACK fae0c9955ed8254665c9afbaf940f1f4295bfa29

    Gonna re-ack as soon as it got rebased

  18. ci: Run fuzz target even if input folder is empty 0000f55293
  19. maflcko force-pushed on Jun 20, 2023
  20. brunoerg commented at 4:21 pm on June 20, 2023: contributor
    reACK 0000f552937ee787d25c8fd0af3278ea94889216
  21. DrahtBot requested review from dergoegge on Jun 20, 2023
  22. DrahtBot removed the label CI failed on Jun 20, 2023
  23. in ci/test/06_script_b.sh:173 in 0000f55293
    169@@ -170,5 +170,5 @@ if [ "${RUN_TIDY}" = "true" ]; then
    170 fi
    171 
    172 if [ "$RUN_FUZZ_TESTS" = "true" ]; then
    173-  bash -c "LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN}"
    174+  bash -c "LD_LIBRARY_PATH=${DEPENDS_DIR}/${HOST}/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN} --empty_min_time=60"
    


    dergoegge commented at 8:44 am on June 21, 2023:
    We can probably play around with this value but for now 60s seems fine to me.

    maflcko commented at 8:52 am on June 21, 2023:
    Yeah, I think it should be 10 seconds or more, but less than 2 minutes? With 1 minute, even with 60 missing fuzz input folders, the overhead will be 1 hour for all runs until fuzz inputs are provided, which seems fine.
  24. dergoegge approved
  25. dergoegge commented at 8:44 am on June 21, 2023: member
    reACK 0000f552937ee787d25c8fd0af3278ea94889216
  26. fanquake merged this on Jun 21, 2023
  27. fanquake closed this on Jun 21, 2023

  28. maflcko deleted the branch on Jun 21, 2023
  29. sidhujag referenced this in commit 02c33b9e56 on Jun 21, 2023
  30. bitcoin locked this on Jun 20, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-21 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me