test suite reviews and discussions
 help / color / Atom feed
* Re: [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk
  2019-10-17 14:28 [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk Wenjie Li
@ 2019-10-17  5:38 ` Zhang, YanX A
  2019-10-17 14:29 ` [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: " Wenjie Li
  2019-10-22  9:17 ` [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: " Tu, Lijuan
  2 siblings, 0 replies; 6+ messages in thread
From: Zhang, YanX A @ 2019-10-17  5:38 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

Tested-by:  Zhang, YanX A <yanx.a.zhang@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
Sent: Thursday, October 17, 2019 10:29 PM
To: dts@dpdk.org
Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk

In dpdk 03a05924dad01d5, the pkg search path are /lib/firmware/updates/intel/ice/ddp/
and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the expetcted behavior  of test_driver_enters_Safe_Mode_failed changed; align these changes.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 ...le_package_download_in_ice_driver_test_plan.rst | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
index efe2f93..14e5427 100644
--- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
+++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
@@ -62,7 +62,7 @@ Hardware::
 Test case 1: Download the package successfully  ==============================================
 
-1. Put the ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg,
+1. Put the correct ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg and 
+/lib/firmware/updates/intel/ice/ddp/ice.pkg,
    then reboot the server.
 
 2. Start the testpmd::
@@ -98,7 +98,7 @@ Test case 2: Driver enters Safe Mode successfully  =================================================
 
 1. Server power on, then put a new ice.pkg to
-   /lib/firmware/intel/ice/ddp/ice.pkg.
+   /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg.
    Make sure the new ice.pkg is different with the original one.
 
 2. Start testpmd::
@@ -139,7 +139,7 @@ Test case 3: Driver enters Safe Mode failed  ===========================================
 
 1. Server power on, then put a new ice.pkg to
-   /lib/firmware/intel/ice/ddp/ice.pkg.
+   /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg.
    Make sure the new ice.pkg is different with the original one.
 
 2. Start testpmd::
@@ -151,10 +151,4 @@ Test case 3: Driver enters Safe Mode failed
 
     ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode
 
-   The driver failed to go to safe mode.
-
-3. Check port info in testpmd::
-
-    testpmd> show port info all
-
-   There is no listed port info.
\ No newline at end of file
+   The driver failed to go to safe mode and testpmd failed to start.
--
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk
  2019-10-17 14:29 ` [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: " Wenjie Li
@ 2019-10-17  5:38   ` Zhang, YanX A
  2019-10-22  9:18   ` Tu, Lijuan
  1 sibling, 0 replies; 6+ messages in thread
From: Zhang, YanX A @ 2019-10-17  5:38 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

[-- Attachment #1: Type: text/plain, Size: 7089 bytes --]

Tested-by:  Zhang, YanX A <yanx.a.zhang@intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
Sent: Thursday, October 17, 2019 10:29 PM
To: dts@dpdk.org
Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk

In dpdk 03a05924dad01d5, the pkg search path are /lib/firmware/updates/intel/ice/ddp/
and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the expetcted behavior  of test_driver_enters_Safe_Mode_failed changed; align these changes.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 ...e_enable_package_download_in_ice_driver.py | 61 +++++++++++--------
 1 file changed, 35 insertions(+), 26 deletions(-)

diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py b/tests/TestSuite_enable_package_download_in_ice_driver.py
index b225ef3..fd6a27e 100644
--- a/tests/TestSuite_enable_package_download_in_ice_driver.py
+++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
@@ -54,9 +54,12 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         self.tester_p0_mac = self.tester.get_mac(localPort0)
         self.dut_testpmd = PmdOutput(self.dut)
 
-        self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
-        out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
-        self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file)
+        self.pkg_file1 = '/lib/firmware/intel/ice/ddp/ice.pkg'
+        self.pkg_file2 = '/lib/firmware/updates/intel/ice/ddp/ice.pkg'
+        out = self.dut.send_expect("ls %s" % self.pkg_file1, "#")
+        self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file1)
+        out = self.dut.send_expect("ls %s" % self.pkg_file2, "#")
+        self.verify("No such file or directory" not in out, "Cannot 
+ find %s, please check you system/driver." % self.pkg_file2)
         self.backup_recover_ice_pkg("backup")
 
     def set_up(self):
@@ -64,25 +67,28 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
 
     def backup_recover_ice_pkg(self, flag="backup"):
         """
-        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg to ~/ice.pkg_backup
-        else: recover ~/ice.pkg_backup to /lib/firmware/intel/ice/ddp/ice.pkg
+        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg to /opt/ice.pkg_backup
+        else: recover /opt/ice.pkg_backup to 
+ /lib/firmware/intel/ice/ddp/ice.pkg and 
+ /lib/firmware/updates/intel/ice/ddp/ice.pkg
         """
         backup_file = '/opt/ice.pkg_backup'
         if flag == "backup":
-            self.dut.send_expect("\cp %s %s" % (self.pkg_file, backup_file), "#")
+            self.dut.send_expect("\cp %s %s" % (self.pkg_file1, 
+ backup_file), "#")
         else:
-            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file), "#")
+            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file1), "#")
+            self.dut.send_expect("\cp %s %s" % (backup_file, 
+ self.pkg_file2), "#")
 
     def use_correct_ice_pkg(self, flag="true"):
         """
-        if flag == true: use /lib/firmware/intel/ice/ddp/ice.pkg
-        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg
+        if flag == true: use correct /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg
+        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg and 
+ /lib/firmware/updates/intel/ice/ddp/ice.pkg
         """
         if flag == "true":
             self.backup_recover_ice_pkg("recover")
         else:
