public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH next 0/8] test_hexdump: Improve test coverage
@ 2025-03-08  9:34 David Laight
  2025-03-08  9:34 ` [PATCH next 1/8] test_hexdump: Change rowsize and groupsize to size_t David Laight
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: David Laight @ 2025-03-08  9:34 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton
  Cc: David Laight, Arnd Bergmann, Linus Torvalds, Christophe Leroy,
	Andy Shevchenko, Rasmus Villemoes, nnac123, horms

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-03-13  9:17 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-08  9:34 [PATCH next 0/8] test_hexdump: Improve test coverage David Laight
2025-03-08  9:34 ` [PATCH next 1/8] test_hexdump: Change rowsize and groupsize to size_t David Laight
2025-03-10  8:28   ` Andy Shevchenko
2025-03-08  9:34 ` [PATCH next 2/8] test_hexdump: Create test output data from the binary input data buffer David Laight
2025-03-10  8:31   ` Andy Shevchenko
2025-03-12 19:28     ` David Laight
2025-03-12 19:36       ` Andy Shevchenko
2025-03-13  9:17         ` David Laight
2025-03-08  9:34 ` [PATCH next 3/8] test_hexdump: Use longer variable names David Laight
2025-03-08  9:34 ` [PATCH next 4/8] test_hexdump: Check for buffer overrun of sample output buffer David Laight
2025-03-10  9:01   ` Andy Shevchenko
2025-03-12 19:37     ` David Laight
2025-03-08  9:34 ` [PATCH next 5/8] test_hexdump: Fix sample output if zero bytes requested David Laight
2025-03-10  9:03   ` Andy Shevchenko
2025-03-12 19:40     ` David Laight
2025-03-08  9:34 ` [PATCH next 6/8] test_hexdump: If a test fails print all the parameters David Laight
2025-03-08  9:34 ` [PATCH next 7/8] test_hexdump: Run fixed not random tests David Laight
2025-03-08  9:34 ` [PATCH next 8/8] test_hexdump: Test all 256 byte values David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox