test suite reviews and discussions
 help / color / mirror / Atom feed
* [PATCH] remove dep/scapy_modules
@ 2022-03-11 13:29 Lijuan Tu
  2022-03-15 10:54 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2022-03-11 13:29 UTC (permalink / raw)
  To: junx.dong; +Cc: dts, Lijuan Tu

As dot1br removed, the scapy_modules is retired.

Fixes: 5bdc6eee4cc7 ("framework/*: Remove Dot1BR related code")

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 dep/scapy_modules/Dot1BR.py                  | 34 --------------------
 dep/scapy_modules/__init__.py                | 30 -----------------
 framework/settings.py                        |  1 -
 framework/tester.py                          | 12 -------
 tests/TestSuite_vxlan_gpe_support_in_i40e.py |  5 ---
 5 files changed, 82 deletions(-)
 delete mode 100644 dep/scapy_modules/Dot1BR.py
 delete mode 100644 dep/scapy_modules/__init__.py

diff --git a/dep/scapy_modules/Dot1BR.py b/dep/scapy_modules/Dot1BR.py
deleted file mode 100644
index 162ac7dc..00000000
--- a/dep/scapy_modules/Dot1BR.py
+++ /dev/null
@@ -1,34 +0,0 @@
-## This file is part of Scapy
-## See http://www.secdev.org/projects/scapy for more informations
-## Copyright (C) Philippe Biondi <phil@secdev.org>
-## This program is published under a GPLv2 license
-
-## Copyright (c) 2016 Marvin liu <yong.liu@intel.com>
-
-"""
-VBPE (virtual brige port extenstion)
-"""
-
-from scapy.data import ETHER_TYPES
-from scapy.fields import *
-from scapy.layers.l2 import Ether
-from scapy.packet import *
-
-
-class Dot1BR(Packet):
-    name = "802.1BR"
-    aliastypes = [ Ether ]
-    fields_desc =  [
-                     BitField("EPCP", 0, 3),
-                     BitField("EEDI", 0, 1),
-                     BitField("IngressECIDbase", 0, 12),
-                     BitField("Reserverd", 0, 2),
-                     BitField("GRP", 0, 2),
-                     BitField("ECIDbase", 0, 12),
-                     BitField("IngressECIDext", 0, 8),
-                     BitField("ECIDext", 0, 8),
-                     XShortEnumField("type", 0x0000, ETHER_TYPES) ]
-    def mysummary(self):
-        return self.sprintf("802.1BR E-CID %Ingress_E-CID_base%")
-
-bind_layers(Ether, Dot1BR, type=0x893F)
diff --git a/dep/scapy_modules/__init__.py b/dep/scapy_modules/__init__.py
deleted file mode 100644
index ae0043b7..00000000
--- a/dep/scapy_modules/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/python3
-# BSD LICENSE
-#
-# Copyright (c) 2021 PANTHEON.tech s.r.o.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-#   * Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-#   * Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in
-#     the documentation and/or other materials provided with the
-#     distribution.
-#   * Neither the name of PANTHEON.tech s.r.o. nor the names of its
-#     contributors may be used to endorse or promote products derived
-#     from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/framework/settings.py b/framework/settings.py
index 8b06ffac..7399a774 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -43,7 +43,6 @@ FOLDERS = {
     'Depends': 'dep',
     'Output': 'output',
     'NicDriver': 'nics',
-    'scapy_modules': 'scapy_modules'
 }
 
 """
diff --git a/framework/tester.py b/framework/tester.py
index 636129cf..bd903ce6 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -106,18 +106,6 @@ class Tester(Crb):
         session = self.create_session(session_name)
         self.scapy_sessions_li.append(session)
         session.send_expect('scapy', '>>> ')
-        file_dir = os.path.dirname(__file__).split(os.path.sep)
-        lib_path = os.path.sep.join(file_dir[:-1]) + '/dep/scapy_modules/'
-
-        # get contrib module path on tester
-        scapy_module_path = session.session.send_expect("os.path.dirname(sys.modules['scapy'].__file__)", '>>>')
-        contrib_module_path = scapy_module_path.replace("'", "") + '/contrib'
-
-        # import scapy moudle to scapy APP
-        out = session.session.send_expect(get_scapy_module_impcmd(), '>>> ')
-        if 'ImportError' in out:
-            session.logger.warning(f'entering import error: {out}')
-
         return session
 
     def check_scapy_version(self):
diff --git a/tests/TestSuite_vxlan_gpe_support_in_i40e.py b/tests/TestSuite_vxlan_gpe_support_in_i40e.py
index a2002247..fe0a809c 100644
--- a/tests/TestSuite_vxlan_gpe_support_in_i40e.py
+++ b/tests/TestSuite_vxlan_gpe_support_in_i40e.py
@@ -122,11 +122,6 @@ class VxlanGpeTestConfig(object):
         """
         Send vxlan pcap file by iface
         """
-        # load vxlan module to scapy
-        cwd = os.getcwd()
-        dir_vxlan_module = cwd + r'/' + FOLDERS['Depends'] + r'/' + FOLDERS['scapy_modules']
-        self.test_case.tester.scapy_append("sys.path.append('%s')" % dir_vxlan_module)
-        self.test_case.tester.scapy_append("from scapy.layers.vxlan import VXLAN")
         self.test_case.tester.scapy_append(
             'pcap = rdpcap("%s")' % self.pcap_file)
         self.test_case.tester.scapy_append(
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] remove dep/scapy_modules
  2022-03-11 13:29 [PATCH] remove dep/scapy_modules Lijuan Tu
@ 2022-03-15 10:54 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2022-03-15 10:54 UTC (permalink / raw)
  To: junx.dong, Lijuan Tu; +Cc: dts, Lijuan Tu

On Fri, 11 Mar 2022 21:29:18 +0800, Lijuan Tu <lijuan.tu@intel.com> wrote:
> As dot1br removed, the scapy_modules is retired.
> 
> Fixes: 5bdc6eee4cc7 ("framework/*: Remove Dot1BR related code")
> 
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
> 

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-15 10:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 13:29 [PATCH] remove dep/scapy_modules Lijuan Tu
2022-03-15 10:54 ` lijuan.tu

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).