[dts] [PATCH] add testsuite coremask

Qiu, Michael michael.qiu at intel.com
Wed Oct 14 10:24:30 CEST 2015


First I would like to know what's the purpose this case, if you could
describe it in the commit log, it would help others to understand.

On 2015/10/14 10:13, yongjie wrote:
> From: GuYongjie <yongjiex.gu at intel.com>
>
> Signed-off-by: GuYongjie <yongjiex.gu at intel.com>
> ---
>  tests/TestSuite_coremask.py | 189 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 189 insertions(+)
>  create mode 100644 tests/TestSuite_coremask.py
>
> diff --git a/tests/TestSuite_coremask.py b/tests/TestSuite_coremask.py
> new file mode 100644
> index 0000000..3520a9c
> --- /dev/null
> +++ b/tests/TestSuite_coremask.py
> @@ -0,0 +1,189 @@
> +# <COPYRIGHT_TAG>
> +
> +"""
> +DPDK Test suite.
> +
> +Test coremask parsing in DPDK.
> +

[.../...]

> +    def test_wrong_coremask(self):
> +        """
> +        Check coremask parsing for wrong coremasks.
> +        """
> +
> +        wrong_coremasks = ["GARBAGE", "0xJF", "0xFJF", "0xFFJ",
> +                           "0xJ11", "0x1J1", "0x11J",
> +                           "JF", "FJF", "FFJ",
> +                           "J11", "1J1", "11J",
> +                           "jf", "fjf", "ffj",
> +                           "FF0x", "ff0x", "", "0x", "0"]
> +

Here I think, the value contains "J" or other none [a~f] should be only
one entry, other wrong value could be the mask which greater the cpu
number,

Thanks,
Michael
> +        for coremask in wrong_coremasks:
> +
> +            command = command_line % (self.target, coremask, self.mem_channel)
> +            try:
> +                out = self.dut.send_expect(command, "# ", 5)
> +                self.verify("EAL: invalid coremask" in out,
> +                            "Wrong core mask (%s) accepted" % coremask)
> +            except:
> +                self.dut.send_expect("quit", "# ", 5)
> +                raise VerifyFailure("Wrong core mask (%s) accepted" % coremask)
> +
> +    def tear_down(self):
> +        """
> +        Run after each test case.
> +        """
> +        self.dut.kill_all()
> +
> +    def tear_down_all(self):
> +        """
> +        Run after each test suite.
> +        """
> +        pass



More information about the dts mailing list