Prevent progress printing 100% if not fully done - #139
Merged
Conversation
Previously we could print a test progress of `100%` even though there were still tests running due to how we might round up, and for projects with huge BTest suite this was pretty likely. With this patch we make sure we _always_ round down to the nearest integer so we don't report "all done" before we are actually done.
This required a small cleanup to `btest-diff` where shellcheck was unable to detect that a function was only used in a trap call; we replaced this with simpler code which does not trigger any warnings.
timwoj
approved these changes
Jun 22, 2026
Member
|
I wondered about that, but not enough to go look at it. I'd love to figure out why zeek-testing/zeek-testing-private don't print out progress either like the rest of the btests too, but again not enough that I've prioritized it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously we could print a test progress of
100%even though therewere still tests running due to how we might round up, and for projects
with huge BTest suite this was pretty likely. With this patch we make
sure we always round down to the nearest integer so we don't report
"all done" before we are actually done.