-            self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
-            self.dut.send_expect("touch %s" % self.pkg_file, "#")
+            self.dut.send_expect("rm -rf %s" % self.pkg_file1, "#")
+            self.dut.send_expect("touch %s" % self.pkg_file1, "#")
+            self.dut.send_expect("rm -rf %s" % self.pkg_file2, "#")
+            self.dut.send_expect("touch %s" % self.pkg_file2, "#")
 
     def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
         self.eal_param = ""
@@ -252,21 +258,18 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         """
         self.use_correct_ice_pkg(ice_pkg)
         self.start_testpmd(ice_pkg, safe_mode_support)
-        if ice_pkg == "false" and safe_mode_support == "false":
-            out = self.dut_testpmd.execute_cmd('show port info all')
-            self.verify("Infos for port" not in out, "There should be no listed port info.")
-        else:
-            self.dut_testpmd.execute_cmd('set fwd mac')
-            self.dut_testpmd.execute_cmd('start')
-            self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
-            self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
 
-            self.dut_testpmd.execute_cmd('stop')
-            self.dut_testpmd.execute_cmd('set fwd rxonly')
-            self.dut_testpmd.execute_cmd('start')
-            for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
-                print tran_types
-                self.send_packet(tran_type=tran_types, flag=ice_pkg)
+        self.dut_testpmd.execute_cmd('set fwd mac')
+        self.dut_testpmd.execute_cmd('start')
+        self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
+        self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
+
+        self.dut_testpmd.execute_cmd('stop')
+        self.dut_testpmd.execute_cmd('set fwd rxonly')
+        self.dut_testpmd.execute_cmd('start')
+        for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
+            print tran_types
+            self.send_packet(tran_type=tran_types, flag=ice_pkg)
 
     def test_download_the_package_successfully(self):
         """
@@ -284,7 +287,13 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         """
         use wrong ice.pkg and start testpmd without "safe-mode-suppor", no port is loaded in testpmd
         """
-        self.download_the_package(ice_pkg="false", safe_mode_support="false")
+        self.use_correct_ice_pkg(flag="false")
+        cmd = "./%s/app/testpmd -c 0x7 -n 4 -- -i --nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.target, self.PF_QUEUE, self.PF_QUEUE)
+        out = self.dut.send_expect(cmd, "#", 60)
+        error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
+                "ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode"]
+        for error_message in error_messages:
+            self.verify(error_message in out, "There should be '%s' in 
+ out: %s" % (error_message, out))
 
     def tear_down(self):
         self.dut_testpmd.quit()
--
2.17.1


[-- Attachment #2: TestEnable_Package_Download_In_Ice_Driver.log --]
[-- Type: application/octet-stream, Size: 198930 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk
@ 2019-10-17 14:28 Wenjie Li
  2019-10-17  5:38 ` Zhang, YanX A
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wenjie Li @ 2019-10-17 14:28 UTC (permalink / raw)
  To: dts; +Cc: Wenjie Li

In dpdk 03a05924dad01d5, the pkg search path are /lib/firmware/updates/intel/ice/ddp/
and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the expetcted behavior
 of test_driver_enters_Safe_Mode_failed changed; align these changes.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 ...le_package_download_in_ice_driver_test_plan.rst | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
index efe2f93..14e5427 100644
--- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
+++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
@@ -62,7 +62,7 @@ Hardware::
 Test case 1: Download the package successfully
 ==============================================
 
-1. Put the ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg,
+1. Put the correct ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg,
    then reboot the server.
 
 2. Start the testpmd::
@@ -98,7 +98,7 @@ Test case 2: Driver enters Safe Mode successfully
 =================================================
 
 1. Server power on, then put a new ice.pkg to
-   /lib/firmware/intel/ice/ddp/ice.pkg.
+   /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg.
    Make sure the new ice.pkg is different with the original one.
 
 2. Start testpmd::
@@ -139,7 +139,7 @@ Test case 3: Driver enters Safe Mode failed
 ===========================================
 
 1. Server power on, then put a new ice.pkg to
-   /lib/firmware/intel/ice/ddp/ice.pkg.
+   /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg.
    Make sure the new ice.pkg is different with the original one.
 
 2. Start testpmd::
@@ -151,10 +151,4 @@ Test case 3: Driver enters Safe Mode failed
 
     ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode
 
-   The driver failed to go to safe mode.
-
-3. Check port info in testpmd::
-
-    testpmd> show port info all
-
-   There is no listed port info.
\ No newline at end of file
+   The driver failed to go to safe mode and testpmd failed to start.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk
  2019-10-17 14:28 [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk Wenjie Li
  2019-10-17  5:38 ` Zhang, YanX A
@ 2019-10-17 14:29 ` " Wenjie Li
  2019-10-17  5:38   ` Zhang, YanX A
  2019-10-22  9:18   ` Tu, Lijuan
  2019-10-22  9:17 ` [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: " Tu, Lijuan
  2 siblings, 2 replies; 6+ messages in thread
From: Wenjie Li @ 2019-10-17 14:29 UTC (permalink / raw)
  To: dts; +Cc: Wenjie Li

In dpdk 03a05924dad01d5, the pkg search path are /lib/firmware/updates/intel/ice/ddp/
and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the expetcted behavior
 of test_driver_enters_Safe_Mode_failed changed; align these changes.

Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
 ...e_enable_package_download_in_ice_driver.py | 61 +++++++++++--------
 1 file changed, 35 insertions(+), 26 deletions(-)

diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py b/tests/TestSuite_enable_package_download_in_ice_driver.py
index b225ef3..fd6a27e 100644
--- a/tests/TestSuite_enable_package_download_in_ice_driver.py
+++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
@@ -54,9 +54,12 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         self.tester_p0_mac = self.tester.get_mac(localPort0)
         self.dut_testpmd = PmdOutput(self.dut)
 
-        self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
-        out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
-        self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file)
+        self.pkg_file1 = '/lib/firmware/intel/ice/ddp/ice.pkg'
+        self.pkg_file2 = '/lib/firmware/updates/intel/ice/ddp/ice.pkg'
+        out = self.dut.send_expect("ls %s" % self.pkg_file1, "#")
+        self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file1)
+        out = self.dut.send_expect("ls %s" % self.pkg_file2, "#")
+        self.verify("No such file or directory" not in out, "Cannot find %s, please check you system/driver." % self.pkg_file2)
         self.backup_recover_ice_pkg("backup")
 
     def set_up(self):
@@ -64,25 +67,28 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
 
     def backup_recover_ice_pkg(self, flag="backup"):
         """
-        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg to ~/ice.pkg_backup
-        else: recover ~/ice.pkg_backup to /lib/firmware/intel/ice/ddp/ice.pkg
+        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg to /opt/ice.pkg_backup
+        else: recover /opt/ice.pkg_backup to /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg
         """
         backup_file = '/opt/ice.pkg_backup'
         if flag == "backup":
-            self.dut.send_expect("\cp %s %s" % (self.pkg_file, backup_file), "#")
+            self.dut.send_expect("\cp %s %s" % (self.pkg_file1, backup_file), "#")
         else:
-            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file), "#")
+            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file1), "#")
+            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file2), "#")
 
     def use_correct_ice_pkg(self, flag="true"):
         """
-        if flag == true: use /lib/firmware/intel/ice/ddp/ice.pkg
-        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg
+        if flag == true: use correct /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg
+        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg and /lib/firmware/updates/intel/ice/ddp/ice.pkg
         """
         if flag == "true":
             self.backup_recover_ice_pkg("recover")
         else:
-            self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
-            self.dut.send_expect("touch %s" % self.pkg_file, "#")
+            self.dut.send_expect("rm -rf %s" % self.pkg_file1, "#")
+            self.dut.send_expect("touch %s" % self.pkg_file1, "#")
+            self.dut.send_expect("rm -rf %s" % self.pkg_file2, "#")
+            self.dut.send_expect("touch %s" % self.pkg_file2, "#")
 
     def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
         self.eal_param = ""
@@ -252,21 +258,18 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         """
         self.use_correct_ice_pkg(ice_pkg)
         self.start_testpmd(ice_pkg, safe_mode_support)
-        if ice_pkg == "false" and safe_mode_support == "false":
-            out = self.dut_testpmd.execute_cmd('show port info all')
-            self.verify("Infos for port" not in out, "There should be no listed port info.")
-        else:
-            self.dut_testpmd.execute_cmd('set fwd mac')
-            self.dut_testpmd.execute_cmd('start')
-            self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
-            self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
 
-            self.dut_testpmd.execute_cmd('stop')
-            self.dut_testpmd.execute_cmd('set fwd rxonly')
-            self.dut_testpmd.execute_cmd('start')
-            for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
-                print tran_types
-                self.send_packet(tran_type=tran_types, flag=ice_pkg)
+        self.dut_testpmd.execute_cmd('set fwd mac')
+        self.dut_testpmd.execute_cmd('start')
+        self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
+        self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
+
+        self.dut_testpmd.execute_cmd('stop')
+        self.dut_testpmd.execute_cmd('set fwd rxonly')
+        self.dut_testpmd.execute_cmd('start')
+        for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-udp", "ipv6-sctp"]:
+            print tran_types
+            self.send_packet(tran_type=tran_types, flag=ice_pkg)
 
     def test_download_the_package_successfully(self):
         """
@@ -284,7 +287,13 @@ class TestEnable_Package_Download_In_Ice_Driver(TestCase):
         """
         use wrong ice.pkg and start testpmd without "safe-mode-suppor", no port is loaded in testpmd
         """
