travis: Run thread sanitizer on unit tests #14764

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:Mf1811-travisSanThread changing 4 files +32 −6
  1. MarcoFalke commented at 8:59 PM on November 19, 2018: member

    On unit tests only for now. Disabled for the gui unit tests and all functional tests.

  2. MarcoFalke added the label Tests on Nov 19, 2018
  3. MarcoFalke renamed this:
    travis: Run thread sanitizer
    [WIP] travis: Run thread sanitizer
    on Nov 19, 2018
  4. sipa commented at 9:35 PM on November 19, 2018: member
  5. MarcoFalke force-pushed on Nov 19, 2018
  6. MarcoFalke force-pushed on Nov 19, 2018
  7. MarcoFalke force-pushed on Nov 19, 2018
  8. DrahtBot commented at 2:28 AM on November 20, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #12134 (Build previous releases and run functional tests by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. practicalswift commented at 12:35 PM on November 20, 2018: contributor

    Strong concept ACK

    We really should test under all sanitizers in Travis – thanks for taking a step in that direction! :-)

  10. MarcoFalke force-pushed on Nov 20, 2018
  11. MarcoFalke force-pushed on Nov 20, 2018
  12. MarcoFalke force-pushed on Nov 20, 2018
  13. MarcoFalke force-pushed on Nov 20, 2018
  14. MarcoFalke force-pushed on Nov 20, 2018
  15. MarcoFalke force-pushed on Nov 20, 2018
  16. MarcoFalke force-pushed on Nov 20, 2018
  17. MarcoFalke force-pushed on Nov 20, 2018
  18. MarcoFalke force-pushed on Nov 20, 2018
  19. MarcoFalke force-pushed on Nov 20, 2018
  20. MarcoFalke force-pushed on Nov 20, 2018
  21. MarcoFalke renamed this:
    [WIP] travis: Run thread sanitizer
    travis: Run thread sanitizer on unit tests
    on Nov 20, 2018
  22. MarcoFalke force-pushed on Nov 20, 2018
  23. MarcoFalke force-pushed on Nov 20, 2018
  24. MarcoFalke force-pushed on Nov 20, 2018
  25. MarcoFalke requested review from practicalswift on Nov 20, 2018
  26. laanwj commented at 3:31 PM on November 21, 2018: member

    utACK

  27. in .travis.yml:104 in 453efef927 outdated
     101 |          HOST=x86_64-unknown-linux-gnu
     102 |          DOCKER_NAME_TAG=ubuntu:16.04
     103 | -        PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
     104 | +        PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev"
     105 |          NO_DEPENDS=1
     106 | +        RUN_FUNCTIONAL_TESTS=false
    


    practicalswift commented at 10:12 PM on November 21, 2018:

    What tests are blocking the removal of RUN_FUNCTIONAL_TESTS=false?

    Can these be handled using suppressions instead?


    MarcoFalke commented at 4:50 PM on November 22, 2018:

    They also need to be identified, which is the tricky part and imo better be suited for another pull request. (See my WIP in the suppressions file)

  28. in .travis/test_03_before_install.sh:12 in 453efef927 outdated
       7 | @@ -8,7 +8,8 @@ export LC_ALL=C.UTF-8
       8 |  
       9 |  PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
      10 |  # Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers.
      11 | -PATH=$PATH:/usr/lib/llvm-6.0/bin/
      12 | +# shellcheck disable=SC2125
      13 | +PATH=$PATH:/usr/lib/llvm-*/bin/
    


    practicalswift commented at 10:18 PM on November 21, 2018:

    I don't think this works. AFAIK wildcard paths are not allowed and this won't be expanded as intended.


    MarcoFalke commented at 4:49 PM on November 22, 2018:

    If there is only one folder that matches the wildcard, it should be properly expanded?

    However, I just went and reverted that hunk.


    practicalswift commented at 10:59 PM on November 22, 2018:

    @MarcoFalke No, the preceding $PATH: part prevents expansion:

    $ mkdir testing
    $ ls -d testin*
    testing
    $ TESTING=foo/:testin*
    $ echo $TESTING
    foo/:testin*
    $ TESTING=testin*
    $ echo $TESTING
    testing
    

    :-)

  29. in .travis/test_04_install.sh:11 in 453efef927 outdated
       6 | @@ -7,8 +7,9 @@
       7 |  export LC_ALL=C.UTF-8
       8 |  
       9 |  travis_retry docker pull "$DOCKER_NAME_TAG"
      10 | +export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan"
      11 |  export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/contrib/sanitizers-ubsan.suppressions:print_stacktrace=1:halt_on_error=1"
    


    practicalswift commented at 10:20 PM on November 21, 2018:

    Also move from contrib/sanitizers-ubsan.suppressions to test/sanitizer_suppressions/ubsan to make it consistent across sanitizers?


    MarcoFalke commented at 4:56 PM on November 22, 2018:

    Thanks, done.

  30. practicalswift changes_requested
  31. practicalswift commented at 10:22 PM on November 21, 2018: contributor

    Excellent work @MarcoFalke!

    utACK modulo suggested changes

    Would be really nice to also have the functional tests running under TSan :-)

  32. travis: Run thread sanitizer 89bf196c88
  33. travis: --disable-hardening for xenial thread sanitizer
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67308
    fa36d4e456
  34. MarcoFalke force-pushed on Nov 22, 2018
  35. test: Move UBSAN suppressions to test/sanitizer_suppressions/ubsan fa7d36b8e7
  36. MarcoFalke merged this on Nov 23, 2018
  37. MarcoFalke closed this on Nov 23, 2018

  38. MarcoFalke referenced this in commit 2607c38fc5 on Nov 23, 2018
  39. MarcoFalke deleted the branch on Nov 23, 2018
  40. MarcoFalke referenced this in commit f055389cb9 on Dec 18, 2018
  41. PastaPastaPasta referenced this in commit c3ddc80c10 on Aug 16, 2021
  42. PastaPastaPasta referenced this in commit 78363c2c01 on Aug 16, 2021
  43. PastaPastaPasta referenced this in commit 9d1a2b08d6 on Aug 17, 2021
  44. PastaPastaPasta referenced this in commit 8e118581b2 on Aug 18, 2021
  45. MarcoFalke locked this on Sep 8, 2021

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-14 21:14 UTC

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