Commit 5d042707 authored by Vinicius Peixoto's avatar Vinicius Peixoto Committed by Andrew Morton
Browse files

lib/crc16_kunit.c: add KUnit tests for crc16

Add Kunit tests for the kernel's implementation of the standard CRC-16
algorithm (<linux/crc16.h>).  The test data consists of 100
randomly-generated test cases, validated against a naive CRC-16
implementation.

This test follows roughly the same logic as lib/crc32test.c, but without
the performance measurements.

Link: https://lkml.kernel.org/r/20241012-crc16-kunit-v3-1-0ca75cb58ca9@lkcamp.dev


Signed-off-by: default avatarVinicius Peixoto <vpeixoto@lkcamp.dev>
Co-developed-by: default avatarEnzo Bertoloti <ebertoloti@lkcamp.dev>
Signed-off-by: default avatarEnzo Bertoloti <ebertoloti@lkcamp.dev>
Co-developed-by: default avatarFabricio Gasperin <fgasperin@lkcamp.dev>
Signed-off-by: default avatarFabricio Gasperin <fgasperin@lkcamp.dev>
Suggested-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent a9d38bcd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment