Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > While looking at the "git describe" tests due to the on-list > %(describe) discussion I discovered that the feature added in > 30b1c7ad9d (describe: don't abort too early when searching tags, > 2020-02-26) has never been tested for. > > This is because it defined a custom test function that called > test_expect_success, which then got called inside another top-level > test_expect_success. Thus even if it failed we'd pass the test. Thanks. I think I've seen something similar recently. I wonder if it is an easy mistake our test linter can catch. > This series fixes that issue, and makes some general improvements to > the "describe" tests. I then make test_expect_{success,failure} return > 1 to catch these sorts of issues in the future, which required fixes > to a couple of svn tests that ran with "set -e". OK. > I was on the fence about whether to send this after the recent rc0, > but figured that since it's test-only Junio might want to pick it up, Even if it is too late, giving earlier exposure would by itself be a good thing (just don't forget to resend after the dust settles, so that it would land eventually). > and possibly for the next rc in case we'd like to do some pre-release > testing for this never-before-tested feature added in 2.26.0 (although > the actual implementation looks fine to me). Thanks; it obviously is a lower priority as we have survived with the broken test for a long time since 2.26 ;-) > Ævar Arnfjörð Bjarmason (10): > describe tests: improve test for --work-tree & --dirty > describe tests: refactor away from glob matching > describe tests: always assert empty stderr from "describe" > test-lib functions: add an --annotated-tag option to "test_commit" > describe tests: convert setup to use test_commit > describe tests: fix nested "test_expect_success" call > describe tests: support -C in "check_describe" > svn tests: remove legacy re-setup from init-clone test > svn tests: refactor away a "set -e" in test body > test-lib: return 1 from test_expect_{success,failure} > > t/t1403-show-ref.sh | 6 +- > t/t6120-describe.sh | 193 +++++++++++++++------------------- > t/t9117-git-svn-init-clone.sh | 6 -- > t/t9148-git-svn-propset.sh | 27 ++--- > t/test-lib-functions.sh | 20 +++- > 5 files changed, 122 insertions(+), 130 deletions(-)