tests/firmware_version: add case of nfp driver
Checks
Context |
Check |
Description |
ci/Intel-dts-format-test |
success
|
Testing OK
|
ci/Intel-dts-pylama-test |
success
|
Testing OK
|
ci/Intel-dts-suite-test |
warning
|
SKIPPED
|
Commit Message
From: Qin Ke <qin.ke@corigine.com>
Add case of nfp driver to check related firmware version and format.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Acked-by: Dano Teixeira <dano.teixeira@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
tests/TestSuite_firmware_version.py | 44 +++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
Comments
Hi all,
A gentle ping on this patch.
On 2023-07-03 21:16:29 +0200, Niklas Söderlund wrote:
> From: Qin Ke <qin.ke@corigine.com>
>
> Add case of nfp driver to check related firmware version and format.
>
> Signed-off-by: Qin Ke <qin.ke@corigine.com>
> Acked-by: Dano Teixeira <dano.teixeira@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
> ---
> tests/TestSuite_firmware_version.py | 44 +++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/tests/TestSuite_firmware_version.py b/tests/TestSuite_firmware_version.py
> index a5215c40441b..0e26b519ed19 100644
> --- a/tests/TestSuite_firmware_version.py
> +++ b/tests/TestSuite_firmware_version.py
> @@ -140,6 +140,50 @@ class TestFirmwareVersion(TestCase):
> None,
> )
>
> + elif self.kdriver == "nfp":
> + # Get the version information from output and cfg file
> + (
> + exp_vnic_version,
> + exp_nsp_version,
> + exp_mip,
> + exp_app,
> + ) = expected_version_info
> + vnic_version, nsp_version, mip, app = version_info.split()
> +
> + self.check_format(
> + exp_nsp_version,
> + nsp_version,
> + "nsp_version",
> + r"^\d{1,4}\.\d{1,4}$",
> + None,
> + )
> +
> + self.check_firmware_version(exp_nsp_version, nsp_version)
> +
> + self.check_format(
> + exp_vnic_version,
> + vnic_version,
> + "vnic_version",
> + r"^((\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4})|\*)$",
> + None,
> + )
> +
> + self.check_format(
> + exp_mip,
> + mip,
> + "mip",
> + r"^(tc|sriov|nic)-.*$",
> + None,
> + )
> +
> + self.check_format(
> + exp_app,
> + app,
> + "app",
> + r"(flower|nic|unknown)",
> + None,
> + )
> +
> else:
> self.verify(False, f"Test: case fails on {self.kdriver} driver")
>
> --
> 2.41.0
>
@@ -140,6 +140,50 @@ class TestFirmwareVersion(TestCase):
None,
)
+ elif self.kdriver == "nfp":
+ # Get the version information from output and cfg file
+ (
+ exp_vnic_version,
+ exp_nsp_version,
+ exp_mip,
+ exp_app,
+ ) = expected_version_info
+ vnic_version, nsp_version, mip, app = version_info.split()
+
+ self.check_format(
+ exp_nsp_version,
+ nsp_version,
+ "nsp_version",
+ r"^\d{1,4}\.\d{1,4}$",
+ None,
+ )
+
+ self.check_firmware_version(exp_nsp_version, nsp_version)
+
+ self.check_format(
+ exp_vnic_version,
+ vnic_version,
+ "vnic_version",
+ r"^((\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4})|\*)$",
+ None,
+ )
+
+ self.check_format(
+ exp_mip,
+ mip,
+ "mip",
+ r"^(tc|sriov|nic)-.*$",
+ None,
+ )
+
+ self.check_format(
+ exp_app,
+ app,
+ "app",
+ r"(flower|nic|unknown)",
+ None,
+ )
+
else:
self.verify(False, f"Test: case fails on {self.kdriver} driver")