Skip to content

test: Add bitcoin-util tests (+refactors) - #22270

Merged
maflcko merged 6 commits into
bitcoin:masterfrom
maflcko:2106-utilTestDoc
Jun 24, 2021
Merged

maflcko merged 6 commits into
bitcoin:masterfrom
maflcko:2106-utilTestDoc

Conversation

@maflcko

@maflcko maflcko commented Jun 17, 2021 •

Copy link
Copy Markdown
Member

@maflcko
maflcko force-pushed the 2106-utilTestDoc branch from 9892372 to fa97dac Compare June 17, 2021 12:52
@laanwj laanwj added the Docs label Jun 17, 2021
@maflcko
maflcko force-pushed the 2106-utilTestDoc branch 3 times, most recently from 848f055 to fa84ada Compare June 17, 2021 14:57
@laanwj laanwj added this to the 22.0 milestone Jun 17, 2021
@theStack

Copy link
Copy Markdown
Contributor

Concept ACK

@maflcko
maflcko force-pushed the 2106-utilTestDoc branch from fa84ada to fa2edd9 Compare June 17, 2021 16:00

@jamesob jamesob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK fa84adab8c64fd626b111cfea220bf7606fa4d53 (jamesob/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util)

Built locally and ran ./test/util/bitcoin-util-test.py and played with ./src/bitcoin-util grind.

Changes look fine. Some nice import cleanups and minor code simplification.

Show signature data

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK fa84adab8c64fd626b111cfea220bf7606fa4d53 ([`jamesob/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.add_missing_bitcoin_util))

Built locally and ran ./test/util/bitcoin-util-test.py and played with `./src/bitcoin-util grind`. 

Changes look fine. Some nice import cleanups and minor code simplification.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEGNRVI1NPYuZCSIrGepNdrbLETwUFAmDLgGsACgkQepNdrbLE
TwWFIxAAkDsuAmOwatxePesAqX4Y40jueFJRKhoZ6wgigxoV965S42AVxPQEOKeV
2M1LX0pLH5k4J1KkJuBPPh0SX+NNq4jRFAmOI2QYMXMaqK/qurPO/JTObT/M/YEZ
wVTl8wK7UJPesE71yf2KxtPgBv5bl+38HLa12S8+sZahpJ5e+sis+qXnDhEnod+o
Ljxi+36AvbVussuOkqbJoUxku6LfvCReQd4ilYww/9nuPT2r7fz5G7YehI95+QdR
u5j0xynvai0WvJDrLonZjcRfoCHOdQDZ16BDxvqyvLtlMdA0Jehh2YzK/4MQ3tWb
6JIDmHffNgTKUeEz5AE2X+PRDfVaqqFAJ0GtnrwYq6/tk6NXyJ5xkjHqW9QUwU6W
TIZC7E6zBWE9vHByLz4mh2ziFLGqJbVZSMJwkeOzqE+OPurOnDzcVPVgiJlVOklD
odmJwCCziQIGBFGTL2+BsEexqwMtnaUOJMOm84UlAMyrWMb7SBnyKKka4FtsAnVf
UbHJzckvPSCaQ6k0HNItzGfiqvSeQfzWbYhKJPe1MG1LwXVxHhRDuOpr7EC17IsC
Qc61guZ/U0Go3lmAQgnV/EHqea0XeeuD452pZizt/Qw/417b+JGbRjj0bknUx70b
KSW8JxPuyuoyA3ZZ8QIq2ZmWlLhpzRM6L5dKClxKteFwGv1iI54=
=q1fJ
-----END PGP SIGNATURE-----

Show platform data

Tested on Linux-4.19.0-16-amd64-x86_64-with-glibc2.28

Configured with ./configure LDFLAGS=-L/home/james/src/bitcoin2/db4/lib/ CPPFLAGS=-I/home/james/src/bitcoin2/db4/include/ CXXFLAGS=-fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -Wsign-compare -Werror=thread-safety-analysis --enable-wallet --enable-debug --with-daemon --enable-natpmp-default

Compiled with /usr/bin/ccache /usr/local/bin/clang++ -std=c++17 -mavx -mavx2 -fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -Wsign-compare -Werror=thread-safety-analysis -O0 -g3 -ftrapv -fdebug-prefix-map=$(abs_srcdir)=.  -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -msse4 -msha -msse4.1 -msse4.2  i

Compiler version: Debian clang version 11.1.0-++20210405104510+1fdec59bffc1-1~exp1~20210405085125.161

@jamesob

jamesob commented Jun 17, 2021

Copy link
Copy Markdown
Contributor

reACK fa2edd9 after examining range-diff.

@laanwj laanwj added the Tests label Jun 17, 2021
@DrahtBot

DrahtBot commented Jun 17, 2021 •

Copy link
Copy Markdown
Contributor

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

Conflicts

No conflicts as of last run.

@practicalswift

Copy link
Copy Markdown
Contributor

Concept ACK

@maflcko
maflcko force-pushed the 2106-utilTestDoc branch from fa2edd9 to 5555dc9 Compare June 17, 2021 20:00
@maflcko maflcko changed the title Add missing bitcoin-util help doc and tests test: Add bitcoin-util tests Jun 17, 2021
@maflcko maflcko removed the Docs label Jun 17, 2021
@maflcko maflcko changed the title test: Add bitcoin-util tests test: Add bitcoin-util tests (+refactors) Jun 17, 2021
@maflcko
maflcko force-pushed the 2106-utilTestDoc branch from 5555dc9 to fa4017e Compare June 18, 2021 18:14
@maflcko

maflcko commented Jun 18, 2021

Copy link
Copy Markdown
Member Author

Rebased due to silent merge conflict

@klementtan klementtan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review and tested ACK fa4017e

Tested with:
$ ./src/bitcoin-util -signet grind 00000020c9bd670f98b2fd23e609e831221b8fe9f8b9493956778bfc61674fa86d000000300eba3aca1b6ffe05d28bb9ccc37341911943effb9985df89bb0161e3436ef0d0bccd60a569011e95b32301
00000020c9bd670f98b2fd23e609e831221b8fe9f8b9493956778bfc61674fa86d000000300eba3aca1b6ffe05d28bb9ccc37341911943effb9985df89bb0161e3436ef0d0bccd60a569011e95b32301
$ ./src/bitcoin-util -version
Bitcoin Core bitcoin-util utility version v21.99.0-fa4017e7a089
$ ./src/bitcoin-util -help
Bitcoin Core bitcoin-util utility version v21.99.0-fa4017e7a089
...(help man)

@theStack theStack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested ACK fa4017e
(modulo first commit fa831e7, as I don't have a Windows / Visual Studio environment)

Reviewed the code changes, built locally, ran the introduced tests and grinded some early signet block headers, works as expected.

@maflcko

maflcko commented Jun 20, 2021

Copy link
Copy Markdown
Member Author

(modulo first commit fa831e7, as I don't have a Windows / Visual Studio environment)

I don't have Windows either, but the commit was required for the tests to pass on appveyor CI

@jamesob jamesob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reACK fa4017e (jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te)

Built locally, ran bitcoin-util tests.

Show signature data

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

reACK fa4017e7a0899959b2ac84bcbc3f34dfb17b5fce ([`jamesob/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te`](https://github.com/jamesob/bitcoin/tree/ackr/22270.1.MarcoFalke.test_add_bitcoin_util_te))

Built locally, ran bitcoin-util tests.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEGNRVI1NPYuZCSIrGepNdrbLETwUFAmDTnJkACgkQepNdrbLE
TwWViQ/6ArDUV5umNaPEu2IPKwTC4h1sExbyxZW7x/JQmG0qWWrENWLpl4kAqXFx
fh4wYd1OhQyTI6RB3pNnnLLzZOjlgTi3pZ2ufLsp+WKcYbRMBxOagveMj3700ju2
lSNaYnwvw5viFhBvHMnRRQHrCMRlHqC1cOZoLnktrFeF1P1wTGvfQUCE0siwAXaB
9sNOhoncX8SDwS4g29MdKy6geCTwPeXXbd3kkZUxxGoXTfz0hutD1p7rcHhrWj1/
zJTGepQmI+dinZDm3sWKdwgYPWrzGUAgNnxntpFevjWgI51KpSpN77HBPzy2RBZm
qear5Vku2W+M7x9Lt0sjPG3o10kQzzUFPpVYSueb0GqAdCHSdUDrko05TfBtj+/a
0QOlIl6UxN1oNrDLIbtUpFb+1HNsTfYmpeMe1ajXS/m2UsgH0V32hq85VFpcCzmv
0AGeLIqvg+9xNXH0I2/3Ldkexvb+BerZzCd188jxjnnEj6W7FuOlInVCexz7/GIq
W71CTM+xk4PPQim9eJOO5gEc4RMbKZvSqQ4ctQaU3v54+iyq/EO3hz9+4/D3VTnt
zYRkkjViU9h3z3sK1Ebl0d8wj1E87FOSR2EN7qieUd9t6yQa1u485ySGDu30CUnx
d9O+//Jz5wqzTYupF+zU//98CiPj3XNfS8wfqichkYg5epsDvs0=
=nBk0
-----END PGP SIGNATURE-----

Show platform data

Tested on Linux-4.19.0-17-amd64-x86_64-with-glibc2.28

Configured with ./configure LDFLAGS=-L/home/james/src/bitcoin/db4/lib/ CPPFLAGS=-I/home/james/src/bitcoin/db4/include/ CXXFLAGS=-fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare --enable-wallet --with-daemon CXX=/usr/local/bin/clang++ CC=/usr/local/bin/clang --with-bignum=no PYTHONPATH= --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental --disable-shared --with-pic --enable-benchmark=no --enable-module-recovery --enable-module-schnorrsig --enable-experimental --no-create --no-recursion

Compiled with /usr/bin/ccache /usr/local/bin/clang++ -std=c++17 -mavx -mavx2 -fPIE -pipe -O2 -g -Wthread-safety-analysis -Wall -Werror=sign-compare -fdebug-prefix-map=$(abs_srcdir)=.  -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection -msse4 -msha -msse4.1 -msse4.2  i

Compiler version: Debian clang version 11.1.0-++20210428103820+1fdec59bffc1-1~exp1~20210428204437.162

@maflcko
maflcko merged commit a196c89 into bitcoin:master Jun 24, 2021
@maflcko
maflcko deleted the 2106-utilTestDoc branch June 24, 2021 09:00
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
Some PRs ago (in #19937) the bitcoin-util binary was added, which we
didn't notice and didn't rename to elements-util. This commit adds
some tests for it, which made me notice it ... so rename it here.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
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.

7 participants