Skip to content

Conversation

@vasild
Copy link
Contributor

@vasild vasild commented Oct 26, 2023

Run the unit tests with DEBUG_LOG_OUT in the case of RUN_UNIT_TESTS_SEQUENTIAL.

Because the output would be too big (about 80MB), redirect it to a file and only show relevant bits from it in case of errors.

Resolves #28466

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 26, 2023

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

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK jonatack

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

Conflicts

No conflicts as of last run.

Comment on lines 170 to 192
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about 20 lines of bash code that are impossible to read, likely no one will review, and which are hard to maintain or change in the future.

On a second though, I wonder how often this feature will be needed, or if there is a simpler hack that achieves something similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some of this was already there before. The new code is:

      # find all lines that match 'error: in test_suite/test_case' and extract the test suite and case
      for t in \$(sed -E -n 's/.*error: in \"(.+\\/.+)\":.*/\\1/p' < ${LOG}) ; do
        test_suite=\${t%/*} # e.g. net_tests
        test_case=\${t#*/} # e.g. v2transport_test
        ed -s ${LOG} <<EDCOMMANDS
          /Entering test suite \"\${test_suite}\"/
          /Entering test case \"\${test_case}\"/,/Leaving test case \"\${test_case}\"/p
          q
EDCOMMANDS

I do not think that is too different in terms of complexity from what we already have:

%.cpp.test: %.cpp
        @echo Running tests: $$(\
          cat $< | \
          grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
          cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
        ) from $<
        $(AM_V_at)export TEST_LOGFILE=$(abs_builddir)/$$(\
          echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/ \
        ) && \
        $(TEST_BINARY) --catch_system_errors=no -l test_suite -t "$$(\
          cat $< | \
          grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" | \
          cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
        )" -- DEBUG_LOG_OUT > "$$TEST_LOGFILE" 2>&1 || (cat "$$TEST_LOGFILE" && false)

If you find ed hard to read then I could change it to another language (python?) but I suspect it is going to be more lines of code. I any case, I don't think that's prohibitively complex task: "find 'Entering test suite', after that print the lines between 'Entering test case' and 'Leaving test case'".

Some extra escaping is needed because this is inside bash -c "here;". What is the point of doing that, given that this is already a bash script? I guess doing just here; should have the same effect.

I wonder how often this feature will be needed

This I do not know, but I know that when a test fails on CI that depends on a particular seed, having that seed is a game changer for fixing the bug.

Another option would be to print the seed unconditionally, even if DEBUG_LOG_OUT is not defined. But having the debug log in case of failure is useful beyond the rng seed.

Copy link
Member

Choose a reason for hiding this comment

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

Another option would be to print the seed unconditionally

Sure, why not?

To extend my previous feedback, on why this bash code isn't ideal:

  • It assumes a specific unit test output format, so if boost is removed or if the format or wording changes, the code will silently stop to work
  • Putting the bash code into a string and then executing the string makes it impossible to check with shellcheck. And also manual review is hard, because everything is escaped.
  • How does it interact with set -ex in the script? Is the error code properly propagated in all cases? We've had tests in the past that silently passed regardless of the result, so it would be good to not accidentally re-introduce that. Doing output parsing in bash makes it easy to discard the error code, for example when adding a pipe but no pipefail.

I do not think that is too different in terms of complexity from what we already have:

Pretty sure this will go away with cmake, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another option would be to print the seed unconditionally

Sure, why not?

Yeah, this will solve the original issue with the seed. But I think this PR has a wider benefit of seeing the debug log for any type of failure, like in the RUN_UNIT_TESTS case.

To extend my previous feedback, on why this bash code isn't ideal:

Thanks, that makes it easier to understand and address.

  • It assumes a specific unit test output format, so if boost is removed or if the format or wording changes, the code will silently stop to work

True, but that will not remain unnoticed (as long as somebody cares to look at the log after a failure) and should be easy to adjust. This can use test_bitcoin --log_format=XML or JUNIT. Even with that the point is still valid - if the format is changed then this would have to be adjusted. I think the benefit of seeing the debug log outweights the need to possibly have to adjust this in the future.

  • Putting the bash code into a string and then executing the string makes it impossible to check with shellcheck. And also manual review is hard, because everything is escaped.

I agree, removed the bash -c "..." surrounding. Why is that used all over the place in 06_script_b.sh?

  • How does it interact with set -ex in the script? Is the error code properly propagated in all cases? We've had tests in the past that silently passed regardless of the result, so it would be good to not accidentally re-introduce that. Doing output parsing in bash makes it easy to discard the error code, for example when adding a pipe but no pipefail.

It works correctly - if ! command that fails ; then foo ; exit 1; fi the failing command will not trigger the exit due to set -e and will execute all commands inside the if body. I put exit 1 at the end to terminate the script because being inside the if means the command failed.

I do not think that is too different in terms of complexity from what we already have:

Pretty sure this will go away with cmake, no?

Good point. And actually my argument was flawed - already having some "bad" code is not enough justification, alone, to add more of the same.

Copy link
Member

@maflcko maflcko Oct 27, 2023

Choose a reason for hiding this comment

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

I agree, removed the bash -c "..." surrounding. Why is that used all over the place in 06_script_b.sh?

It is a leftover from the travis integration that started to use Docker initially, I think.

Edit: Yes, see 59e9688

I was thinking about getting rid of it. Maybe even completely rewrite the whole script in a sane language, instead of "rewriting" half of it from bash to bash.

@vasild
Copy link
Contributor Author

vasild commented Oct 27, 2023

fd4ba89575...67f3a76a0a: improve readability

@vasild
Copy link
Contributor Author

vasild commented Oct 27, 2023

67f3a76a0a...1bc0914143: add quotes around ${variables} to pet the linter

@maflcko
Copy link
Member

maflcko commented Oct 30, 2023

CI:

+ '[' -n '' ']'
+ '[' false = true ']'
+ '[' true = true ']'
+ LOG=/ci_container_base/ci/scratch/build/test_bitcoin.log
+ DIR_UNIT_TEST_DATA=/ci_container_base/ci/scratch/qa-assets/unit_test_data/ LD_LIBRARY_PATH=/ci_container_base/depends/x86_64-pc-linux-gnu/lib /ci_container_base/ci/scratch/out/bin/test_bitcoin --catch_system_errors=no -l test_suite -- DEBUG_LOG_OUT
++ sed -E -n 's|.*error: in "(.+)/(.+)":.*|\1 \2|p'
+ FAILED_TESTS=
+ printf 'Error: the following tests failed from test_bitcoin:\n%s\n' ''
Error: the following tests failed from test_bitcoin:

+ read test_suite test_case
+ ed -s /ci_container_base/ci/scratch/build/test_bitcoin.log
/ci_container_base/ci/test/06_script_b.sh: line 185: ed: command not found

Exit status: 127����������������

@vasild vasild marked this pull request as draft October 31, 2023 08:15
@vasild
Copy link
Contributor Author

vasild commented Oct 31, 2023

previous releases, qt5 dev package and depends packages, DEBUG does not run anymore in my personal github repository (due to "No public persistent worker pools found!"). I will push a few times here, sorry for the noise. Converted to Draft.

@vasild
Copy link
Contributor Author

vasild commented Oct 31, 2023

I deliberately broke some tests to see how this will report the failures. Looks good:

