Page MenuHomePhabricator

random: fixes read buffer resizing in RandAddSeedPerfmon

Authored by PiRK on Thu, Nov 25, 09:29.


Group Reviewers
Restricted Project
rABCda2d0950fb64: random: fixes read buffer resizing in RandAddSeedPerfmon

+ Replaces std::max with std::min to resize buffer in RandAddSeedPerfmon
+ Documents behavior of RandAddSeedPerfmon
This is a backport of core#20082

Test Plan

ninja all check-all

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Thu, Nov 25, 09:29

Tail of the build log:

(cat <<EOF
results() {
  set +e
  shopt -s dotglob nullglob
  mv /work/abc-ci-builds/"build-win"/* /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"
export SDK_DL_REMOTE=""
mkdir -p "/root/abc-depends/cache" "/root/abc-depends/osx-sdk" "/root/abc-depends/sources"
./contrib/teamcity/ "build-win"
) >
chmod +x

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

[09:36:04] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script2271963126839043195
[09:36:04] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/jailed-build
[09:36:04] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:36:04] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[09:36:04] :	 [Step 1/1] Building base image for: 89323444a...
[09:36:04] :	 [Step 1/1] ~/buildAgent/work/jailed-build/bitcoin-abc ~/buildAgent/work/jailed-build
[09:36:07] :	 [Step 1/1] ~/buildAgent/work/jailed-build
[09:36:07] :	 [Step 1/1] Tag name: abc-base-image-89323444a
[09:36:30]W:	 [Step 1/1] Traceback (most recent call last):
[09:36:30]W:	 [Step 1/1]   File "./contrib/teamcity/", line 573, in <module>
[09:36:30]W:	 [Step 1/1]     main()
[09:36:30]W:	 [Step 1/1]   File "./contrib/teamcity/", line 562, in main
[09:36:30]W:	 [Step 1/1]     script_dir, config_path,
[09:36:30]W:	 [Step 1/1]   File "./contrib/teamcity/", line 59, in __init__
[09:36:30]W:	 [Step 1/1]     self.load(build_name)
[09:36:30]W:	 [Step 1/1]   File "./contrib/teamcity/", line 82, in load
[09:36:30]W:	 [Step 1/1], list(config.keys())
[09:36:30]W:	 [Step 1/1] AssertionError: build-win is not a valid build identifier. Valid identifiers are ['templates', 'builds']
[09:36:30]W:	 [Step 1/1] mv: missing destination file operand after '/results'
[09:36:30]W:	 [Step 1/1] Try 'mv --help' for more information.
[09:36:34]W:	 [Step 1/1] Process exited with code 1
[09:36:34]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)
[09:36:35]E:	 [Step 1/1] Step Command Line failed
[09:36:35]E: Ant JUnit report watcher
[09:36:35]E:	 [Ant JUnit report watcher] No reports found for paths:
[09:36:35]E:	 [Ant JUnit report watcher] +:results/test_bitcoin.xml
[09:36:35]E:	 [Ant JUnit report watcher] +:results/**/junit_results*.xml
[09:36:35] : Publishing internal artifacts (4s)
[09:36:39] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[09:36:39] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[09:36:35]W: Publishing artifacts (5s)
[09:36:35] :	 [Publishing artifacts] Collecting files to publish: [+:results/**/junit_results*.xml]
[09:36:35]W:	 [Publishing artifacts] Artifacts path 'results/**/junit_results*.xml' not found
[09:36:41] : Build finished

You can ignore the build-win failure. There is no such build target.

This revision is now accepted and ready to land.Thu, Nov 25, 11:10