From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B7A5A328D for ; Tue, 22 Oct 2019 11:18:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1331A1BEA8; Tue, 22 Oct 2019 11:18:09 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 4180C1BE80 for ; Tue, 22 Oct 2019 11:18:07 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 02:18:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="222747475" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 22 Oct 2019 02:18:06 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:18:06 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 22 Oct 2019 02:18:06 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.96]) by SHSMSX151.ccr.corp.intel.com ([10.239.6.50]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 17:18:04 +0800 From: "Tu, Lijuan" To: "Li, WenjieX A" , "dts@dpdk.org" CC: "Li, WenjieX A" Thread-Topic: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk Thread-Index: AQHVhK0FFZjmP4LSkk6pnzipMZXEQadmadnA Date: Tue, 22 Oct 2019 09:18:04 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB44FDC@SHSMSX101.ccr.corp.intel.com> References: <1571322540-68651-1-git-send-email-wenjiex.a.li@intel.com> <1571322540-68651-2-git-send-email-wenjiex.a.li@intel.com> In-Reply-To: <1571322540-68651-2-git-send-email-wenjiex.a.li@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjU3Y2NhZGMtNDg2Mi00NDE4LTg5ODctMDY3OWUzODFhMTc5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoicU56aTdOcE45RTNpa3VlTUNBZkdab0MwTnZhUVZSTzNqVXNtMnEzdkJBTmx4MEgrd1wvbTE0MHJ0UVNqUmVmMjcifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: align change in dpdk X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 > Subject: [dts] [PATCH V1] tests/enable_package_download_in_ice_driver: > align change in dpdk >=20 > 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. >=20 > Signed-off-by: Wenjie Li > --- > ...e_enable_package_download_in_ice_driver.py | 61 +++++++++++-------- > 1 file changed, 35 insertions(+), 26 deletions(-) >=20 > 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 =3D self.tester.get_mac(localPort0) > self.dut_testpmd =3D PmdOutput(self.dut) >=20 > - self.pkg_file =3D '/lib/firmware/intel/ice/ddp/ice.pkg' > - out =3D 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 =3D '/lib/firmware/intel/ice/ddp/ice.pkg' > + self.pkg_file2 =3D '/lib/firmware/updates/intel/ice/ddp/ice.pkg' > + out =3D 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 =3D 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") >=20 > def set_up(self): > @@ -64,25 +67,28 @@ class > TestEnable_Package_Download_In_Ice_Driver(TestCase): >=20 > def backup_recover_ice_pkg(self, flag=3D"backup"): > """ > - if backup =3D=3D true: backup /lib/firmware/intel/ice/ddp/ice.pk= g to > ~/ice.pkg_backup > - else: recover ~/ice.pkg_backup to /lib/firmware/intel/ice/ddp/ic= e.pkg > + if backup =3D=3D true: backup /lib/firmware/intel/ice/ddp/ice.pk= g 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 =3D '/opt/ice.pkg_backup' > if flag =3D=3D "backup": > - self.dut.send_expect("\cp %s %s" % (self.pkg_file, backup_fi= le), "#") > + self.dut.send_expect("\cp %s %s" % (self.pkg_file1, > + backup_file), "#") > else: > - self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_fi= le), "#") > + self.dut.send_expect("\cp %s %s" % (backup_file, self.pkg_fi= le1), "#") > + self.dut.send_expect("\cp %s %s" % (backup_file, > + self.pkg_file2), "#") >=20 > def use_correct_ice_pkg(self, flag=3D"true"): > """ > - if flag =3D=3D true: use /lib/firmware/intel/ice/ddp/ice.pkg > - else: touch a wrong /lib/firmware/intel/ice/ddp/ice.pkg > + if flag =3D=3D 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 =3D=3D "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, "#") >=20 > def start_testpmd(self, ice_pkg=3D"true", safe_mode_support=3D"false= "): > self.eal_param =3D "" > @@ -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 =3D=3D "false" and safe_mode_support =3D=3D "false": > - out =3D 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=3D"ipv4-other", flag=3Dice_pkg) >=20 > - 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", "ipv= 6-tcp", > "ipv6-udp", "ipv6-sctp"]: > - print tran_types > - self.send_packet(tran_type=3Dtran_types, flag=3Dice_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=3D"ipv4-other", flag=3Dice_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-tc= p", "ipv6- > udp", "ipv6-sctp"]: > + print tran_types > + self.send_packet(tran_type=3Dtran_types, flag=3Dice_pkg) >=20 > 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=3D"false", > safe_mode_support=3D"false") > + self.use_correct_ice_pkg(flag=3D"false") > + cmd =3D "./%s/app/testpmd -c 0x7 -n 4 -- -i --nb-cores=3D8 --rxq= =3D%s -- > txq=3D%s --port-topology=3Dchained" % (self.target, self.PF_QUEUE, > self.PF_QUEUE) > + out =3D self.dut.send_expect(cmd, "#", 60) > + error_messages =3D ["ice_load_pkg(): failed to allocate buf of s= ize 0 for > package", \ > + "ice_dev_init(): Failed to load the DDP package,Use safe= -mode- > support=3D1 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)) >=20 > def tear_down(self): > self.dut_testpmd.quit() > -- > 2.17.1