Skip to content

Conversation

@fanquake
Copy link
Member

@fanquake fanquake commented Dec 1, 2018

This updates RapidCheck to the latest version available from https://github.com/emil-e/rapidcheck.

RapidCheck now uses the new RC_INSTALL_ALL_EXTRAS option, to install the extra boost_test packages, which should unblock progress in #14430.

@fanquake fanquake requested a review from Christewart December 1, 2018 04:17
@fanquake fanquake changed the title depends: latest rapidcheck, enable property based tests on Travis [wip] depends: latest rapidcheck, enable property based tests on Travis Dec 1, 2018
@fanquake fanquake force-pushed the latest-rapidcheck branch 2 times, most recently from 123e4d8 to a989c40 Compare December 1, 2018 04:49
@fanquake
Copy link
Member Author

fanquake commented Dec 1, 2018

Apologies for the push spam. Looks like rapidcheck testing on Travis is still failing with the same memory access violation error as #14171. I'll leave the build log up for now if anyone else wants to investigate, otherwise, the second commit here could be dropped.

Running tests: versionbits_tests from test/versionbits_tests.cpp
Running tests: key_properties from test/key_properties.cpp
Running 4 test cases...
Test cases order is shuffled using seed: 1462083212
Entering test module "Bitcoin Test Suite"
test/key_properties.cpp(22): Entering test suite "key_properties"
test/key_properties.cpp(38): Entering test case "key_set_symmetry"
Using configuration: seed=1143137297392740439
unknown location(0): fatal error: in "key_properties/key_set_symmetry": memory access violation at address: 0x00000020: no mapping at fault address
test/key_properties.cpp(38): last checkpoint: "key_set_symmetry" entry.
Test is aborted
test/key_properties.cpp(38): Leaving test case "key_set_symmetry"; testing time: 19607us
Test is aborted
test/key_properties.cpp(22): Leaving test suite "key_properties"; testing time: 19671us
Test is aborted
Leaving test module "Bitcoin Test Suite"; testing time: 19889us

@fanquake
Copy link
Member Author

fanquake commented Dec 1, 2018

Managed to get a backtrace in what should have been an equivalent environment. cc @Christewart

Thread 1 (Thread 0x7ffff7fe5780 (LWP 72946)):
#0  0x00005555561fe58f in rc::Shrinkable<rc::detail::Any>::value() const ()
#1  0x000055555623abe6 in rc::gen::detail::ExecHandler::onGenerate(rc::Gen<rc::detail::Any> const&) ()
#2  0x00005555559b418e in rc::Gen<std::tuple<CKey, CKey> >::operator*() const ()
#3  0x00005555559b45a5 in std::pair<rc::detail::FunctionTraitsImpl<std::decay<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >::type>::ReturnType, rc::gen::detail::Recipe> rc::gen::detail::execWithRecipe<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >(rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)>, rc::gen::detail::Recipe) ()
#4  0x00005555559b4a03 in rc::Shrinkable<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe> >::ShrinkableImpl<rc::shrinkable::detail::JustShrinkShrinkable<rc::Shrinkable<std::pair<rc::detail::FunctionTraitsImpl<std::decay<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >::type>::ReturnType, rc::gen::detail::Recipe> > rc::gen::detail::shrinkableWithRecipe<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >(rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)>, rc::gen::detail::Recipe)::{lambda()#1}, rc::Shrinkable<std::pair<rc::detail::FunctionTraitsImpl<std::decay<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >::type>::ReturnType, rc::gen::detail::Recipe> > rc::gen::detail::shrinkableWithRecipe<rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)> >(rc::detail::PropertyAdapter<void (*)(CKey const&, CKey const&), void (CKey const&, CKey const&)>, rc::gen::detail::Recipe)::{lambda(std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe>&&)#2}> >::value() const ()
#5  0x0000555556203b21 in rc::Shrinkable<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe> >::value() const ()
#6  0x00005555561fdad3 in rc::shrinkable::detail::MapShrinkable<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe>, rc::detail::mapToCaseDescription(rc::Gen<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe> >)::{lambda(std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe>&&)#1}>::value() const ()
#7  0x00005555561fd982 in rc::Shrinkable<rc::detail::CaseDescription>::ShrinkableImpl<rc::shrinkable::detail::MapShrinkable<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe>, rc::detail::mapToCaseDescription(rc::Gen<std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe> >)::{lambda(std::pair<rc::detail::TaggedResult, rc::gen::detail::Recipe>&&)#1}> >::value() const ()
#8  0x000055555621055b in rc::Shrinkable<rc::detail::CaseDescription>::value() const ()
#9  0x000055555620f036 in rc::detail::searchProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestParams const&, rc::detail::TestListener&) ()
#10 0x000055555620f66b in rc::detail::(anonymous namespace)::doTestProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestParams const&, rc::detail::TestListener&) ()
#11 0x000055555620fb8c in rc::detail::testProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestMetadata const&, rc::detail::TestParams const&, rc::detail::TestListener&) ()
#12 0x00005555561ec0ce in rc::detail::checkProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestMetadata const&, rc::detail::TestParams const&, rc::detail::TestListener&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, rc::detail::Reproduce, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, rc::detail::Reproduce> > > const&) ()
#13 0x00005555561ec2be in rc::detail::checkProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestMetadata const&, rc::detail::TestParams const&, rc::detail::TestListener&) ()
#14 0x00005555561ec322 in rc::detail::checkProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestMetadata const&, rc::detail::TestParams const&) ()
#15 0x00005555561ec37b in rc::detail::checkProperty(rc::Gen<rc::detail::CaseDescription> const&, rc::detail::TestMetadata const&) ()
#16 0x00005555559af306 in void rc::detail::checkBoostTest<void (*)(CKey const&, CKey const&)>(void (*&&)(CKey const&, CKey const&)) ()
#17 0x00005555559a7763 in key_properties::key_uniqueness_invoker() ()
#18 0x000055555601a5d1 in boost::function0<void>::operator() (this=0x555556a41058) at ./boost/function/function_template.hpp:759
#19 0x0000555556019cb1 in boost::detail::forward::operator() (this=0x7fffffffd1b8) at ./boost/test/impl/execution_monitor.ipp:1300
#20 0x000055555601a9dc in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke (function_obj_ptr=...)
    at ./boost/function/function_template.hpp:138
