[dpdk-dev] [PATCH v2 2/2] test/compress: add varied buffer input/outputs

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Jan 9 18:02:56 CET 2019



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Marko Kovacevic
> Sent: Thursday, December 20, 2018 2:58 PM
> To: dev at dpdk.org
> Cc: akhil.goyal at nxp.com; Daly, Lee <lee.daly at intel.com>; Jozwiak, TomaszX
> <tomaszx.jozwiak at intel.com>; O'Hare, Cathal <cathal.ohare at intel.com>;
> Trahe, Fiona <fiona.trahe at intel.com>; Kovacevic, Marko
> <marko.kovacevic at intel.com>
> Subject: [dpdk-dev] [PATCH v2 2/2] test/compress: add varied buffer
> input/outputs
> 
> Added unit test to check if a SGL buffer was added as an input and a Linear
> Buffer as output and vice versa so we can test if the application would
> process the different buffers properly.
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic at intel.com>
> Acked-by: Lee Daly <lee.daly at intel.com>
> ---
>  test/test/test_compressdev.c | 173 ++++++++++++++++++++++++++++++++---
> --------
>  1 file changed, 130 insertions(+), 43 deletions(-)
> 
> diff --git a/test/test/test_compressdev.c b/test/test/test_compressdev.c
> index b2999fa..5d62206 100644
> --- a/test/test/test_compressdev.c
> +++ b/test/test/test_compressdev.c
> @@ -71,6 +71,13 @@ struct comp_testsuite_params {
>  	struct rte_comp_xform *def_decomp_xform;  };
> 
> +enum varied_buff {
> +	 LB_BOTH = 0,	/* both input and output are linear*/
> +	 SGL_BOTH,	/* both input and output are chained */
> +	 SGL_TO_LB,	/* input buffer is chained */
> +	 LB_TO_SGL	/* output buffer is chained */
>

Great idea to have this enum. It really makes the tests more readable :)
> 
> +static int
> +test_compressdev_deflate_stateless_varied_buf(void)
> +{

I think, since these new tests could be integrated in the SGL test, extending the existing ones,
as so far they were only testing SGL in SGL out and this is extending to other combinations.
This way, we don't add another test unnecessarily.

Thanks,
Pablo


More information about the dev mailing list