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

David Laight
2025-03-08T09:35:10Z

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(-)

--
2.39.5