doc: initial RapidCheck property-based testing documentation #16645

pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:rapidcheck-documentation changing 1 files +84 −0
  1. jonatack commented at 10:58 PM on August 18, 2019: member

    This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).

    The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.

  2. fanquake added the label Docs on Aug 18, 2019
  3. jonatack force-pushed on Aug 19, 2019
  4. in doc/rapidcheck.md:22 in 093dfb19ba outdated
      17 | +a counter-example. For example, if the input is an integer, RapidCheck tries to
      18 | +find the smallest integer for which the property is false.
      19 | +
      20 | +## Running
      21 | +
      22 | +Once RapidCheck is installed correctly, Bitcoin Core will automatically run the
    


    fanquake commented at 1:13 AM on August 19, 2019:
    If RapidCheck is installed, Bitcoin Core will automatically run the
    

    jonatack commented at 7:19 AM on August 19, 2019:

    Done

  5. in doc/rapidcheck.md:27 in 093dfb19ba outdated
      22 | +Once RapidCheck is installed correctly, Bitcoin Core will automatically run the
      23 | +property-based tests with the unit tests during `make check`, unless the
      24 | +`--without-rapidcheck` flag is passed when configuring.
      25 | +
      26 | +For more information, run `./configure --help` and see `--with-rapidcheck` under
      27 | +"Optional Packages".
    


    fanquake commented at 1:17 AM on August 19, 2019:

    I don't think this needs to be quoted.


    jonatack commented at 7:22 AM on August 19, 2019:

    Done

  6. in doc/rapidcheck.md:54 in 093dfb19ba outdated
      49 | +    ```
      50 | +
      51 | +    You should see:
      52 | +
      53 | +    ```shell
      54 | +    -- The CXX compiler identification is <GNU/AppleClang/etc x.y.z>
    


    fanquake commented at 1:19 AM on August 19, 2019:

    I don't think we need all of this build output here.


    jonatack commented at 7:21 AM on August 19, 2019:

    I think you're right. The build output was helpful for me in debugging my CMake command but it is resolved now.

  7. in doc/rapidcheck.md:31 in 093dfb19ba outdated
      26 | +For more information, run `./configure --help` and see `--with-rapidcheck` under
      27 | +"Optional Packages".
      28 | +
      29 | +## Setup
      30 | +
      31 | +The following instructions have been tested with Linux Debian 4.19/GCC 8.3 and
    


    fanquake commented at 1:21 AM on August 19, 2019:

    Can you drop the all the version numbers from here.


    jonatack commented at 7:21 AM on August 19, 2019:

    Done

  8. in doc/rapidcheck.md:34 in 093dfb19ba outdated
      29 | +## Setup
      30 | +
      31 | +The following instructions have been tested with Linux Debian 4.19/GCC 8.3 and
      32 | +macOS 10.14.6/AppleClang 10.
      33 | +
      34 | +1. Ensure cmake is installed with `apt-get install cmake` on Linux or `brew
    


    fanquake commented at 1:24 AM on August 19, 2019:

    Instead of 1., with OS specific install instructions, you could add a "requires CMake" note to 3..


    jonatack commented at 7:22 AM on August 19, 2019:

    Done

  9. fanquake commented at 1:26 AM on August 19, 2019: member

    Concept ACK. Thanks for writing more documentation. Some of it seems a bit verbose. i.e I don't think we need a dump of the rapidcheck build output in here (that's also likely to change, and wont look the same for everyone anyways). I left a few comments inline. @Christewart I see you've seen this PR already, but would be good to get your review / thoughts as well.

  10. doc: initial RapidCheck property-based testing documentation 8616c81f08
  11. jonatack force-pushed on Aug 19, 2019
  12. jonatack commented at 7:25 AM on August 19, 2019: member

    Thank you for reviewing @fanquake. Updated with your feedback and rebased.

  13. laanwj commented at 10:46 AM on August 19, 2019: member

    Looks good to me, thanks for adding documentation!

  14. fanquake approved
  15. fanquake commented at 11:27 AM on August 19, 2019: member

    ACK 8616c81f08c8118003e035808b3f237b3bb211a9 - Thanks for updating.

  16. in doc/rapidcheck.md:22 in 8616c81f08
      17 | +a counter-example. For example, if the input is an integer, RapidCheck tries to
      18 | +find the smallest integer for which the property is false.
      19 | +
      20 | +## Running
      21 | +
      22 | +If RapidCheck is installed, Bitcoin Core will automatically run the
    


    Christewart commented at 11:37 AM on August 19, 2019:

    Do we want to run these by default? This forces everyone to install rapidcheck. I think that is reasonable when we have a pre-configured way to easily install rapidcheck. AFAIK this isn't this case, unless I missed a PR.


    jonatack commented at 11:47 AM on August 19, 2019:

    Currently, RapidCheck is auto-configured only if librapidcheck.a is detected, which IIUC doesn't force anyone to install it. I think this is outside the scope of the doc which addresses the current situation. FWIW I'm working on updating the RapidCheck Makefile to maybe/hopefully autobuild cleanly and can update this doc in that PR if needed.


    jonatack commented at 1:33 PM on August 19, 2019:

    (Rapidcheck auto-configure as seen in configure.ac:L134-138 and 1280-1292)

    Thanks for reviewing!

  17. laanwj referenced this in commit bd62f8d6ee on Aug 19, 2019
  18. laanwj merged this on Aug 19, 2019
  19. laanwj closed this on Aug 19, 2019

  20. jonatack deleted the branch on Aug 19, 2019
  21. deadalnix referenced this in commit f9d5b98ef5 on Feb 27, 2020
  22. deadalnix referenced this in commit 254e3daef8 on Feb 28, 2020
  23. ftrader referenced this in commit 9613af3b3e on May 19, 2020
  24. PastaPastaPasta referenced this in commit 62ae87f4eb on Jun 27, 2021
  25. PastaPastaPasta referenced this in commit ce96534183 on Jun 28, 2021
  26. PastaPastaPasta referenced this in commit 3e387117e5 on Jun 29, 2021
  27. PastaPastaPasta referenced this in commit 8901c1de9e on Jul 1, 2021
  28. PastaPastaPasta referenced this in commit dbc0254393 on Jul 1, 2021
  29. PastaPastaPasta referenced this in commit 78e033b270 on Jul 12, 2021
  30. MarcoFalke locked this on Dec 16, 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