#21 0x000055555601a7b9 in boost::function0<int>::operator() (this=0x7fffffffd1b0) at ./boost/function/function_template.hpp:760
#22 0x0000555556019f61 in boost::detail::do_invoke<boost::shared_ptr<boost::detail::translator_holder_base>, boost::function<int ()> >(boost::shared_ptr<boost::detail::translator_holder_base> const&, boost::function<int ()> const&) (tr=..., F=...) at ./boost/test/impl/execution_monitor.ipp:281
#23 0x00005555560188b2 in boost::execution_monitor::catch_signals(boost::function<int ()> const&) (
    this=0x5555569ee100 <boost::unit_test::singleton<boost::unit_test::unit_test_monitor_t>::instance()::the_inst>, F=...)
    at ./boost/test/impl/execution_monitor.ipp:864
#24 0x0000555556018a36 in boost::execution_monitor::execute(boost::function<int ()> const&) (
    this=0x5555569ee100 <boost::unit_test::singleton<boost::unit_test::unit_test_monitor_t>::instance()::the_inst>, F=...)
    at ./boost/test/impl/execution_monitor.ipp:1203
#25 0x00005555560196b0 in boost::execution_monitor::vexecute(boost::function<void ()> const&) (
    this=0x5555569ee100 <boost::unit_test::singleton<boost::unit_test::unit_test_monitor_t>::instance()::the_inst>, F=...)
    at ./boost/test/impl/execution_monitor.ipp:1309
#26 0x0000555555fb5d84 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (
    this=0x5555569ee100 <boost::unit_test::singleton<boost::unit_test::unit_test_monitor_t>::instance()::the_inst>, func=..., timeout=0)
    at ./boost/test/impl/unit_test_monitor.ipp:46
#27 0x0000555555f6c445 in boost::unit_test::framework::state::execute_test_tree (
    this=0x5555569edf20 <boost::unit_test::framework::impl::(anonymous namespace)::s_frk_state()::the_inst>, tu_id=65838, timeout=0, 
    p_random_generator=0x0) at ./boost/test/impl/framework.ipp:717
#28 0x0000555555f6bdb1 in boost::unit_test::framework::state::execute_test_tree (
    this=0x5555569edf20 <boost::unit_test::framework::impl::(anonymous namespace)::s_frk_state()::the_inst>, tu_id=68, timeout=0, 
    p_random_generator=0x0) at ./boost/test/impl/framework.ipp:666
