DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: Adam Dybkowski <adamx.dybkowski@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	 "fiona.trahe@intel.com" <fiona.trahe@intel.com>
Cc: Shally Verma <shallyv@marvell.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] test/compress: im buffer too small - add unit tests
Date: Wed, 15 Apr 2020 18:35:52 +0000	[thread overview]
Message-ID: <VI1PR04MB31685117F60213CBFB5E423BE6DB0@VI1PR04MB3168.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20200408125101.25764-3-adamx.dybkowski@intel.com>

Hi Fiona/Adam,

> This patch adds a new test suite for verification of the "internal
> QAT IM buffer too small" case handling. These unit tests are
> specific to the QAT PMD only - that's why they are contained in
> a separate test suite.
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> ---

Why do we need to have separate testsuite for QAT?
Can't we have a single one and based on capability of the driver,
Determine which tests need to be skipped in case they are not supported.
This would create a mess in the longer run just like cryptodev.

Please fix this, we cannot take this patch as is.

> +
> +static struct unit_test_suite compressdev_testsuite  = {
> +	.suite_name = "compressdev unit test suite",
> +	.setup = testsuite_setup,
> +	.teardown = testsuite_teardown,
> +	.unit_test_cases = {
> +		TEST_CASE_ST(NULL, NULL,
> +			test_compressdev_invalid_configuration),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_fixed),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_dynamic),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_dynamic_big),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_multi_op),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_multi_level),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_multi_xform),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_sgl),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateless_checksum),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_out_of_space_buffer),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_stateful_decomp),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +
> 	test_compressdev_deflate_stateful_decomp_checksum),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_external_mbufs),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +		test_compressdev_deflate_stateless_fixed_oos_recoverable),
> +		TEST_CASES_END() /**< NULL terminate unit test array */
> +	}
> +};
> +
> +/**********************************/
> +
> +static struct unit_test_suite compressdev_testsuite_qat  = {
> +	.suite_name = "compressdev unit test suite for QAT PMD",
> +	.setup = testsuite_setup,
> +	.teardown = testsuite_teardown,
> +	.unit_test_cases = {
> +		/* Positive test cases for IM buffer handling verification */
> +
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_LB_1op),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_LB_2ops_first),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +
> 	test_compressdev_deflate_im_buffers_LB_2ops_second),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_LB_3ops),
> +
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_LB_4ops),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_SGL_1op),
> +
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_SGL_2ops_first),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +
> 	test_compressdev_deflate_im_buffers_SGL_2ops_second),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_SGL_3ops),
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_SGL_4ops),
> +
> +		/* Negative test cases for IM buffer handling verification */
> +
> +		/* For this test huge mempool is necessary.
> +		 * It tests one case:
> +		 * only one op containing big amount of data, so that
> +		 * number of requested descriptors higher than number
> +		 * of available descriptors (128)
> +		 */
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +			test_compressdev_deflate_im_buffers_SGL_over_1op),
> +
> +		/* For this test huge mempool is necessary.
> +		 * 2 ops. First op contains big amount of data:
> +		 * number of requested descriptors higher than number
> +		 * of available descriptors (128), the second op is
> +		 * relatively small. In this case both ops are rejected
> +		 */
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +
> test_compressdev_deflate_im_buffers_SGL_over_2ops_first),
> +
> +		TEST_CASE_ST(generic_ut_setup, generic_ut_teardown,
> +
> test_compressdev_deflate_im_buffers_SGL_over_2ops_second),
> +
> +		TEST_CASES_END() /**< NULL terminate unit test array */
> +	}
> +};
> +
> +static int
> +test_compressdev(void)
> +{
> +	testsuite_params.suite_name = compressdev_testsuite.suite_name;
> +	return unit_test_suite_runner(&compressdev_testsuite);
> +}
> +
> +static int
> +test_compressdev_qat_specific(void)
> +{
> +	/* All tests are run on device 0. Check if it's QAT PMD. */
> +	if (rte_compressdev_count() == 0 ||
> +			!ENDS_WITH(rte_compressdev_name_get(0),
> "qat_comp")) {
> +		RTE_LOG(ERR, USER1, "QAT PMD must be loaded. Check if "
> +				"CONFIG_RTE_LIBRTE_PMD_QAT is enabled "
> +				"in config file to run this testsuite.\n");
> +		return TEST_FAILED;
> +	}
> +
> +	testsuite_params.suite_name = compressdev_testsuite_qat.suite_name;
> +	return unit_test_suite_runner(&compressdev_testsuite_qat);
>  }
> 
>  REGISTER_TEST_COMMAND(compressdev_autotest, test_compressdev);
> +REGISTER_TEST_COMMAND(compressdev_qat_specific,
> test_compressdev_qat_specific);
> --
> 2.17.1


  parent reply	other threads:[~2020-04-15 18:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 12:50 [dpdk-dev] [PATCH v2 0/2] compress/qat: im buffer too small - split op Adam Dybkowski
2020-04-08 12:51 ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski
2020-04-08 15:43   ` Trahe, Fiona
2020-04-08 12:51 ` [dpdk-dev] [PATCH v2 2/2] test/compress: im buffer too small - add unit tests Adam Dybkowski
2020-04-08 15:44   ` Trahe, Fiona
2020-04-15 18:35   ` Akhil Goyal [this message]
2020-04-16 10:02     ` Trahe, Fiona
2020-04-16 10:25       ` Akhil Goyal
2020-04-16 11:26         ` Trahe, Fiona
2020-04-16 14:31           ` Bruce Richardson
2020-04-16 14:55             ` Trahe, Fiona
2020-04-16 14:37           ` Akhil Goyal
2020-04-16 14:52             ` Trahe, Fiona
2020-04-17 15:39               ` Akhil Goyal
2020-04-17 15:56                 ` Trahe, Fiona
2020-04-17 15:44 ` [dpdk-dev] [PATCH v3 0/2] compress/qat: im buffer too small - split op Adam Dybkowski
2020-04-17 15:44   ` [dpdk-dev] [PATCH v3 1/2] " Adam Dybkowski
2020-04-17 15:44   ` [dpdk-dev] [PATCH v3 2/2] test/compress: im buffer too small - add unit tests Adam Dybkowski
2020-04-17 15:58     ` Trahe, Fiona
2020-04-17 21:50       ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR04MB31685117F60213CBFB5E423BE6DB0@VI1PR04MB3168.eurprd04.prod.outlook.com \
    --to=akhil.goyal@nxp.com \
    --cc=adamx.dybkowski@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=shallyv@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).