From: Peng Zhihong <zhihongx.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Zhihong <zhihongx.peng@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_kernelpf_iavf.py:An abnormal exit needs to execute the same command as a normal exit.
Date: Wed, 6 Nov 2019 15:54:30 +0800 [thread overview]
Message-ID: <20191106075430.15566-1-zhihongx.peng@intel.com> (raw)
An abnormal exit needs to execute the same command as a normal exit.
Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
tests/TestSuite_kernelpf_iavf.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 668eb28..89c22d3 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -47,6 +47,7 @@ from pmd_output import PmdOutput
from settings import HEADER_SIZE
from packet import Packet
from utils import RED
+from exception import VerifyFailure
VM_CORES_MASK = 'all'
MAX_VLAN = 4095
@@ -336,18 +337,27 @@ class TestKernelpfIavf(TestCase):
self.vm_testpmd.execute_cmd("start")
self.send_random_pkt(self.vf_mac, count=1)
out = self.vm_dut.get_session_output()
- self.verify(self.vf_mac in out, 'vf receive pkt fail with current mac')
+ if self.vf_mac not in out:
+ self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
+ raise VerifyFailure('allmulti all off vf receive pkt fail with current mac')
self.send_random_pkt(multicast_mac, count=1)
out = self.vm_dut.get_session_output()
- self.verify(multicast_mac not in out, 'vf receive pkt with multicast mac')
+ if multicast_mac in out:
+ self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
+ raise VerifyFailure('allmulti all off vf receive pkt with multicast mac')
self.vm_testpmd.execute_cmd("set allmulti all on")
self.send_random_pkt(self.vf_mac, count=1)
out = self.vm_dut.get_session_output()
- self.verify(self.vf_mac in out, 'vf receive pkt fail with current mac')
+ if self.vf_mac not in out:
+ self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
+ raise VerifyFailure('allmulti all on vf receive pkt fail with current mac')
self.send_random_pkt(multicast_mac, count=1)
out = self.vm_dut.get_session_output()
- self.verify(multicast_mac in out, 'vf receive pkt fail with multicast mac')
+ if multicast_mac not in out:
+ self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
+ raise VerifyFailure('allmulti all on vf receive pkt fail with multicast mac')
+
self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ")
def test_vf_broadcast(self):
--
2.17.1
next reply other threads:[~2019-11-06 8:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 7:54 Peng Zhihong [this message]
2019-11-07 7:10 ` Ma, LihongX
2019-11-07 7:21 ` Peng, ZhihongX
2019-11-08 5:12 ` Ma, LihongX
2019-11-22 6:09 ` Tu, Lijuan
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=20191106075430.15566-1-zhihongx.peng@intel.com \
--to=zhihongx.peng@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).