CI log from artificial failures
+ LOG=/ci_container_base/ci/scratch/build/test_bitcoin.log
+ DIR_UNIT_TEST_DATA=/ci_container_base/ci/scratch/qa-assets/unit_test_data/
+ LD_LIBRARY_PATH=/ci_container_base/depends/x86_64-pc-linux-gnu/lib
+ /ci_container_base/ci/scratch/out/bin/test_bitcoin --catch_system_errors=no --color_output=false --log_level=test_suite -- DEBUG_LOG_OUT
++ sed -E -n 's|.*error: in "(.+)/(.+)":.*|\1 \2|p'
++ sort -u
+ FAILED_TESTS='arith_uint256_tests basics
crypto_tests hmac_sha256_testvectors
crypto_tests ripemd160_testvectors
uint256_tests basics'
+ printf 'Error: the following tests failed from test_bitcoin:\n%s\n' 'arith_uint256_tests basics
crypto_tests hmac_sha256_testvectors
crypto_tests ripemd160_testvectors
uint256_tests basics'
Error: the following tests failed from test_bitcoin:
arith_uint256_tests basics
crypto_tests hmac_sha256_testvectors
crypto_tests ripemd160_testvectors
uint256_tests basics
+ read test_suite test_case
+ ed -s /ci_container_base/ci/scratch/build/test_bitcoin.log
test/arith_uint256_tests.cpp(18): Entering test suite "arith_uint256_tests"
test/arith_uint256_tests.cpp(68): Entering test case "basics"
test/arith_uint256_tests.cpp(70): error: in "arith_uint256_tests/basics": check false has failed
test/arith_uint256_tests.cpp(68): Leaving test case "basics"; testing time: 1726us
+ read test_suite test_case
+ ed -s /ci_container_base/ci/scratch/build/test_bitcoin.log
test/crypto_tests.cpp(28): Entering test suite "crypto_tests"
test/crypto_tests.cpp(459): Entering test case "hmac_sha256_testvectors"
2023-10-31T09:08:26.365840Z [test] [test/util/random.cpp:31] [Seed] Seed: Setting random seed for current tests to RANDOM_CTX_SEED=c5cfe029b57c3d3e34ab62c0a41c092b5bdbf67486eab8f3ec47f86ef0ca536e
2023-10-31T09:08:26.365877Z [test] [init/common.cpp:153] [LogPackageVersion] Bitcoin Core version v26.99.0-86ddf78fc463-dirty (debug build)
2023-10-31T09:08:26.366041Z [test] [kernel/context.cpp:24] [Context] Using the 'x86_shani(1way,2way)' SHA256 implementation
2023-10-31T09:08:26.366052Z [test] [random.cpp:98] [ReportHardwareRand] Using RdSeed as an additional entropy source
2023-10-31T09:08:26.366058Z [test] [random.cpp:101] [ReportHardwareRand] Using RdRand as an additional entropy source
2023-10-31T09:08:26.366695Z [test] [script/sigcache.cpp:103] [InitSignatureCache] Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
2023-10-31T09:08:26.367058Z [test] [validation.cpp:1831] [InitScriptExecutionCache] Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
test/crypto_tests.cpp(38): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(51): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/hmac_sha256_testvectors": check hash == out has failed
test/crypto_tests.cpp(459): Leaving test case "hmac_sha256_testvectors"; testing time: 8277us
+ read test_suite test_case
+ ed -s /ci_container_base/ci/scratch/build/test_bitcoin.log
test/crypto_tests.cpp(28): Entering test suite "crypto_tests"
test/crypto_tests.cpp(368): Entering test case "ripemd160_testvectors"
2023-10-31T09:08:26.191363Z [test] [test/util/random.cpp:31] [Seed] Seed: Setting random seed for current tests to RANDOM_CTX_SEED=c5cfe029b57c3d3e34ab62c0a41c092b5bdbf67486eab8f3ec47f86ef0ca536e
2023-10-31T09:08:26.191426Z [test] [init/common.cpp:153] [LogPackageVersion] Bitcoin Core version v26.99.0-86ddf78fc463-dirty (debug build)
2023-10-31T09:08:26.191610Z [test] [kernel/context.cpp:24] [Context] Using the 'x86_shani(1way,2way)' SHA256 implementation
2023-10-31T09:08:26.191626Z [test] [random.cpp:98] [ReportHardwareRand] Using RdSeed as an additional entropy source
2023-10-31T09:08:26.191632Z [test] [random.cpp:101] [ReportHardwareRand] Using RdRand as an additional entropy source
2023-10-31T09:08:26.192320Z [test] [script/sigcache.cpp:103] [InitSignatureCache] Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements
2023-10-31T09:08:26.192683Z [test] [validation.cpp:1831] [InitScriptExecutionCache] Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements
test/crypto_tests.cpp(38): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(55): error: in "crypto_tests/ripemd160_testvectors": check hash == out has failed
test/crypto_tests.cpp(368): Leaving test case "ripemd160_testvectors"; testing time: 164979us
+ read test_suite test_case
+ ed -s /ci_container_base/ci/scratch/build/test_bitcoin.log
test/uint256_tests.cpp(18): Entering test suite "uint256_tests"
test/uint256_tests.cpp(75): Entering test case "basics"
test/uint256_tests.cpp(125): error: in "uint256_tests/basics": check 0 has failed
test/uint256_tests.cpp(75): Leaving test case "basics"; testing time: 207us
+ read test_suite test_case
+ exit 1

@vasild vasild marked this pull request as ready for review October 31, 2023 12:45
@jonatack
Copy link
Member

Concept ACK.

(Maybe unrelated, but the Win64 CI task is one I've often wished for more debug info from when a unit test fails.)

@vasild
Copy link
Contributor Author

vasild commented Dec 1, 2023

e3ade1fbc1...2b7888ec3e: rebase due to conflicts and add the ed package to CI_BASE_PACKAGES (see #28736 (comment)).

@vasild
Copy link
Contributor Author

vasild commented Jan 16, 2024

2b7888ec3e...57e8bc6b31: rebase due to conflicts

@achow101
Copy link
Member

achow101 commented Apr 9, 2024

The PR didn't seem to attract much attention in the past. Also, the issue seems not important enough right now to keep it sitting around idle in the list of open PRs.

Closing due to lack of interest.

@achow101 achow101 closed this Apr 9, 2024
@maflcko
Copy link
Member

maflcko commented Apr 9, 2024

To add some context. I think it would be nice to print the seed. However, the changes here had to be pushed several times, because the bash code was wrong, and the current version passes CI, but it is unclear if the bash code is correct.

For example, it seems better to fail CI on a test failure and not print the seed, than to print the seed and not fail the CI on a test failure.

@bitcoin bitcoin locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run all CI unit tests with DEBUG_LOG_OUT

6 participants