test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuan.tu@intel.com>
To: dts@dpdk.org
Cc: Lijuan Tu <lijuan.tu@intel.com>
Subject: [dts] [PATCH] tests/vf_macfilter: move function description into the right place
Date: Thu, 29 Nov 2018 01:31:00 +0800	[thread overview]
Message-ID: <1543426260-70337-1-git-send-email-lijuan.tu@intel.com> (raw)

align with pep8, function description should be put under the function name
and before the implementing codes.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 tests/TestSuite_vf_macfilter.py | 61 +++++++++++++++++++++++++----------------
 1 file changed, 37 insertions(+), 24 deletions(-)

diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py
index 5998d38..9e6db42 100644
--- a/tests/TestSuite_vf_macfilter.py
+++ b/tests/TestSuite_vf_macfilter.py
@@ -118,13 +118,16 @@ class TestVfMacFilter(TestCase):
             port.bind_driver()
 
         self.setup_2pf_2vf_1vm_env_flag = 0
-
-######1. test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter scenario
-###### kernel pf will first run 'ip link set pf_interface vf 0 mac xx:xx:xx:xx:xx:xx, then 
-###### in the vm, send packets with this MAC to VF, check if the MAC filter works. Also 
-###### send the packets with wrong MAC address to VF, check if the VF will not RX the packets.
  
     def test_kernel_2pf_2vf_1vm_iplink_macfilter(self):
+        """
+        test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter
+        scenario
+        kernel pf will first run 'ip link set pf_interface vf 0 mac
+        xx:xx:xx:xx:xx:xx', then send packets with this MAC to VF, check
+        if the MAC filter works. Also send the packets with wrong MAC
+        address to VF, check if the VF will not RX the packets.
+        """
         self.setup_2pf_2vf_1vm_env(driver='',True)
         self.result_verify_iplink(True)
 
@@ -162,34 +165,44 @@ class TestVfMacFilter(TestCase):
         print "\nshow port stats in testpmd for double check: \n", self.vm0_testpmd.execute_cmd('show port stats all')
         self.verify(result2 != True, "VF0 failed to forward packets to VF1")
 
-
-#######2. test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter scenario.
-####### kernel pf will not set MAC address and the VF will get a random generated MAC
-####### in the testpmd in VM, and then add VF mac address in the testpmd,for example, VF_MAC1
-####### then send packets to the VF with the random generated MAC and the new added VF_MAC1 
-####### and the expected result is that all packets can be RXed and TXed. What's more, send
-####### packets with a wrong MAC address to the VF will not received by the VF. 
-
     def test_kernel_2pf_2vf_1vm_mac_add_filter(self):
-
+        """
+        test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter
+        scenario.
+        kernel pf will not set MAC address and the VF will get a random
+        generated MAC in the testpmd in VM, and then add VF mac address
+        in the testpmd,for example, VF_MAC1 then send packets to the VF
+        with the random generated MAC and the new added VF_MAC1 and the
+        expected result is that all packets can be RXed and TXed.
+        What's more, send packets with a wrong MAC address to the VF will
+        not received by the VF.
+        """
         self.setup_2pf_2vf_1vm_env(driver='',False)
         self.send_packet_and_verify()
 
-#######3. test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario.
-####### kernel pf will not set MAC address and the VF will get a random generated MAC
-####### in the testpmd in VM, and then add VF mac address in the testpmd,for example, VF_MAC1
-####### then send packets to the VF with the random generated MAC and the new added VF_MAC1
-####### and the expected result is that all packets can be RXed and TXed. What's more, send
-####### packets with a wrong MAC address to the VF will not received by the VF.
     def test_dpdk_2pf_2vf_1vm_mac_add_filter(self):
+        """
+        test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario
+        dpdk pf will not set MAC address and the VF will get a random
+        generated MAC in the testpmd in VM, and then add VF mac address
+        in the testpmd,for example, VF_MAC1 then send packets to the VF
+        with the random generated MAC and the new added VF_MAC1 and the
+        expected result is that all packets can be RXed and TXed.
+        What's more, send packets with a wrong MAC address to the VF will
+        not received by the VF.
+        """
         self.setup_2pf_2vf_1vm_env(driver='igb_uio',False)
         self.send_packet_and_verify()
 
-######4. test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario
-###### dpdk pf will first run 'set vf mac addr 0 0 xx:xx:xx:xx:xx:xx, then
-###### in the vm, send packets with this MAC to VF, check if the MAC filter works. Also
-###### send the packets with wrong MAC address to VF, check if the VF will not RX the packets.
     def test_dpdk_2pf_2vf_1vm_iplink_macfilter(self):
+        """
+        test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario
+        dpdk pf will first run 'set vf mac addr 0 0 xx:xx:xx:xx:xx:xx,
+        then send packets with this MAC to VF, check if the MAC filter
+        send the packets with wrong MAC address to VF, check if the VF will
+        not RX the packets works. Also send the packets with wrong MAC
+        address to VF, check if the VF will not RX the packets.
+        """
         self.setup_2pf_2vf_1vm_env(driver='igb_uio',False)
         self.result_verify_iplink(False)
 
-- 
1.8.3.1

                 reply	other threads:[~2018-11-28  9:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543426260-70337-1-git-send-email-lijuan.tu@intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).