progress: verify progress counters in the test suite
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | progress: introduce GIT_TEST_CHECK_PROGRESS to verify progress countersprogress.c t/ | +48 | 2 replies | |
| 2/7 | progress: catch nested/overlapping progresses with GIT_TEST_CHECK_PROGRESSprogress.c | +7 | 2 replies | |
| 3/7 | progress: catch backwards counting with GIT_TEST_CHECK_PROGRESSprogress.c t/ | +19 | 0 replies | |
| 4/7 | commit-graph: fix bogus counter in "Scanning merged commits" progress linecommit-graph.c | +1 | 12 replies | |
| 5/7 | entry: show finer-grained counter in "Filtering content" progress lineentry.c | +3 | 0 replies | |
| 6/7 | entry: don't show "Filtering content: ... done." line in case of errorsentry.c | +2 | 3 replies | |
| 7/7 | test-lib: enable GIT_TEST_CHECK_PROGRESS by defaultt/ | +6 | 0 replies |
Reviews trailers per patch
None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Emily Shaffer |
|---|---|
| Series | R-b R-b R-b R-b R-b R-b R-b R-b R-b |
| 1/7 | |
| 2/7 | |
| 3/7 | |
| 4/7 | |
| 5/7 | |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/7] progress: verify progress counters in the test suite
Splitting off from:
https://public-inbox.org/git/[email protected]/T/#me5d3176914d4268fd9f2a96fc63f4e41beb26bd6
Quoted 6 lines · René Scharfe
I wonder (only in a semi-curious way, though) if we can detect off-by-one errors by adding an assertion to
display_progress()that requires the first update to have the value 0, and instop_progress()one that requires the previousdisplay_progress()call to have a value equal to the total number of work items. Not sure it'd be worth the hassle..
I fixed and reported a number of bogus progress lines in the past, the last one during v2.31.0-rc phase, so I've looked into whether progress counters could be automatically validated in our tests, and came up with these patches a few months ago. It turned out that progress counters can be checked easily and transparently in case of progress lines that are shown in the tests, i.e. that are shown even when stderr is not a terminal or are forced with '--progress'. (In other cases it's still fairly easy but not quite transparent, as I think we need changes to the progress API; more on that later in a separate series.)
These checks did uncover a couple of buggy progress lines which are fixed in this series as well, but I'm not sure that the fix presented in patch 6 is the right approach, hence the RFC.
SZEDER Gábor (7):
progress: introduce GIT_TEST_CHECK_PROGRESS to verify progress
counters
progress: catch nested/overlapping progresses with
GIT_TEST_CHECK_PROGRESS
progress: catch backwards counting with GIT_TEST_CHECK_PROGRESS
commit-graph: fix bogus counter in "Scanning merged commits" progress
line
entry: show finer-grained counter in "Filtering content" progress line [RFC] entry: don't show "Filtering content: ... done." line in case of
errors
test-lib: enable GIT_TEST_CHECK_PROGRESS by default
commit-graph.c | 2 +- entry.c | 10 +++--- progress.c | 29 ++++++++++++++-- t/t0500-progress-display.sh | 69 +++++++++++++++++++++++++------------ t/test-lib.sh | 6 ++++ 5 files changed, 86 insertions(+), 30 deletions(-)
Signature · 1 line
2.32.0.289.g44fbea0957