crypto: testmgr - add tests for lzo-rle
Subsystems (2)
PATCH 1/1 crypto: testmgr - add tests for lzo-rle
Add self-tests for the lzo-rle algorithm.
--- crypto/testmgr.c | 10 ++++++ crypto/testmgr.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+)
crypto/testmgr.c +10 -0
@@ -4437,6 +4437,16 @@ static const struct alg_test_desc alg_test_descs[] = { .decomp = __VECS(lzo_decomp_tv_template) } } + }, { + .alg = "lzo-rle", + .test = alg_test_comp, + .fips_allowed = 1, + .suite = { + .comp = { + .comp = __VECS(lzorle_comp_tv_template), + .decomp = __VECS(lzorle_decomp_tv_template) + } + } }, { .alg = "md4", .test = alg_test_hash,
crypto/testmgr.h +80 -0
86 lines not on this page · raw message
Signature · 1 line
2.22.0.410.gd8fdbe21b5-goog
Herbert Xu
maintainerQuoted 7 lines · Hannah Pan
Add self-tests for the lzo-rle algorithm.
Signed-off-by Hannah Pan <[email protected]>---
crypto/testmgr.c| 10 ++++++crypto/testmgr.h| 80 ++++++++++++++++++++++++++++++++++++++++++++++++2 files changed, 90 insertions(+)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Quoted 7 lines · Hannah Pan
Add self-tests for the lzo-rle algorithm.
Signed-off-by Hannah Pan <[email protected]>--- crypto/testmgr.c | 10 ++++++ crypto/testmgr.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+)
Hi Hannah,
Thanks for adding these tests.
It looks like these tests don't include any runs of zeros in the input. In this case, most of the new RLE-related code-paths in lzo-rle aren't invoked and it behaves exactly the same as standard lzo.
To get better coverage, I would recommend adding some input data which includes some runs of at least 4 zeros (ideally, including some edge cases like all-zero, input starts / ends with a run of zeros, empty input, etc).
Regards
Dave