Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Make combine_logs.py handle multi-line logs #14051

Merged

Conversation

Projects
None yet
3 participants
@jnewbery
Copy link
Member

commented Aug 24, 2018

combine_logs.py currently inserts additional newlines into multi-line
log messages, and doesn't color them properly. Fix both of those.

[Tests] Make combine_logs.py handle multi-line logs
combine_logs.py currently inserts additional newlines into multi-line
log messages, and doesn't color them properly. Fix both of those.

@jnewbery jnewbery force-pushed the jnewbery:improve_multi_line_logs_in_combine_logs branch to 995dd89 Aug 24, 2018

@fanquake fanquake added the Tests label Aug 24, 2018

@laanwj

This comment has been minimized.

Copy link
Member

commented Aug 27, 2018

I've fixed this once as well in the past but never got to submitting a PR
Thanks!

utACK 995dd89

@laanwj

This comment has been minimized.

Copy link
Member

commented Aug 27, 2018

Tried to test, but it doesn't work as expected:

output of test/functional/feature_rbf.py --nocleanup
then test/functional/combine_logs.py /tmp/testpdobtlfa

before:

 node0 
2018-04-25T09:45:43Z 

2018-04-25T09:45:43Z Bitcoin Core version v0.16.99.0-7192b8f (release build)

2018-04-25T09:45:43Z InitParameterInteraction: parameter interaction: -bind set -> setting -listen=1

2018-04-25T09:45:43Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1

2018-04-25T09:45:43Z Validating signatures for all blocks.

2018-04-25T09:45:43Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000

2018-04-25T09:45:43Z Using the 'standard' SHA256 implementation

2018-04-25T09:45:43Z Default data directory /home/orion/.bitcoin

2018-04-25T09:45:43Z Using data directory /store/orion/projects/bitcoin/bitcoin/test/cache/node0/regtest

2018-04-25T09:45:43Z Using config file /store/orion/projects/bitcoin/bitcoin/test/cache/node0/bitcoin.conf

2018-04-25T09:45:43Z Using at most 125 automatic connections (1024 file descriptors available)

2018-04-25T09:45:44Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements

2018-04-25T09:45:44Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements

2018-04-25T09:45:44Z Using 6 threads for script verification

2018-04-25T09:45:44Z scheduler thread start

2018-04-25T09:45:44Z HTTP: creating work queue of depth 16

after:

 node0                                    2018-04-25T09:45:43Z  
                                   2018-04-25T09:45:43Z Bitcoin Core version v0.16.99.0-7192b8f (release build)
                                   2018-04-25T09:45:43Z InitParameterInteraction: parameter interaction: -bind set -> setting -listen=1
                                   2018-04-25T09:45:43Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
                                   2018-04-25T09:45:43Z Validating signatures for all blocks.
                                   2018-04-25T09:45:43Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000
                                   2018-04-25T09:45:43Z Using the 'standard' SHA256 implementation
                                   2018-04-25T09:45:43Z Default data directory /home/orion/.bitcoin
                                   2018-04-25T09:45:43Z Using data directory /store/orion/projects/bitcoin/bitcoin/test/cache/node0/regtest
                                   2018-04-25T09:45:43Z Using config file /store/orion/projects/bitcoin/bitcoin/test/cache/node0/bitcoin.conf
                                   2018-04-25T09:45:43Z Using at most 125 automatic connections (1024 file descriptors available)
                                   2018-04-25T09:45:44Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements

both before and after don't really make sense, or am I doing something wrong?

@jnewbery

This comment has been minimized.

Copy link
Member Author

commented Aug 27, 2018

@laanwj - your logs aren't using microseconds, although that should be set here:

I wonder if you're using an ancient cache from before microseconds were being used. Can you delete the /test/cache directory and try again?

I've added an extra commit that handles timestamps without microseconds.

@laanwj

This comment has been minimized.

Copy link
Member

commented Aug 28, 2018

I've added an extra commit that handles timestamps without microseconds.

huh I also remember doing that before, have a very strong deja-vu here :)

will re-test, thanks!

edit: works for me, both before and after removing cache
utACK 16e288a

@laanwj laanwj merged commit 16e288a into bitcoin:master Aug 28, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Aug 28, 2018

Merge #14051: [Tests] Make combine_logs.py handle multi-line logs
16e288a test padding non micro timestamps (John Newbery)
995dd89 [Tests] Make combine_logs.py handle multi-line logs (John Newbery)

Pull request description:

  combine_logs.py currently inserts additional newlines into multi-line
  log messages, and doesn't color them properly. Fix both of those.

Tree-SHA512: dbe2f3ecc7cfbc95ee4350e648d127538c79cb6555257d4aeec12fe3d159366742b68e90e620c8ed7219a44b973395c7e5929ba374fae115fbee25560db645f6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.