Page MenuHomePhabricator

tests: Add fuzzing harness for various functions consuming only integrals
ClosedPublic

Authored by Fabien on Oct 27 2020, 16:56.

Details

Summary
Add fuzzing harness for various functions consuming only integrals.

Backport of core PR17109.

The missing corpora change in not needed for us.

Test Plan
ninja bitcoin-fuzzers
./test/fuzz/test_runner.py <path_to_corpus>

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Oct 27 2020, 16:56
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/test/fuzz/integer.cpp
78 ↗(On Diff #25157)

these comments got a bit garbled. can you separate the code-comments and real-comments on separate lines?

This revision is now accepted and ready to land.Oct 27 2020, 22:09

Tail of the build log:

RESULTS_DIR=$(pwd)/results

echo "Building base image for: ${HASH}..."

# Note: ERROR_PREFIX needs to be broken up here because this script gets copied into the build log.
# Not doing this results in all errors being treated as infra failures.
ERROR_PREFIX=$(echo "[Infrastructure" "Error]")
export ERROR_PREFIX

~/infra/ci-wrappers/build-abc-base-image.sh -c ./bitcoin-abc \
  --cachetagname abc-base-image-"${CACHE_HASH}" \
  -t abc-base-image-"${HASH}" debian:buster

(cat <<EOF
results() {
  set +e
  shopt -s dotglob nullglob
  mv /work/abc-ci-builds/"build-without-wallet"/* /results
  chown -R ${ME} /work
  chown -R ${ME} /results
  chown -R ${ME} /root/.ccache
}
trap "results" EXIT
export TEAMCITY_VERSION="2019.2.4 (build 72059)"
export BASE_CACHE="/root/abc-depends/cache"
export SDK_ARCHIVE_DIR="/root/abc-depends/osx-sdk"
export SOURCES_PATH="/root/abc-depends/sources"
mkdir -p "/root/abc-depends/cache" "/root/abc-depends/osx-sdk" "/root/abc-depends/sources"
./contrib/teamcity/build-configurations.py "build-without-wallet"
EOF
) > run-command.sh
chmod +x run-command.sh

~/infra/docker/docker-run.sh \
  -a "-v /home/teamcity/.ccache:/root/.ccache -v /home/teamcity/.abc-depends:/root/abc-depends -v "${RESULTS_DIR}":/results" \
  -c run-command.sh /work/run-command.sh abc-base-image-"${HASH}" ./run-command.sh

[08:17:06] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script1771418231942229694
[08:17:06] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/jailed-build
[08:17:06] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[08:17:06] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[08:17:06] :	 [Step 1/1] Building base image for: b9551768e...
[08:17:06] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[08:17:07] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[08:17:07] :	 [Step 1/1] Tag name: abc-base-image-b9551768e
[08:17:28]W:	 [Step 1/1] Error response from daemon: transport is closing: unavailable
[08:17:28]W:	 [Step 1/1] Process exited with code 1
[08:17:28]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[08:17:29]E:	 [Step 1/1] Step Command Line failed
[08:17:29]E: Ant JUnit report watcher
[08:17:29]E:	 [Ant JUnit report watcher] No reports found for paths:
[08:17:29]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[08:17:29]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[08:17:29] : Publishing internal artifacts (4s)
[08:17:33] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[08:17:33] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[08:17:29]W: Publishing artifacts (4s)
[08:17:29] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[08:17:29]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[08:17:35] : Build finished
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.