#29 0x0000555555f6bdb1 in boost::unit_test::framework::state::execute_test_tree (
    this=0x5555569edf20 <boost::unit_test::framework::impl::(anonymous namespace)::s_frk_state()::the_inst>, tu_id=1, timeout=0, p_random_generator=0x0)
    at ./boost/test/impl/framework.ipp:666
#30 0x0000555555f650ce in boost::unit_test::framework::run (id=1, continue_test=true) at ./boost/test/impl/framework.ipp:1442
#31 0x0000555555fb2287 in boost::unit_test::unit_test_main (init_func=0x55555567bbd0 <init_unit_test_suite(int, char**)>, argc=3, argv=0x7fffffffe708)
    at ./boost/test/impl/unit_test_main.ipp:231
#32 0x0000555555fb2588 in main (argc=3, argv=0x7fffffffe708) at ./boost/test/impl/unit_test_main.ipp:286

@fanquake fanquake force-pushed the latest-rapidcheck branch from d4de513 to ac67582 Compare March 24, 2019 05:27
@fanquake fanquake changed the title [wip] depends: latest rapidcheck, enable property based tests on Travis depends: latest RapidCheck Mar 24, 2019
@bitcoin bitcoin deleted a comment from DrahtBot Mar 24, 2019
@DrahtBot
Copy link
Contributor

Gitian builds for commit 7b13c64 (master):

Gitian builds for commit b7c9b7cb20b8c748e14e6c3f9b6d90ce4b05b857 (master and this pull):

@fanquake fanquake requested review from Christewart and removed request for Christewart March 25, 2019 04:41
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=9640926223c00af45bce4c7df8b756b5458a89b2ba74cfe3e404467f13ce26df
$(package)_version=3eb9b4ff69f4ff2d9932e8f852c2b2a61d7c20d3
$(package)_download_path=https://github.com/emil-e/rapidcheck/archive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't actually made any changes yet, so I think sticking with upstream is best for now.

@maflcko
Copy link
Member

maflcko commented Mar 25, 2019

utACK ac67582

@Christewart
Copy link
Contributor

utack ac67582

@maflcko maflcko merged commit ac67582 into bitcoin:master Apr 2, 2019
maflcko pushed a commit that referenced this pull request Apr 2, 2019
ac67582 depends: latest rapidcheck, use INSTALL_ALL_EXTRAS (fanquake)

Pull request description:

  This updates RapidCheck to the latest version available from https://github.com/emil-e/rapidcheck.

  RapidCheck now uses the new `RC_INSTALL_ALL_EXTRAS` option, to install the extra `boost_test` packages, which should unblock progress in #14430.

ACKs for commit ac6758:
  MarcoFalke:
    utACK ac67582

Tree-SHA512: a4a4ef0ec09cf61cdc0de241703f5f8e98f6fa92f4024a0fbbf4d4ef91d9d3bc8d662c55d896aced8de68aa9429728b2bc5001c91c6f92d63d60c47f5adf41a0
@fanquake fanquake deleted the latest-rapidcheck branch January 22, 2020 11:29
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Feb 27, 2020
Summary:
```
This updates RapidCheck to the latest version available from
https://github.com/emil-e/rapidcheck.

RapidCheck now uses the new RC_INSTALL_ALL_EXTRAS option, to install the
extra boost_test packages, which should unblock progress in #14430.
```

Backport of core [[bitcoin/bitcoin#14853 | PR14853]].

Depends on D5323.

Test Plan:
Assuming you are running a 64-bit Linux machine:

  cd depends
  RAPIDCHECK=1 make build-linux64
Check the rapidcheck package is built.

  cd .. && mkdir buildLinux64 && cd buildLinux64
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
    -DENABLE_PROPERTY_BASED_TESTS=ON
Check the rapidcheck lib found is the one from the depends.

  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5324
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request May 19, 2020
Summary:
```
This updates RapidCheck to the latest version available from
https://github.com/emil-e/rapidcheck.

RapidCheck now uses the new RC_INSTALL_ALL_EXTRAS option, to install the
extra boost_test packages, which should unblock progress in #14430.
```

Backport of core [[bitcoin/bitcoin#14853 | PR14853]].

Depends on D5323.

Test Plan:
Assuming you are running a 64-bit Linux machine:

  cd depends
  RAPIDCHECK=1 make build-linux64
Check the rapidcheck package is built.

  cd .. && mkdir buildLinux64 && cd buildLinux64
  cmake -GNinja .. \
    -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \
    -DENABLE_PROPERTY_BASED_TESTS=ON
Check the rapidcheck lib found is the one from the depends.

  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5324
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants