build: make clean removes .gcda and .gcno files from fuzz directory #19672

pull Crypt-iQ wants to merge 1 commits into bitcoin:master from Crypt-iQ:fuzz_cov_cleanup_0806 changing 1 files +1 −1
  1. Crypt-iQ commented at 4:47 AM on August 6, 2020: contributor

    I believe these should also be deleted upon invoking make clean. It also garbles the coverage file if you try to fuzz the same harness again.

  2. build: make clean removes .gcda and .gcno files from fuzz directory
    With this commit, make clean now removes coverage files from the
    fuzzing directory. Without this, subsequent fuzzing runs would have
    garbled coverage signals for files in the fuzz directory as
    they were never deleted with make clean.
    90bd476ea6
  3. fanquake added the label Build system on Aug 6, 2020
  4. practicalswift commented at 10:12 PM on August 6, 2020: contributor

    ACK 90bd476ea67bd80b35188b5f139f159a3836aa7d -- patch looks correct

    Thanks for your continued work on improving (and reviewing) src/test/fuzz/ :)

  5. hebasto commented at 9:43 AM on August 7, 2020: member

    I'm a bit confused.

    I run

    ./configure --with-incompatible-bdb --enable-lcov --enable-fuzz CC=clang CXX=clang++ && make
    

    and a bunch of *.gcno files were generated in the src/test/fuzz directory.

    The following run

    make check
    

    fails for me (because configure: WARNING: enable-fuzz will disable all other targets), and no *.gcda files wer generated in the src/test/fuzz directory.

    Does this mean that we should just prevent combining --enable-lcov with --enable-fuzz?

  6. Crypt-iQ commented at 10:06 AM on August 7, 2020: contributor

    What is the output of make check? *.gcda files should only appear if you run one of the fuzz tests and make check doesn't run the binaries.

  7. hebasto approved
  8. hebasto commented at 1:23 PM on August 7, 2020: member

    ~ACK 90bd476ea67bd80b35188b5f139f159a3836aa7d, tested on Linux Mint 20 (x86_64).~

  9. hebasto commented at 1:58 PM on August 7, 2020: member

    Revoke my ACK.

    Still having concerns about usefulness of combining --enable-lcov with --enable-fuzz:

    $ ./autogen.sh
    $ ./configure --enable-lcov --enable-fuzz --with-sanitizers=address,fuzzer,undefined CC=clang CXX=clang++
    $ make
    $ make cov
    /usr/bin/lcov --gcov-tool=/usr/bin/gcov -c -i -d /home/hebasto/guix/GitHub/bitcoin/src -o baseline.info
    Capturing coverage data from /home/hebasto/guix/GitHub/bitcoin/src
    Found gcov version: 9.3.0
    Using intermediate gcov format
    Scanning /home/hebasto/guix/GitHub/bitcoin/src for .gcno files ...
    Found 338 graph files in /home/hebasto/guix/GitHub/bitcoin/src
    Processing src/libbitcoin_consensus_a-pubkey.gcno
    /home/hebasto/guix/GitHub/bitcoin/src/libbitcoin_consensus_a-pubkey.gcno:version '402*', prefer 'A93*'
    geninfo: ERROR: GCOV failed for /home/hebasto/guix/GitHub/bitcoin/src/libbitcoin_consensus_a-pubkey.gcno!
    make: *** [Makefile:1318: baseline.info] Error 255
    rm baseline.info
    
  10. Crypt-iQ commented at 3:55 PM on August 7, 2020: contributor

    I've only ever gotten --enable-lcov --enable-fuzz to work with afl-gcc & afl-g++. See this issue #12602 It would be very helpful if I could get it to work with clang but I haven't had the time yet.

  11. hebasto approved
  12. hebasto commented at 11:30 AM on August 8, 2020: member

    ACK 90bd476ea67bd80b35188b5f139f159a3836aa7d, tested with hints from #12602 and #18107.

  13. darosior approved
  14. darosior commented at 12:47 PM on August 8, 2020: member

    ACK 90bd476ea67bd80b35188b5f139f159a3836aa7d

  15. MarcoFalke merged this on Aug 8, 2020
  16. MarcoFalke closed this on Aug 8, 2020

  17. sidhujag referenced this in commit 59cd04bdf5 on Aug 8, 2020
  18. Crypt-iQ deleted the branch on Aug 9, 2020
  19. PastaPastaPasta referenced this in commit 7c488f73f9 on Sep 17, 2021
  20. PastaPastaPasta referenced this in commit db62c6f314 on Sep 19, 2021
  21. thelazier referenced this in commit 586492d15a on Sep 25, 2021
  22. DrahtBot locked this on Feb 15, 2022

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: 2026-04-29 06:14 UTC

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