Page MenuHomePhabricator

[test] add a couple test cases to uint256_tests.cpp
ClosedPublic

Authored by majcosta on Jun 2 2020, 14:10.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC7ed7760657b5: [test] add a couple test cases to uint256_tests.cpp
Summary

make sure template <unsigned int BITS> void base_blob<BITS>::SetHex(const char *psz) properly skips
leading spaces and 0x prefixes

Test Plan
ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Jun 2 2020, 14:10
deadalnix requested changes to this revision.Jun 2 2020, 14:42
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/test/uint256_tests.cpp
268 ↗(On Diff #20784)

Why is it malformatted? Unless I'm missing something, this name is just wrong.

This revision now requires changes to proceed.Jun 2 2020, 14:42

more descriptive names for test variables

Snippet of first build failure:

[15:04:11] :			 [Update checkout directory (/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc)] /usr/bin/git clean -f -d -x
[15:04:11] : Build preparation done
[15:04:11]E: Step 1/2: Command Line (19s)
[15:04:11] :	 [Step 1/2] Ant JUnit report watcher
[15:04:11] :		 [Ant JUnit report watcher] Watching paths:
[15:04:11] :		 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[15:04:11] :		 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[15:04:11] :	 [Step 1/2] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script4727855444140269616
[15:04:11] :	 [Step 1/2] in directory: /home/teamcity/buildAgent/work/jailed-build
[15:04:11] :	 [Step 1/2] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[15:04:11] :	 [Step 1/2] ~/buildAgent/work/jailed-build
[15:04:11] :	 [Step 1/2] Building base image for: f7c601bae...
[15:04:11] :	 [Step 1/2] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[15:04:13] :	 [Step 1/2] ~/buildAgent/work/jailed-build
[15:04:13] :	 [Step 1/2] Tag name: abc-base-image-f7c601bae
[15:04:26]W:	 [Step 1/2] + : build-clang-10
[15:04:26]W:	 [Step 1/2] + '[' -z build-clang-10 ']'
[15:04:26]W:	 [Step 1/2] + echo 'Running build configuration '\''build-clang-10'\''...'
[15:04:26]W:	 [Step 1/2] ++ git rev-parse --show-toplevel
[15:04:26] :	 [Step 1/2] Running build configuration 'build-clang-10'...
[15:04:26]W:	 [Step 1/2] + TOPLEVEL=/work
[15:04:26]W:	 [Step 1/2] + export TOPLEVEL
[15:04:26]W:	 [Step 1/2] + trap print_sanitizers_log ERR
[15:04:26]W:	 [Step 1/2] +++ dirname ./contrib/teamcity/build-configurations.sh
[15:04:26]W:	 [Step 1/2] ++ cd ./contrib/teamcity
[15:04:26]W:	 [Step 1/2] ++ pwd
[15:04:26]W:	 [Step 1/2] + CI_SCRIPTS_DIR=/work/contrib/teamcity
[15:04:26]W:	 [Step 1/2] + DEVTOOLS_DIR=/work/contrib/devtools
[15:04:26]W:	 [Step 1/2] + setup
[15:04:26]W:	 [Step 1/2] + : /work/build
[15:04:26]W:	 [Step 1/2] + mkdir -p /work/build
[15:04:26]W:	 [Step 1/2] ++ cd /work/build
[15:04:26]W:	 [Step 1/2] ++ pwd
[15:04:26]W:	 [Step 1/2] + BUILD_DIR=/work/build
[15:04:26]W:	 [Step 1/2] + export BUILD_DIR
[15:04:26]W:	 [Step 1/2] + cd /work/build
[15:04:26]W:	 [Step 1/2] ++ nproc
[15:04:26]W:	 [Step 1/2] + THREADS=12
[15:04:26]W:	 [Step 1/2] + export THREADS
[15:04:26]W:	 [Step 1/2] + CMAKE_PLATFORMS_DIR=/work/cmake/platforms
[15:04:26]W:	 [Step 1/2] + SAN_SUPP_DIR=/work/test/sanitizer_suppressions
[15:04:26]W:	 [Step 1/2] + SAN_LOG_DIR=/tmp/sanitizer_logs
[15:04:26]W:	 [Step 1/2] + mkdir -p /tmp/sanitizer_logs
[15:04:26]W:	 [Step 1/2] + rm -rf '/tmp/sanitizer_logs/*'
[15:04:26]W:	 [Step 1/2] + export ASAN_OPTIONS=log_path=/tmp/sanitizer_logs/asan.log
[15:04:26]W:	 [Step 1/2] + ASAN_OPTIONS=log_path=/tmp/sanitizer_logs/asan.log
[15:04:26]W:	 [Step 1/2] + export LSAN_OPTIONS=log_path=/tmp/sanitizer_logs/lsan.log
[15:04:26]W:	 [Step 1/2] + LSAN_OPTIONS=log_path=/tmp/sanitizer_logs/lsan.log
[15:04:26]W:	 [Step 1/2] + export TSAN_OPTIONS=log_path=/tmp/sanitizer_logs/tsan.log
[15:04:26]W:	 [Step 1/2] + TSAN_OPTIONS=log_path=/tmp/sanitizer_logs/tsan.log
[15:04:26]W:	 [Step 1/2] + export UBSAN_OPTIONS=log_path=/tmp/sanitizer_logs/ubsan.log
[15:04:26] :	 [Step 1/2] Error: Invalid build name 'build-clang-10'
[15:04:26]W:	 [Step 1/2] + UBSAN_OPTIONS=log_path=/tmp/sanitizer_logs/ubsan.log
[15:04:26]W:	 [Step 1/2] + UNIT_TESTS_JUNIT_LOG_LEVEL=message
[15:04:26]W:	 [Step 1/2] + case "$ABC_BUILD_NAME" in
[15:04:26]W:	 [Step 1/2] + echo 'Error: Invalid build name '\''build-clang-10'\'''
[15:04:26]W:	 [Step 1/2] + exit 2
[15:04:26]W:	 [Step 1/2] cp: cannot stat '/work/ibd/debug.log': No such file or directory
[15:04:31]W:	 [Step 1/2] Process exited with code 2
[15:04:31]E:	 [Step 1/2] Process exited with code 2 (Step: Command Line)
This revision is now accepted and ready to land.Jun 2 2020, 16:41