From: Xinfeng Zhao <xinfengx.zhao@intel.com>
To: dts@dpdk.org
Cc: Xinfeng Zhao <xinfengx.zhao@intel.com>
Subject: [dts] [PATCH V1 4/5] tests/TestSuite_ddp_mpls.py: load the local dep module in scapy command
Date: Wed, 18 Sep 2019 07:19:24 +0800 [thread overview]
Message-ID: <1568762365-19112-4-git-send-email-xinfengx.zhao@intel.com> (raw)
In-Reply-To: <1568762365-19112-1-git-send-email-xinfengx.zhao@intel.com>
Signed-off-by: Xinfeng Zhao <xinfengx.zhao@intel.com>
---
tests/TestSuite_ddp_mpls.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py
index 547e1c9..8e74047 100644
--- a/tests/TestSuite_ddp_mpls.py
+++ b/tests/TestSuite_ddp_mpls.py
@@ -1,6 +1,7 @@
# <COPYRIGHT_TAG>
import time
+import os
import sys
import utils
from scapy.utils import rdpcap
@@ -8,12 +9,15 @@ from scapy.utils import rdpcap
from qemu_kvm import QEMUKvm
from test_case import TestCase
from pmd_output import PmdOutput
-from settings import get_nic_name
+from settings import get_nic_name, FOLDERS
import random
VM_CORES_MASK = 'all'
PF_MAX_QUEUE = 64
VF_MAX_QUEUE = 4
+CWD = os.getcwd()
+DIR_DEPEND = os.path.join(CWD, FOLDERS['Depends'])
+
class Testddp_mpls(TestCase):
supported_vf_driver = ['pci-stub', 'vfio-pci']
@@ -175,7 +179,9 @@ class Testddp_mpls(TestCase):
/MPLS(label=%s)/Ether()/IP()/UDP()'% label,
'mpls/bad chksum gre': 'Ether()/IP(proto=47)/GRE(chksum=0x1234,\
proto=0x8847)/MPLS(label=%s)/Ether()/IP()/UDP()'% label }
- for packet_type in pkts.keys():
+ for packet_type in pkts.keys():
+ self.tester.scapy_append("sys.path.append('%s')" % DIR_DEPEND)
+ self.tester.scapy_append("from mpls import *")
self.tester.scapy_append('sendp([%s], iface="%s")'
% (pkts[packet_type], self.tester_intf))
self.tester.scapy_execute()
--
2.17.1
next prev parent reply other threads:[~2019-09-18 7:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 23:19 [dts] [PATCH V1 1/5] dep: add dependency modules for ddp suites Xinfeng Zhao
2019-09-17 23:19 ` [dts] [PATCH V1 2/5] tests/TestSuite_ddp_gtp.py: load the local dep module in scapy command Xinfeng Zhao
2019-09-17 23:19 ` [dts] [PATCH V1 3/5] tests/TestSuite_ddp_gtp_qregion.py: " Xinfeng Zhao
2019-09-17 23:19 ` Xinfeng Zhao [this message]
2019-09-17 23:19 ` [dts] [PATCH V1 5/5] tests/TestSuite_ddp_ppp_l2tp.py: " Xinfeng Zhao
2019-09-18 7:28 ` [dts] [PATCH V1 1/5] dep: add dependency modules for ddp suites Zhao, XinfengX
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=1568762365-19112-4-git-send-email-xinfengx.zhao@intel.com \
--to=xinfengx.zhao@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).