* [dts] [PATCH V1 0/2] tests: python3 support @ 2020-02-13 6:28 yufengmx 2020-02-13 6:28 ` [dts] [PATCH V1 1/2] test/iavf: " yufengmx 2020-02-13 6:28 ` [dts] [PATCH V1 2/2] test/vxlan_sample: " yufengmx 0 siblings, 2 replies; 5+ messages in thread From: yufengmx @ 2020-02-13 6:28 UTC (permalink / raw) To: dts, lihongx.ma; +Cc: yufengmx python3 support. yufengmx (2): test/iavf: python3 support test/vxlan_sample: python3 support tests/TestSuite_iavf.py | 2 +- tests/TestSuite_vxlan_sample.py | 42 ++++++++++++++++----------------- 2 files changed, 22 insertions(+), 22 deletions(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 1/2] test/iavf: python3 support 2020-02-13 6:28 [dts] [PATCH V1 0/2] tests: python3 support yufengmx @ 2020-02-13 6:28 ` yufengmx 2020-02-13 10:31 ` Tu, Lijuan 2020-02-13 6:28 ` [dts] [PATCH V1 2/2] test/vxlan_sample: " yufengmx 1 sibling, 1 reply; 5+ messages in thread From: yufengmx @ 2020-02-13 6:28 UTC (permalink / raw) To: dts, lihongx.ma; +Cc: yufengmx python3 support. Signed-off-by: yufengmx <yufengx.mo@intel.com> --- tests/TestSuite_iavf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py index d7b1104..dedabbd 100644 --- a/tests/TestSuite_iavf.py +++ b/tests/TestSuite_iavf.py @@ -696,7 +696,7 @@ class TestIavf(TestCase): if (loading_size <= 800): self.verify(rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, "the packet segmentation incorrect, %s" % tx_outlist) else: - num = loading_size/800 + num = loading_size // 800 for i in range(num): self.verify(tx_outlist != [], "the packet segmentation incorrect, %s" % tx_outlist) self.verify(int(tx_outlist[i]) == 800, "the packet segmentation incorrect, %s" % tx_outlist) -- 2.21.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 1/2] test/iavf: python3 support 2020-02-13 6:28 ` [dts] [PATCH V1 1/2] test/iavf: " yufengmx @ 2020-02-13 10:31 ` Tu, Lijuan 0 siblings, 0 replies; 5+ messages in thread From: Tu, Lijuan @ 2020-02-13 10:31 UTC (permalink / raw) To: Mo, YufengX, dts, Ma, LihongX; +Cc: Mo, YufengX Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx > Sent: Thursday, February 13, 2020 2:28 PM > To: dts@dpdk.org; Ma, LihongX <lihongx.ma@intel.com> > Cc: Mo, YufengX <yufengx.mo@intel.com> > Subject: [dts] [PATCH V1 1/2] test/iavf: python3 support > > > python3 support. > > Signed-off-by: yufengmx <yufengx.mo@intel.com> > --- > tests/TestSuite_iavf.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py index > d7b1104..dedabbd 100644 > --- a/tests/TestSuite_iavf.py > +++ b/tests/TestSuite_iavf.py > @@ -696,7 +696,7 @@ class TestIavf(TestCase): > if (loading_size <= 800): > self.verify(rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, > "the packet segmentation incorrect, %s" % tx_outlist) > else: > - num = loading_size/800 > + num = loading_size // 800 > for i in range(num): > self.verify(tx_outlist != [], "the packet segmentation > incorrect, %s" % tx_outlist) > self.verify(int(tx_outlist[i]) == 800, "the packet segmentation > incorrect, %s" % tx_outlist) > -- > 2.21.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [dts] [PATCH V1 2/2] test/vxlan_sample: python3 support 2020-02-13 6:28 [dts] [PATCH V1 0/2] tests: python3 support yufengmx 2020-02-13 6:28 ` [dts] [PATCH V1 1/2] test/iavf: " yufengmx @ 2020-02-13 6:28 ` yufengmx 2020-02-13 10:31 ` Tu, Lijuan 1 sibling, 1 reply; 5+ messages in thread From: yufengmx @ 2020-02-13 6:28 UTC (permalink / raw) To: dts, lihongx.ma; +Cc: yufengmx python3 support. Signed-off-by: yufengmx <yufengx.mo@intel.com> --- tests/TestSuite_vxlan_sample.py | 42 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/TestSuite_vxlan_sample.py b/tests/TestSuite_vxlan_sample.py index 7d4be40..df9d3a6 100644 --- a/tests/TestSuite_vxlan_sample.py +++ b/tests/TestSuite_vxlan_sample.py @@ -202,11 +202,11 @@ class TestVxlanSample(TestCase): if self.vm_dut is None: raise Exception("Set up VM ENV failed!") except Exception as e: - print(utils.RED("Failure for %s" % str(e))) + self.logger.error("Failure for %s" % str(e)) # create another vm if vm_num == 2: - print("not implemented now") + self.logger.warning("not implemented now") return True @@ -303,11 +303,11 @@ class TestVxlanSample(TestCase): self.verify(ord(payload[i]) == 88, "Check udp data failed") except: case_pass = False - print(utils.RED("Failure in checking packet payload")) + self.logger.error("Failure in checking packet payload") if case_pass: - print(utils.GREEN("Check normal udp packet forward pass on " - "virtIO port %d" % vf_id)) + self.logger.info("Check normal udp packet forward pass on " + "virtIO port %d" % vf_id) if pkt_type == "vxlan_udp_decap": # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac @@ -338,11 +338,11 @@ class TestVxlanSample(TestCase): self.verify(ord(payload[i]) == 88, "Check udp data failed") except: case_pass = False - print(utils.RED("Failure in checking packet payload")) + self.logger.error("Failure in checking packet payload") if case_pass: - print(utils.GREEN("Check vxlan packet decap pass on virtIO port" - " %d" % vf_id)) + self.logger.info("Check vxlan packet decap pass on virtIO port" + " %d" % vf_id) if pkt_type == "vxlan_udp": # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac @@ -373,11 +373,11 @@ class TestVxlanSample(TestCase): self.verify(ord(payload[i]) == 88, "Check udp data failed") except: case_pass = False - print(utils.RED("Failure in checking packet payload")) + self.logger.error("Failure in checking packet payload") if case_pass: - print(utils.GREEN("Check vxlan packet decap and encap pass on " - "virtIO port %d" % vf_id)) + self.logger.info("Check vxlan packet decap and encap pass on " + "virtIO port %d" % vf_id) if pkt_type == "vxlan_udp_chksum": params['inner_l4_type'] = 'UDP' @@ -396,7 +396,7 @@ class TestVxlanSample(TestCase): vxlan_pkt = VxlanTestConfig(self, **params) vxlan_pkt.create_pcap() chksums_ref = vxlan_pkt.get_chksums() - print(utils.GREEN("Checksum reference: %s" % chksums_ref)) + self.logger.info("Checksum reference: %s" % chksums_ref) params['inner_ip_invalid'] = 1 params['inner_l4_invalid'] = 1 @@ -419,14 +419,14 @@ class TestVxlanSample(TestCase): pk_new.pktgen.assign_pkt(pkts) pk_new.pktgen.update_pkts() chksums = vxlan_pkt.get_chksums(pk_new) - print(utils.GREEN("Checksum : %s" % chksums)) + self.logger.info("Checksum : %s" % chksums) for key in chksums_ref: if 'inner' in key: # only check inner packet chksum self.verify(chksums[key] == chksums_ref[key], "%s not matched to %s" % (key, chksums_ref[key])) - print(utils.GREEN("%s checksum pass" % params['inner_l4_type'])) + self.logger.info("%s checksum pass" % params['inner_l4_type']) if pkt_type == "vxlan_tcp_tso": # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac + @@ -459,15 +459,15 @@ class TestVxlanSample(TestCase): del inner.chksum inner[IP] = inner[IP].__class__(str(inner[IP])) inner_ip_chksum_ref = inner[IP].chksum - print(utils.GREEN("inner ip checksum reference: %x" % inner_ip_chksum_ref)) - print(utils.GREEN("inner ip checksum: %x" % inner_ip_chksum)) + self.logger.info("inner ip checksum reference: %x" % inner_ip_chksum_ref) + self.logger.info("inner ip checksum: %x" % inner_ip_chksum) self.verify(inner_ip_chksum == inner_ip_chksum_ref, "inner ip checksum error") inner_l4_chksum = inner[params['inner_l4_type']].chksum del inner[params['inner_l4_type']].chksum inner[params['inner_l4_type']] = inner[params['inner_l4_type']].__class__(str(inner[params['inner_l4_type']])) inner_l4_chksum_ref = inner[params['inner_l4_type']].chksum - print(utils.GREEN("inner l4 checksum reference: %x" % inner_l4_chksum_ref)) - print(utils.GREEN("inner l4 checksum: %x" % inner_l4_chksum)) + self.logger.info("inner l4 checksum reference: %x" % inner_l4_chksum_ref) + self.logger.info("inner l4 checksum: %x" % inner_l4_chksum) self.verify(inner_l4_chksum == inner_l4_chksum_ref, "inner %s checksum error" % params['inner_l4_type']) length = 0 @@ -481,12 +481,12 @@ class TestVxlanSample(TestCase): length += len(payload) except: case_pass = False - print(utils.RED("Failure in checking tso payload")) + self.logger.error("Failure in checking tso payload") self.verify(length == 892, "Total tcp payload size not match") if case_pass: - print(utils.GREEN("Vxlan packet tso pass on virtIO port %d" - % vf_id)) + self.logger.info("Vxlan packet tso pass on virtIO port %d" + % vf_id) def test_perf_vxlan_sample(self): # vxlan payload length for performance test -- 2.21.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] [PATCH V1 2/2] test/vxlan_sample: python3 support 2020-02-13 6:28 ` [dts] [PATCH V1 2/2] test/vxlan_sample: " yufengmx @ 2020-02-13 10:31 ` Tu, Lijuan 0 siblings, 0 replies; 5+ messages in thread From: Tu, Lijuan @ 2020-02-13 10:31 UTC (permalink / raw) To: Mo, YufengX, dts, Ma, LihongX; +Cc: Mo, YufengX Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx > Sent: Thursday, February 13, 2020 2:28 PM > To: dts@dpdk.org; Ma, LihongX <lihongx.ma@intel.com> > Cc: Mo, YufengX <yufengx.mo@intel.com> > Subject: [dts] [PATCH V1 2/2] test/vxlan_sample: python3 support > > > python3 support. > > Signed-off-by: yufengmx <yufengx.mo@intel.com> > --- > tests/TestSuite_vxlan_sample.py | 42 ++++++++++++++++----------------- > 1 file changed, 21 insertions(+), 21 deletions(-) > > diff --git a/tests/TestSuite_vxlan_sample.py > b/tests/TestSuite_vxlan_sample.py index 7d4be40..df9d3a6 100644 > --- a/tests/TestSuite_vxlan_sample.py > +++ b/tests/TestSuite_vxlan_sample.py > @@ -202,11 +202,11 @@ class TestVxlanSample(TestCase): > if self.vm_dut is None: > raise Exception("Set up VM ENV failed!") > except Exception as e: > - print(utils.RED("Failure for %s" % str(e))) > + self.logger.error("Failure for %s" % str(e)) > > # create another vm > if vm_num == 2: > - print("not implemented now") > + self.logger.warning("not implemented now") > > return True > > @@ -303,11 +303,11 @@ class TestVxlanSample(TestCase): > self.verify(ord(payload[i]) == 88, "Check udp data failed") > except: > case_pass = False > - print(utils.RED("Failure in checking packet payload")) > + self.logger.error("Failure in checking packet payload") > > if case_pass: > - print(utils.GREEN("Check normal udp packet forward pass on " > - "virtIO port %d" % vf_id)) > + self.logger.info("Check normal udp packet forward pass on " > + "virtIO port %d" % vf_id) > > if pkt_type == "vxlan_udp_decap": > # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac @@ > -338,11 +338,11 @@ class TestVxlanSample(TestCase): > self.verify(ord(payload[i]) == 88, "Check udp data failed") > except: > case_pass = False > - print(utils.RED("Failure in checking packet payload")) > + self.logger.error("Failure in checking packet payload") > > if case_pass: > - print(utils.GREEN("Check vxlan packet decap pass on virtIO port" > - " %d" % vf_id)) > + self.logger.info("Check vxlan packet decap pass on virtIO port" > + " %d" % vf_id) > > if pkt_type == "vxlan_udp": > # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac @@ > -373,11 +373,11 @@ class TestVxlanSample(TestCase): > self.verify(ord(payload[i]) == 88, "Check udp data failed") > except: > case_pass = False > - print(utils.RED("Failure in checking packet payload")) > + self.logger.error("Failure in checking packet payload") > > if case_pass: > - print(utils.GREEN("Check vxlan packet decap and encap pass on " > - "virtIO port %d" % vf_id)) > + self.logger.info("Check vxlan packet decap and encap pass on " > + "virtIO port %d" % vf_id) > > if pkt_type == "vxlan_udp_chksum": > params['inner_l4_type'] = 'UDP' > @@ -396,7 +396,7 @@ class TestVxlanSample(TestCase): > vxlan_pkt = VxlanTestConfig(self, **params) > vxlan_pkt.create_pcap() > chksums_ref = vxlan_pkt.get_chksums() > - print(utils.GREEN("Checksum reference: %s" % chksums_ref)) > + self.logger.info("Checksum reference: %s" % chksums_ref) > > params['inner_ip_invalid'] = 1 > params['inner_l4_invalid'] = 1 @@ -419,14 +419,14 @@ class > TestVxlanSample(TestCase): > pk_new.pktgen.assign_pkt(pkts) > pk_new.pktgen.update_pkts() > chksums = vxlan_pkt.get_chksums(pk_new) > - print(utils.GREEN("Checksum : %s" % chksums)) > + self.logger.info("Checksum : %s" % chksums) > for key in chksums_ref: > if 'inner' in key: # only check inner packet chksum > self.verify(chksums[key] == chksums_ref[key], > "%s not matched to %s" > % (key, chksums_ref[key])) > > - print(utils.GREEN("%s checksum pass" % params['inner_l4_type'])) > + self.logger.info("%s checksum pass" % > + params['inner_l4_type']) > > if pkt_type == "vxlan_tcp_tso": > # create vxlan packet pf mac + vni=1000 + inner virtIO port0 mac + > @@ -459,15 +459,15 @@ class TestVxlanSample(TestCase): > del inner.chksum > inner[IP] = inner[IP].__class__(str(inner[IP])) > inner_ip_chksum_ref = inner[IP].chksum > - print(utils.GREEN("inner ip checksum reference: %x" % > inner_ip_chksum_ref)) > - print(utils.GREEN("inner ip checksum: %x" % inner_ip_chksum)) > + self.logger.info("inner ip checksum reference: %x" % > inner_ip_chksum_ref) > + self.logger.info("inner ip checksum: %x" % > + inner_ip_chksum) > self.verify(inner_ip_chksum == inner_ip_chksum_ref, "inner ip > checksum error") > inner_l4_chksum = inner[params['inner_l4_type']].chksum > del inner[params['inner_l4_type']].chksum > inner[params['inner_l4_type']] = > inner[params['inner_l4_type']].__class__(str(inner[params['inner_l4_type']])) > inner_l4_chksum_ref = inner[params['inner_l4_type']].chksum > - print(utils.GREEN("inner l4 checksum reference: %x" % > inner_l4_chksum_ref)) > - print(utils.GREEN("inner l4 checksum: %x" % inner_l4_chksum)) > + self.logger.info("inner l4 checksum reference: %x" % > inner_l4_chksum_ref) > + self.logger.info("inner l4 checksum: %x" % > + inner_l4_chksum) > self.verify(inner_l4_chksum == inner_l4_chksum_ref, "inner %s > checksum error" % params['inner_l4_type']) > > length = 0 > @@ -481,12 +481,12 @@ class TestVxlanSample(TestCase): > length += len(payload) > except: > case_pass = False > - print(utils.RED("Failure in checking tso payload")) > + self.logger.error("Failure in checking tso > + payload") > > self.verify(length == 892, "Total tcp payload size not match") > if case_pass: > - print(utils.GREEN("Vxlan packet tso pass on virtIO port %d" > - % vf_id)) > + self.logger.info("Vxlan packet tso pass on virtIO port %d" > + % vf_id) > > def test_perf_vxlan_sample(self): > # vxlan payload length for performance test > -- > 2.21.0 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-13 10:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-02-13 6:28 [dts] [PATCH V1 0/2] tests: python3 support yufengmx 2020-02-13 6:28 ` [dts] [PATCH V1 1/2] test/iavf: " yufengmx 2020-02-13 10:31 ` Tu, Lijuan 2020-02-13 6:28 ` [dts] [PATCH V1 2/2] test/vxlan_sample: " yufengmx 2020-02-13 10:31 ` Tu, Lijuan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).