Skip to content

test_hexdump: Improve test coverage

David Laight lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8test_hexdump: Change rowsize and groupsize to size_tlib/test_hexdump.c+16 -161 reply
2/8test_hexdump: Create test output data from the binary input data bufferlib/test_hexdump.c+15 -654 replies
3/8test_hexdump: Use longer variable nameslib/test_hexdump.c+36 -450 replies
4/8test_hexdump: Check for buffer overrun of sample output bufferlib/test_hexdump.c+8 -02 replies
5/8test_hexdump: Fix sample output if zero bytes requestedlib/test_hexdump.c+6 -22 replies
6/8test_hexdump: If a test fails print all the parameterslib/test_hexdump.c+4 -50 replies
7/8test_hexdump: Run fixed not random testslib/test_hexdump.c+32 -320 replies
8/8test_hexdump: Test all 256 byte valueslib/test_hexdump.c+32 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH next 0/8] test_hexdump: Improve test coverage

It was suggested that I add some addition tests for hex_dump_to_buffer(). This required reworking the test code so that could verify arbitrary data.

16 of the tests (those with zero len and bufsize) fail on the current kernel (the return value should be zero but is ascii ? 3 * rowsize : -1)

There are now 2000 tests that include more buffer overflow conditions and all 256 bytes values.

David Laight (8):
Change rowsize and groupsize to size_t
Create test output data from the binary input data buffer Use longer variable names
Check for buffer overrun of sample output buffer Fix sample output if zero bytes requested
If a test fails print all the parameters
Run fixed not random tests
Test all 256 byte values

 lib/test_hexdump.c | 256 ++++++++++++++++++++-------------------------
 1 file changed, 113 insertions(+), 143 deletions(-)
Signature · 1 line
2.39.5