-        self.download_the_package(ice_pkg="false", safe_mode_support="false")
+        self.use_correct_ice_pkg(flag="false")
+        cmd = "./%s/app/testpmd -c 0x7 -n 4 -- -i --nb-cores=8 --rxq=%s --txq=%s --port-topology=chained" % (self.target, self.PF_QUEUE, self.PF_QUEUE)
+        out = self.dut.send_expect(cmd, "#", 60)
+        error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for package", \
+                "ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to enter Safe Mode"]
+        for error_message in error_messages:
+            self.verify(error_message in out, "There should be '%s' in out: %s" % (error_message, out))
 
     def tear_down(self):
         self.dut_testpmd.quit()
-- 
2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk
  2019-10-17 14:28 [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk Wenjie Li
  2019-10-17  5:38 ` Zhang, YanX A
  2019-10-17 14:29 ` [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: " Wenjie Li
@ 2019-10-22  9:17 ` " Tu, Lijuan
  2 siblings, 0 replies; 6+ messages in thread
From: Tu, Lijuan @ 2019-10-22  9:17 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Thursday, October 17, 2019 10:29 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1]
> test_plans/enable_package_download_in_ice_driver: align change in dpdk
> 
> In dpdk 03a05924dad01d5, the pkg search path are
> /lib/firmware/updates/intel/ice/ddp/
> and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the
> expetcted behavior  of test_driver_enters_Safe_Mode_failed changed; align
> these changes.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  ...le_package_download_in_ice_driver_test_plan.rst | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> index efe2f93..14e5427 100644
> --- a/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> +++ b/test_plans/enable_package_download_in_ice_driver_test_plan.rst
> @@ -62,7 +62,7 @@ Hardware::
>  Test case 1: Download the package successfully
> ==============================================
> 
> -1. Put the ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg,
> +1. Put the correct ice.pkg to /lib/firmware/intel/ice/ddp/ice.pkg and
> +/lib/firmware/updates/intel/ice/ddp/ice.pkg,
>     then reboot the server.
> 
>  2. Start the testpmd::
> @@ -98,7 +98,7 @@ Test case 2: Driver enters Safe Mode successfully
> =================================================
> 
>  1. Server power on, then put a new ice.pkg to
> -   /lib/firmware/intel/ice/ddp/ice.pkg.
> +   /lib/firmware/intel/ice/ddp/ice.pkg and
> /lib/firmware/updates/intel/ice/ddp/ice.pkg.
>     Make sure the new ice.pkg is different with the original one.
> 
>  2. Start testpmd::
> @@ -139,7 +139,7 @@ Test case 3: Driver enters Safe Mode failed
> ===========================================
> 
>  1. Server power on, then put a new ice.pkg to
> -   /lib/firmware/intel/ice/ddp/ice.pkg.
> +   /lib/firmware/intel/ice/ddp/ice.pkg and
> /lib/firmware/updates/intel/ice/ddp/ice.pkg.
>     Make sure the new ice.pkg is different with the original one.
> 
>  2. Start testpmd::
> @@ -151,10 +151,4 @@ Test case 3: Driver enters Safe Mode failed
> 
>      ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1
> to enter Safe Mode
> 
> -   The driver failed to go to safe mode.
> -
> -3. Check port info in testpmd::
> -
> -    testpmd> show port info all
> -
> -   There is no listed port info.
> \ No newline at end of file
> +   The driver failed to go to safe mode and testpmd failed to start.
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk
  2019-10-17 14:29 ` [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: " Wenjie Li
  2019-10-17  5:38   ` Zhang, YanX A
@ 2019-10-22  9:18   ` Tu, Lijuan
  1 sibling, 0 replies; 6+ messages in thread
From: Tu, Lijuan @ 2019-10-22  9:18 UTC (permalink / raw)
  To: Li, WenjieX A, dts; +Cc: Li, WenjieX A

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Wenjie Li
> Sent: Thursday, October 17, 2019 10:29 PM
> To: dts@dpdk.org
> Cc: Li, WenjieX A <wenjiex.a.li@intel.com>
> Subject: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver:
> align change in dpdk
> 
> In dpdk 03a05924dad01d5, the pkg search path are
> /lib/firmware/updates/intel/ice/ddp/
> and /lib/firmware/intel/ice/ddp/; and in dpdk 6f51deb903b2558483, the
> expetcted behavior  of test_driver_enters_Safe_Mode_failed changed; align
> these changes.
> 
> Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
> ---
>  ...e_enable_package_download_in_ice_driver.py | 61 +++++++++++--------
>  1 file changed, 35 insertions(+), 26 deletions(-)
> 
> diff --git a/tests/TestSuite_enable_package_download_in_ice_driver.py
> b/tests/TestSuite_enable_package_download_in_ice_driver.py
> index b225ef3..fd6a27e 100644
> --- a/tests/TestSuite_enable_package_download_in_ice_driver.py
> +++ b/tests/TestSuite_enable_package_download_in_ice_driver.py
> @@ -54,9 +54,12 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
>          self.tester_p0_mac = self.tester.get_mac(localPort0)
>          self.dut_testpmd = PmdOutput(self.dut)
> 
> -        self.pkg_file = '/lib/firmware/intel/ice/ddp/ice.pkg'
> -        out = self.dut.send_expect("ls %s" % self.pkg_file, "#")
> -        self.verify("No such file or directory" not in out, "Cannot find %s, please
> check you system/driver." % self.pkg_file)
> +        self.pkg_file1 = '/lib/firmware/intel/ice/ddp/ice.pkg'
> +        self.pkg_file2 = '/lib/firmware/updates/intel/ice/ddp/ice.pkg'
> +        out = self.dut.send_expect("ls %s" % self.pkg_file1, "#")
> +        self.verify("No such file or directory" not in out, "Cannot find %s, please
> check you system/driver." % self.pkg_file1)
> +        out = self.dut.send_expect("ls %s" % self.pkg_file2, "#")
> +        self.verify("No such file or directory" not in out, "Cannot
> + find %s, please check you system/driver." % self.pkg_file2)
>          self.backup_recover_ice_pkg("backup")
> 
>      def set_up(self):
> @@ -64,25 +67,28 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
> 
>      def backup_recover_ice_pkg(self, flag="backup"):
>          """
> -        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg to
> ~/ice.pkg_backup
> -        else: recover ~/ice.pkg_backup to /lib/firmware/intel/ice/ddp/ice.pkg
> +        if backup == true: backup /lib/firmware/intel/ice/ddp/ice.pkg and
> /lib/firmware/updates/intel/ice/ddp/ice.pkg to /opt/ice.pkg_backup
> +        else: recover /opt/ice.pkg_backup to
> + /lib/firmware/intel/ice/ddp/ice.pkg and
> + /lib/firmware/updates/intel/ice/ddp/ice.pkg
>          """
>          backup_file = '/opt/ice.pkg_backup'
>          if flag == "backup":
> -            self.dut.send_expect("\cp %s %s" % (self.pkg_file, backup_file), "#")
> +            self.dut.send_expect("\cp %s %s" % (self.pkg_file1,
> + backup_file), "#")
>          else:
> -            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file), "#")
> +            self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_file1), "#")
> +            self.dut.send_expect("\cp %s %s" % (backup_file,
> + self.pkg_file2), "#")
> 
>      def use_correct_ice_pkg(self, flag="true"):
>          """
> -        if flag == true: use /lib/firmware/intel/ice/ddp/ice.pkg
> -        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg
> +        if flag == true: use correct /lib/firmware/intel/ice/ddp/ice.pkg and
> /lib/firmware/updates/intel/ice/ddp/ice.pkg
> +        else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg and
> + /lib/firmware/updates/intel/ice/ddp/ice.pkg
>          """
>          if flag == "true":
>              self.backup_recover_ice_pkg("recover")
>          else:
> -            self.dut.send_expect("rm -rf %s" % self.pkg_file, "#")
> -            self.dut.send_expect("touch %s" % self.pkg_file, "#")
> +            self.dut.send_expect("rm -rf %s" % self.pkg_file1, "#")
> +            self.dut.send_expect("touch %s" % self.pkg_file1, "#")
> +            self.dut.send_expect("rm -rf %s" % self.pkg_file2, "#")
> +            self.dut.send_expect("touch %s" % self.pkg_file2, "#")
> 
>      def start_testpmd(self, ice_pkg="true", safe_mode_support="false"):
>          self.eal_param = ""
> @@ -252,21 +258,18 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
>          """
>          self.use_correct_ice_pkg(ice_pkg)
>          self.start_testpmd(ice_pkg, safe_mode_support)
> -        if ice_pkg == "false" and safe_mode_support == "false":
> -            out = self.dut_testpmd.execute_cmd('show port info all')
> -            self.verify("Infos for port" not in out, "There should be no listed port
> info.")
> -        else:
> -            self.dut_testpmd.execute_cmd('set fwd mac')
> -            self.dut_testpmd.execute_cmd('start')
> -            self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
> -            self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
> 
> -            self.dut_testpmd.execute_cmd('stop')
> -            self.dut_testpmd.execute_cmd('set fwd rxonly')
> -            self.dut_testpmd.execute_cmd('start')
> -            for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp",
> "ipv6-udp", "ipv6-sctp"]:
> -                print tran_types
> -                self.send_packet(tran_type=tran_types, flag=ice_pkg)
> +        self.dut_testpmd.execute_cmd('set fwd mac')
> +        self.dut_testpmd.execute_cmd('start')
> +        self.tcpdump_start_sniffing([self.tester_p0, self.tester_p1])
> +        self.send_packet(tran_type="ipv4-other", flag=ice_pkg)
> +
> +        self.dut_testpmd.execute_cmd('stop')
> +        self.dut_testpmd.execute_cmd('set fwd rxonly')
> +        self.dut_testpmd.execute_cmd('start')
> +        for tran_types in ["ipv4-tcp", "ipv4-udp", "ipv4-sctp", "ipv6-tcp", "ipv6-
> udp", "ipv6-sctp"]:
> +            print tran_types
> +            self.send_packet(tran_type=tran_types, flag=ice_pkg)
> 
>      def test_download_the_package_successfully(self):
>          """
> @@ -284,7 +287,13 @@ class
> TestEnable_Package_Download_In_Ice_Driver(TestCase):
>          """
>          use wrong ice.pkg and start testpmd without "safe-mode-suppor", no
> port is loaded in testpmd
>          """
> -        self.download_the_package(ice_pkg="false",
> safe_mode_support="false")
> +        self.use_correct_ice_pkg(flag="false")
> +        cmd = "./%s/app/testpmd -c 0x7 -n 4 -- -i --nb-cores=8 --rxq=%s --
> txq=%s --port-topology=chained" % (self.target, self.PF_QUEUE,
> self.PF_QUEUE)
> +        out = self.dut.send_expect(cmd, "#", 60)
> +        error_messages = ["ice_load_pkg(): failed to allocate buf of size 0 for
> package", \
> +                "ice_dev_init(): Failed to load the DDP package,Use safe-mode-
> support=1 to enter Safe Mode"]
> +        for error_message in error_messages:
> +            self.verify(error_message in out, "There should be '%s' in
> + out: %s" % (error_message, out))
> 
>      def tear_down(self):
>          self.dut_testpmd.quit()
> --
> 2.17.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 14:28 [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: align change in dpdk Wenjie Li
2019-10-17  5:38 ` Zhang, YanX A
2019-10-17 14:29 ` [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: " Wenjie Li
2019-10-17  5:38   ` Zhang, YanX A
2019-10-22  9:18   ` Tu, Lijuan
2019-10-22  9:17 ` [dts] [PATCH V1] test_plans/enable_package_download_in_ice_driver: " Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox