Skip to content

minor test-hashmap fixes

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6test-hashmap: use ALLOC_ARRAY rather than bare malloct/helper/test-hashmap.c+2 -21 reply
2/6test-hashmap: check allocation computation for overflowt/helper/test-hashmap.c+1 -20 replies
3/6test-hashmap: use xsnprintf rather than snprintft/helper/test-hashmap.c+1 -10 replies
4/6test-hashmap: use strbuf_getline rather than fgetst/helper/test-hashmap.c+5 -30 replies
5/6test-hashmap: simplify alloc_test_entryt/helper/test-hashmap.c+17 -181 reply
6/6test-hashmap: use "unsigned int" for hash storaget/helper/test-hashmap.c+3 -20 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Beller
SeriesR-b
1/6
2/6
3/6
4/6
5/6
6/6

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/6] minor test-hashmap fixes

This series started with me fixing the sizeof() mismatch discussed in

https://public-inbox.org/git/[email protected]/

but I found a number of minor irritations. Most of them are cosmetic in practice, but I think it's important for test-helper code like this to model best practices, since people are likely to use it as a reference.

[1/6]: test-hashmap: use ALLOC_ARRAY rather than bare malloc [2/6]: test-hashmap: check allocation computation for overflow [3/6]: test-hashmap: use xsnprintf rather than snprintf [4/6]: test-hashmap: use strbuf_getline rather than fgets [5/6]: test-hashmap: simplify alloc_test_entry [6/6]: test-hashmap: use "unsigned int" for hash storage

 t/helper/test-hashmap.c | 53 +++++++++++++++++++++--------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

-Peff