Skip to content

progress: verify progress counters in the test suite

SZEDER Gábor git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7progress: introduce GIT_TEST_CHECK_PROGRESS to verify progress countersprogress.c t/t0500-progress-display.sh+48 -22 replies
2/7progress: catch nested/overlapping progresses with GIT_TEST_CHECK_PROGRESSprogress.c+7 -02 replies
3/7progress: catch backwards counting with GIT_TEST_CHECK_PROGRESSprogress.c t/t0500-progress-display.sh+19 -220 replies
4/7commit-graph: fix bogus counter in "Scanning merged commits" progress linecommit-graph.c+1 -112 replies
5/7entry: show finer-grained counter in "Filtering content" progress lineentry.c+3 -40 replies
6/7entry: don't show "Filtering content: ... done." line in case of errorsentry.c+2 -13 replies
7/7test-lib: enable GIT_TEST_CHECK_PROGRESS by defaultt/test-lib.sh+6 -00 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.

PatchEmily Shaffer
SeriesR-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.

Read the v1 thread

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 in stop_progress() one that requires the previous display_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