Hi Jan,

On Fri, Jun 22, 2018 at 04:37:21PM +0200, Jan Glauber wrote:
> The test vectors were generated using the ThunderX ZIP coprocessor.
> 
> Signed-off-by: Jan Glauber <jglau...@cavium.com>
> ---
>  crypto/testmgr.c |  9 ++++++
>  crypto/testmgr.h | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 86 insertions(+)
> 
> diff --git a/crypto/testmgr.c b/crypto/testmgr.c
> index cfb5fe4c5ccf..8e9ff1229e93 100644
> --- a/crypto/testmgr.c
> +++ b/crypto/testmgr.c
> @@ -3238,6 +3238,15 @@ static const struct alg_test_desc alg_test_descs[] = {
>                               .decomp = __VECS(lzo_decomp_tv_template)
>                       }
>               }
> +     }, {
> +             .alg = "lzs",
> +             .test = alg_test_comp,
> +             .suite = {
> +                     .comp = {
> +                             .comp = __VECS(lzs_comp_tv_template),
> +                             .decomp = __VECS(lzs_decomp_tv_template)
> +                     }
> +             }
>       }, {
>               .alg = "md4",
>               .test = alg_test_hash,
> diff --git a/crypto/testmgr.h b/crypto/testmgr.h
> index b950aa234e43..ae7fecadcade 100644
> --- a/crypto/testmgr.h
> +++ b/crypto/testmgr.h
> @@ -31699,6 +31699,83 @@ static const struct comp_testvec 
> lzo_decomp_tv_template[] = {
>       },
>  };
>  
> +/*
> + * LZS test vectors (null-terminated strings).
> + */
> +static const struct comp_testvec lzs_comp_tv_template[] = {
> +     {
> +             .inlen  = 70,
> +             .outlen = 40,
> +             .input  = "Join us now and share the software "
> +                     "Join us now and share the software ",
> +             .output = "\x25\x1b\xcd\x26\xe1\x01\xd4\xe6"
> +                       "\x20\x37\x1b\xce\xe2\x03\x09\xb8"
> +                       "\xc8\x20\x39\x9a\x0c\x27\x23\x28"
> +                       "\x80\xe8\x68\xc2\x07\x33\x79\x98"
> +                       "\xe8\x77\xc6\xda\x3f\xfc\xc0\x00",
> +     }, {
> +             .inlen  = 184,
> +             .outlen = 130,
> +             .input  = "This document describes a compression method based 
> on the LZS "
> +                     "compression algorithm.  This document defines the 
> application of "
> +                     "the LZS algorithm to the IP Payload Compression 
> Protocol.",

Your comment claims that the test vectors (presumably the inputs) are
null-terminated strings, but the lengths of the inputs actually don't include
the null terminator.  The length of the first one, for example, would have to be
71 to include the null terminator, not 70.

Eric

Reply via email to