Repository navigation
test: include two more interruptions points - #23782
Conversation
shaavan
left a comment
There was a problem hiding this comment.
Concept ACK
Increasing number of interruption points in the test will make the test more rigorous as the logfile will be scrutinized with more sentences and phrases.
I have some suggestions to improve upon this PR.
Firstly, how about also adding the following phrases to the lines_to_interuppt_after list
- ‘Validating signatures for all blocks’
- ‘Starting HTTP server.’
Secondly, you should reorder the lines in the lines_to_interuppt_after list according to the order in which they appear in the logfile. Using the following patch, you can quickly know the line number in which the phrase appears.
if line and terminate_line.lower() in line.lower():
- self.log.debug(f"Terminating node after {num_lines} log lines seen")
+ self.log.info(f"Terminating node after {num_lines} log lines seen")
sigterm_node()
breakWhen the test is run, this patch will print the phrase with the line number on the terminal.
|
@shaavan your feedback makes a lot of sense. Thank you. I've included your suggested phrases and also re-ordered the array, according to the order they appear on the logs (I didn't notice that they were following this order). |
…re interruption events
|
ACK 618f4d2, pending CI More init coverage is better. 👍 |
|
[Update] Seems that ci is failing for some reason. All the steps of interrupting and re-starting the node seem that are working fine though. Working on debugging. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
| 'net thread start', | ||
| 'addcon thread start', | ||
| 'msghand thread start', | ||
| 'msghand thread start' |
There was a problem hiding this comment.
nit: Any reason to remove the trailing comma? This makes this diff (and potential future ones) larger than necessary.
There was a problem hiding this comment.
@MarcoFalke you are right. Having the comma would have been a better choice, as you are pointing. I see PR is merged already but will keep this in mind for next times. Thank you!
shaavan
left a comment
There was a problem hiding this comment.
The test looks a lot more complete and in order now!
Do you suggest me to also include this change on the PR? or should I leave it back to self.log.debug?
This was just a temporary patch to know the line number of each phrase occurrence. It is better the way it is in the master branch. You wouldn't like to crowd up your terminal each time you run the test :)
I rerun the test with the patch, and I observed there is still some phrases not following the ordering:
Edit: Since this PR is now merged, maybe correcting the ordering could be taken up in a follow-up PR that touches this section.
@shaavan, I also thought that logging too much info would be over-crowding the terminal, so I left it as it was previously. The command was very useful for debugging though :)
I didn't realize 2 lines where the other way around, thank you very much for pointing this and for all your help! |
Summary: Reorganized array according to order of logs and included 4 more interruption events: - 'Checking all blk files are present' - 'init message: Starting network threads' - 'Validating signatures for all blocks' - 'Starting HTTP server' This is a backport of [[bitcoin/bitcoin#23782 | core#23782]] Test Plan: `ninja check-functional` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D12612


This PR aims to introduce 2 more interruption points in the process of initialization, in order to make the
feature_inittestcase more complete. These are the following:-
Checking all blk files are present-
init message: Starting network threadsIt is a small improvement for increasing the coverage of potential interruptions, and making sure that the node can restart successfully after these interruptions.