[dts] [PATCH V1] tests/unit_tests_kni:fix invalid coremask when dts coding
Tu, Lijuan
lijuan.tu at intel.com
Mon Oct 22 11:38:50 CEST 2018
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of yaobing
> Sent: Monday, October 22, 2018 5:18 PM
> To: dts at dpdk.org
> Cc: Yao, BingX Y <bingx.y.yao at intel.com>
> Subject: [dts] [PATCH V1] tests/unit_tests_kni:fix invalid coremask when dts
> coding
>
> get local coremask due to script hard code
>
> Signed-off-by: yaobing <bingx.y.yao at intel.com>
> ---
> tests/TestSuite_unit_tests_kni.py | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_unit_tests_kni.py
> b/tests/TestSuite_unit_tests_kni.py
> index ea8ef79..6ed8b9b 100644
> --- a/tests/TestSuite_unit_tests_kni.py
> +++ b/tests/TestSuite_unit_tests_kni.py
> @@ -36,6 +36,7 @@ This TestSuite runs the unit tests included in DPDK for
> KNI feature.
> """
>
> from test_case import TestCase
> +import utils
>
> #
> #
> @@ -72,7 +73,14 @@ class TestUnitTestsKni(TestCase):
>
> KNI Prerequisites
> """
> -
> + core_number = len(self.dut.cores)
> + if core_number < 2:
> + raise
[Lijuan] raise what? Could you give some information here.
> + else:
> + self.default_cores = "1S/2C/1T"
> +
> + cores = self.dut.get_core_list("1S/2C/1T")
> + self.coremask = utils.create_mask(cores)
> self.insmod_kni()
>
> def set_up(self):
> @@ -85,7 +93,7 @@ class TestUnitTestsKni(TestCase):
> """
> Run kni autotest.
> """
> - self.dut.send_expect("./%s/app/test -n 1 -c fffe" % self.target,
> "R.*T.*E.*>.*>", 60)
> + self.dut.send_expect("./%s/app/test -n 1 -c %s" %
> (self.target,self.coremask), "R.*T.*E.*>.*>", 60)
> out = self.dut.send_expect("kni_autotest", "RTE>>", 60)
> self.dut.send_expect("quit", "# ")
>
> --
> 2.17.2
More information about the dts
mailing list