new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
deleted file mode 100755
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# <COPYRIGHT_TAG>
-
-PWD=`dirname $0`
-
-(cd $PWD/framework; ./main.py $@)
new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
@@ -2,8 +2,8 @@ import xlrd
import collections
import json
-from settings import get_nic_name, load_global_setting, HOST_DRIVER_SETTING
-from utils import RED
+from .settings import get_nic_name, load_global_setting, HOST_DRIVER_SETTING
+from .utils import RED
filter_json_file = './conf/test_case_checklist.json'
support_json_file = './conf/test_case_supportlist.json'
@@ -36,10 +36,10 @@ import os
import re
import configparser # config parse module
import argparse # parse arguments module
-from settings import (IXIA, PKTGEN, PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK,
+from .settings import (IXIA, PKTGEN, PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK,
CONFIG_ROOT_PATH, SUITE_SECTION_NAME)
-from settings import load_global_setting, DTS_CFG_FOLDER
-from exception import ConfigParseException, VirtConfigParseException, PortConfigParseException
+from .settings import load_global_setting, DTS_CFG_FOLDER
+from .exception import ConfigParseException, VirtConfigParseException, PortConfigParseException
PORTCONF = "%s/ports.cfg" % CONFIG_ROOT_PATH
CRBCONF = "%s/crbs.cfg" % CONFIG_ROOT_PATH
@@ -32,10 +32,10 @@
import time
import re
import os
-from settings import TIMEOUT, IXIA
-from ssh_connection import SSHConnection
-from logger import getLogger
-from config import PortConf, PORTCONF, PktgenConf
+from .settings import TIMEOUT, IXIA
+from .ssh_connection import SSHConnection
+from .logger import getLogger
+from .config import PortConf, PORTCONF, PktgenConf
"""
CRB (customer reference board) basic functions and handlers
@@ -578,7 +578,7 @@ class Crb(object):
"""
Get OS type from execution configuration file.
"""
- from dut import Dut
+ from .dut import Dut
if isinstance(self, Dut) and 'OS' in self.crb:
return str(self.crb['OS']).lower()
@@ -588,7 +588,7 @@ class Crb(object):
"""
Check real OS type whether match configured type.
"""
- from dut import Dut
+ from .dut import Dut
expected = 'Linux.*#'
if isinstance(self, Dut) and self.get_os_type() == 'freebsd':
expected = 'FreeBSD.*#'
@@ -1,7 +1,7 @@
"""
Static configuration data for any CRBs that can be used.
"""
-from settings import IXIA
+from .settings import IXIA
crbs_desc = {
'CrownPassCRB1':
@@ -28,10 +28,10 @@ import signal
import code
import time
import imp
-from settings import load_global_setting, DEBUG_SETTING, DTS_PARALLEL_SETTING
-from utils import get_subclasses, copy_instance_attr, GREEN
+from .settings import load_global_setting, DEBUG_SETTING, DTS_PARALLEL_SETTING
+from .utils import get_subclasses, copy_instance_attr, GREEN
-from test_case import TestCase
+from .test_case import TestCase
console = None # global console object
debug_cmd = '' # global debug state
@@ -59,7 +59,7 @@ def list_command():
List all connection sessions and can be reference of connect command.
"""
index = 0
- from ssh_connection import CONNECTIONS
+ from .ssh_connection import CONNECTIONS
for connection in CONNECTIONS:
for name, session in list(connection.items()):
console.push('print \'connect %d: %10s\'' % (index, name))
@@ -70,7 +70,7 @@ def connect_command(connect):
"""
Connect to ssh session and give control to user.
"""
- from ssh_connection import CONNECTIONS
+ from .ssh_connection import CONNECTIONS
if type(connect) == int:
name, session = list(CONNECTIONS[connect].items())[0]
print(GREEN("Connecting to session[%s]" % name))
@@ -32,7 +32,7 @@
import re # regular expressions module
import configparser # config parse module
import os # operation system module
-import texttable # text format
+import framework.texttable as texttable # text format
import traceback # exception traceback
import inspect # load attribute
import atexit # register callback when exit
@@ -41,24 +41,24 @@ import signal # signal module for debug mode
import time # time module for unique output folder
import copy # copy module for duplicate variable
-import rst # rst file support
+import framework.rst as rst # rst file support
import sys # system module
-import settings # dts settings
-from tester import Tester
-from dut import Dut
-from serializer import Serializer
-from test_case import TestCase
-from test_result import Result
-from stats_reporter import StatsReporter
-from excel_reporter import ExcelReporter
-from json_reporter import JSONReporter
-from exception import TimeoutException, ConfigParseException, VerifyFailure
-from logger import getLogger
-import logger
-import debugger
-from config import CrbsConf
-from checkCase import CheckCase
-from utils import (get_subclasses, copy_instance_attr, create_parallel_locks,
+import framework.settings as settings # dts settings
+from .tester import Tester
+from .dut import Dut
+from .serializer import Serializer
+from .test_case import TestCase
+from .test_result import Result
+from .stats_reporter import StatsReporter
+from .excel_reporter import ExcelReporter
+from .json_reporter import JSONReporter
+from .exception import TimeoutException, ConfigParseException, VerifyFailure
+from .logger import getLogger
+import framework.logger as logger
+import framework.debugger as debugger
+from .config import CrbsConf
+from .checkCase import CheckCase
+from .utils import (get_subclasses, copy_instance_attr, create_parallel_locks,
check_dts_python_version)
import sys
import imp
@@ -32,14 +32,14 @@
import os
import re
import time
-import settings
-from config import PortConf,AppNameConf
-from settings import NICS, LOG_NAME_SEP
-from ssh_connection import SSHConnection
-from crb import Crb
-from net_device import GetNicObj
-from virt_resource import VirtResource
-from utils import RED, remove_old_rsa_key
+import framework.settings as settings
+from .config import PortConf,AppNameConf
+from .settings import NICS, LOG_NAME_SEP
+from .ssh_connection import SSHConnection
+from .crb import Crb
+from nics.net_device import GetNicObj
+from .virt_resource import VirtResource
+from .utils import RED, remove_old_rsa_key
from uuid import uuid4
@@ -32,12 +32,12 @@
import re
import string
import time
-from config import IxiaConf
-from ssh_connection import SSHConnection
-from settings import SCAPY2IXIA
-from logger import getLogger
-from exception import VerifyFailure
-from utils import create_mask
+from .config import IxiaConf
+from .ssh_connection import SSHConnection
+from .settings import SCAPY2IXIA
+from .logger import getLogger
+from .exception import VerifyFailure
+from .utils import create_mask
class SoftwarePacketGenerator():
@@ -40,11 +40,11 @@ from typing import List, FrozenSet, Union, Iterable, Tuple
from scapy.layers.l2 import Ether
-from flow.enums import FlowItemType, FlowActionType
-from flow.exceptions import InvalidFlowItemException
-from flow.flow_action_items import ActionFlowItem
-from flow.flow_items import FlowItem
-from flow.flow_pattern_items import PatternFlowItem, TUNNELING_PROTOCOLS
+from .enums import FlowItemType, FlowActionType
+from .exceptions import InvalidFlowItemException
+from .flow_action_items import ActionFlowItem
+from .flow_items import FlowItem
+from .flow_pattern_items import PatternFlowItem, TUNNELING_PROTOCOLS
# Get reserved mac addresses
NEVER_MATCH_PACKET = Ether(src="", dst="") / ('\x00' * 64)
@@ -32,8 +32,8 @@
from typing import FrozenSet, Dict, Tuple
-from flow.enums import FlowActionType
-from flow.flow_pattern_items import FlowItem
+from .enums import FlowActionType
+from .flow_items import FlowItem
ALWAYS_ALLOWED_ACTIONS = {FlowActionType.VOID}
@@ -37,10 +37,10 @@ import itertools
from functools import reduce
from typing import FrozenSet, Union, Any, Set, Dict, Tuple, Iterable, Hashable
-from flow.enums import FlowItemType, FlowActionType
-from flow.exceptions import InvalidFlowItemException
-from flow import flow_action_items
-from flow import flow_pattern_items
+from .enums import FlowItemType, FlowActionType
+from .exceptions import InvalidFlowItemException
+import framework.flow.flow_action_items as flow_action_items
+import framework.flow.flow_pattern_items as flow_pattern_items
PATTERN_ACTION_ITEMS = {FlowItemType.INVERT, FlowItemType.VOID, FlowItemType.MARK, FlowItemType.META}
@@ -90,7 +90,7 @@ class FlowItem(object):
raise InvalidFlowItemException(self, other)
elif other.type in self.valid_next_items:
# This import is in here so there is no circular import
- from flow.flow import Flow
+ from .flow import Flow
if isinstance(self, flow_pattern_items.PatternFlowItem):
return Flow(pattern_items=[self, other])
elif isinstance(self, flow_action_items.ActionFlowItem):
@@ -40,9 +40,9 @@ from scapy.layers.sctp import SCTP
from scapy.layers.vxlan import VXLAN
from scapy.packet import Packet
-from flow.enums import FlowItemType
-from flow.exceptions import InvalidFlowItemException
-from flow.flow_items import FlowItem
+from .enums import FlowItemType
+from .exceptions import InvalidFlowItemException
+from .flow_items import FlowItem
ALWAYS_ALLOWED_ITEMS = {
FlowItemType.RAW,
@@ -89,7 +89,7 @@ class PatternFlowItem(FlowItem):
if other.type in self.valid_next_items or \
other.type == FlowItemType.END:
# This import is in here so there is no circular import
- from flow.flow import Flow
+ from flow import Flow
return Flow(pattern_items=[self, other])
else:
raise InvalidFlowItemException(self, other)
@@ -32,9 +32,9 @@
from typing import Union
-from flow.enums import *
-from flow.flow import Flow
-import flow.flow_action_items as flow_action_items
+from .enums import *
+from .flow import Flow
+import framework.flow.flow_action_items as flow_action_items
class FlowPattern(Flow):
@@ -40,11 +40,11 @@ from typing import List, Set, Generator, Iterable, FrozenSet, Tuple
import numpy as np
-from flow.flow import Flow
-from flow.flow_pattern_items import PATTERN_ITEMS_TYPE_CLASS_MAPPING, PatternFlowItem, \
+from .flow import Flow
+from .flow_pattern_items import PATTERN_ITEMS_TYPE_CLASS_MAPPING, PatternFlowItem, \
PATTERN_OPERATION_TYPES, TUNNELING_PROTOCOL_TYPES, ALWAYS_ALLOWED_ITEMS, FlowItemEnd, FlowItemVxlan, FlowItemIpv4, \
FlowItemEth, FlowItemGre, L3_FLOW_TYPES, FlowItemVlan, FlowItemUdp
-from flow.flow_rule import FlowItemType
+from .flow_rule import FlowItemType
def get_valid_next_protocols(current_protocol, protocol_stack, type_denylist):
@@ -31,7 +31,7 @@
import os
import json
-from utils import convert_int2ip, convert_ip2int
+from framework.utils import convert_int2ip, convert_ip2int
class IxnetConfigStream(object):
@@ -35,8 +35,8 @@ import sys
import inspect
import re
-from settings import LOG_NAME_SEP, FOLDERS, load_global_setting, DTS_PARALLEL_SETTING
-from utils import RED
+from .settings import LOG_NAME_SEP, FOLDERS, load_global_setting, DTS_PARALLEL_SETTING
+from .utils import RED
"""
DTS logger module with several log level. DTS framework and TestSuite log
@@ -3,9 +3,9 @@ import re
import threadpool
import traceback
import threading
-from settings import DTS_ERR_TBL, save_global_setting, DTS_PARALLEL_SETTING
-from utils import RED
-from logger import getLogger
+from .settings import DTS_ERR_TBL, save_global_setting, DTS_PARALLEL_SETTING
+from .utils import RED
+from .logger import getLogger
class MultipleVM(object):
@@ -74,7 +74,7 @@ class MultipleVM(object):
self.logger.info("Parallel task start for DUT%d %s" % (dut_id, vm_name))
threading.current_thread().name = vm_name
- from qemu_kvm import QEMUKvm
+ from .qemu_kvm import QEMUKvm
# VM configured by configuration file
if 'virt_config' in args:
suite_name = args['virt_config']['suite_name']
@@ -36,6 +36,7 @@ Base on scapy(python program for packet manipulation)
from socket import AF_INET6
from importlib import import_module
from scapy.all import *
+from dep.scapy_modules.Dot1BR import Dot1BR
# load extension layers
exec_file = os.path.realpath(__file__)
DTS_PATH = exec_file.replace('/framework/packet.py', '')
@@ -44,43 +45,30 @@ TMP_PATH = DTS_PATH[:-1] + '/output/tmp/pcap/' if exec_file.endswith('.pyc') els
if not os.path.exists(TMP_PATH):
os.system('mkdir -p %s' % TMP_PATH)
-DEP_FOLDER = DTS_PATH + '/dep'
-sys.path.append(DEP_FOLDER)
-sys.path.append(DEP_FOLDER + '/scapy_modules')
-from utils import convert_ip2int
-from utils import convert_int2ip
+from .utils import convert_ip2int
+from .utils import convert_int2ip
scapy_modules_required = {'gtp': ['GTP_U_Header', 'GTPPDUSessionContainer'],
'lldp': ['LLDPDU', 'LLDPDUManagementAddress'],
- 'Dot1BR': ['Dot1BR'],
'pfcp': ['PFCP'],
'nsh': ['NSH'],
'igmp': ['IGMP'],
'mpls': ['MPLS'],
}
-local_modules = [m[:-3] for m in os.listdir(DEP_FOLDER + '/scapy_modules') if (m.endswith('.py') and not m.startswith('__'))]
for m in scapy_modules_required:
try:
- if m in local_modules:
- module = import_module(m)
- for clazz in scapy_modules_required[m]:
- locals().update({clazz: getattr(module, clazz)})
- else:
- module = import_module(f'scapy.contrib.{m}')
- for clazz in scapy_modules_required[m]:
- locals().update({clazz: getattr(module, clazz)})
+ module = import_module(f'scapy.contrib.{m}')
+ for clazz in scapy_modules_required[m]:
+ locals().update({clazz: getattr(module, clazz)})
except Exception as e:
print(e)
def get_scapy_module_impcmd():
cmd_li = list()
for m in scapy_modules_required:
- if m in local_modules:
- cmd_li.append(f'from {m} import {",".join(scapy_modules_required[m])}')
- else:
- cmd_li.append(f'from scapy.contrib.{m} import {",".join(scapy_modules_required[m])}')
+ cmd_li.append(f'from scapy.contrib.{m} import {",".join(scapy_modules_required[m])}')
return ';'.join(cmd_li)
SCAPY_IMP_CMD = get_scapy_module_impcmd()
@@ -39,15 +39,15 @@ from scapy.fields import ConditionalField
from scapy.utils import rdpcap
# dts libs
-from utils import (convert_int2ip, convert_ip2int,
+from .utils import (convert_int2ip, convert_ip2int,
convert_mac2long, convert_mac2str)
-from pktgen_base import (PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK, STAT_TYPE,
+from .pktgen_base import (PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK, STAT_TYPE,
TRANSMIT_CONT, TRANSMIT_M_BURST, TRANSMIT_S_BURST)
-from pktgen_base import DpdkPacketGenerator
-from pktgen_ixia import IxiaPacketGenerator
-from pktgen_ixia_network import IxNetworkPacketGenerator
-from pktgen_trex import TrexPacketGenerator
+from .pktgen_base import DpdkPacketGenerator
+from .pktgen_ixia import IxiaPacketGenerator
+from .pktgen_ixia_network import IxNetworkPacketGenerator
+from .pktgen_trex import TrexPacketGenerator
class PacketGeneratorHelper(object):
@@ -33,13 +33,13 @@ import time
import logging
from abc import abstractmethod
from copy import deepcopy
-from logger import getLogger
+from .logger import getLogger
from pprint import pformat
from enum import Enum, unique
-from config import PktgenConf
+from .config import PktgenConf
# packet generator name
-from settings import PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK, PKTGEN
+from .settings import PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK, PKTGEN
# macro definition
TRANSMIT_CONT = 'continuous'
@@ -34,12 +34,12 @@ import string
import time
from pprint import pformat
-from ssh_connection import SSHConnection
-from settings import SCAPY2IXIA
-from utils import (convert_int2ip, convert_ip2int,
+from .ssh_connection import SSHConnection
+from .settings import SCAPY2IXIA
+from .utils import (convert_int2ip, convert_ip2int,
convert_mac2long, convert_mac2str)
-from pktgen_base import (PacketGenerator, PKTGEN_IXIA,
+from .pktgen_base import (PacketGenerator, PKTGEN_IXIA,
TRANSMIT_CONT, TRANSMIT_M_BURST, TRANSMIT_S_BURST)
from scapy.packet import Packet
@@ -33,7 +33,7 @@ import time
import traceback
from pprint import pformat
-from pktgen_base import PacketGenerator, PKTGEN_IXIA_NETWORK
+from .pktgen_base import PacketGenerator, PKTGEN_IXIA_NETWORK
class IxNetworkPacketGenerator(PacketGenerator):
@@ -35,7 +35,7 @@ import time
import logging
from pprint import pformat
-from pktgen_base import (PacketGenerator, PKTGEN_TREX, PKTGEN,
+from .pktgen_base import (PacketGenerator, PKTGEN_TREX, PKTGEN,
TRANSMIT_CONT, TRANSMIT_M_BURST, TRANSMIT_S_BURST)
@@ -31,12 +31,12 @@
import os
import shutil
-from plotgraph import Plot2DGraph
+from .plotgraph import Plot2DGraph
from docutils.parsers.rst.directives import path
-from rst import path2Result
-import plotgraph
-import utils
-from exception import VerifyFailure
+from .rst import path2Result
+import framework.plotgraph as plotgraph
+import framework.utils as utils
+from .exception import VerifyFailure
"""
@@ -32,8 +32,8 @@
import os
import re
from time import sleep
-from settings import TIMEOUT, PROTOCOL_PACKET_SIZE, get_nic_driver
-from utils import create_mask
+from .settings import TIMEOUT, PROTOCOL_PACKET_SIZE, get_nic_driver
+from .utils import create_mask
class PmdOutput():
@@ -32,16 +32,16 @@
import os
import re
-from settings import NICS, load_global_setting, save_global_setting, accepted_nic
-from settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING, HOST_DRIVER_MODE_SETTING, HOST_BUILD_TYPE_SETTING
-from settings import HOST_SHARED_LIB_SETTING, HOST_SHARED_LIB_PATH
-from ssh_connection import SSHConnection
-from crb import Crb
-from dut import Dut
-from tester import Tester
-from logger import getLogger
-from settings import IXIA, DRIVERS
-from utils import RED
+from .settings import NICS, load_global_setting, save_global_setting, accepted_nic
+from .settings import DPDK_RXMODE_SETTING, HOST_DRIVER_SETTING, HOST_DRIVER_MODE_SETTING, HOST_BUILD_TYPE_SETTING
+from .settings import HOST_SHARED_LIB_SETTING, HOST_SHARED_LIB_PATH
+from .ssh_connection import SSHConnection
+from .crb import Crb
+from .dut import Dut
+from .tester import Tester
+from .logger import getLogger
+from .settings import IXIA, DRIVERS
+from .utils import RED
class DPDKdut(Dut):
@@ -34,11 +34,11 @@ import time
import re
import os
-from virt_base import VirtBase
-from virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN
-from exception import StartVMFailedException
-from settings import get_host_ip, load_global_setting, DTS_PARALLEL_SETTING
-from utils import parallel_lock, RED
+from .virt_base import VirtBase
+from .virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN
+from .exception import StartVMFailedException
+from .settings import get_host_ip, load_global_setting, DTS_PARALLEL_SETTING
+from .utils import parallel_lock, RED
# This name is directly defined in the qemu guest service
# So you can not change it except it is changed by the service
@@ -33,15 +33,15 @@ import time
import re
import os
-import utils
-from dut import Dut
-from ssh_connection import SSHConnection
-from virt_base import VirtBase
-from virt_resource import VirtResource
-from logger import getLogger
-from config import VirtConf
-from config import VIRTCONF
-from exception import StartVMFailedException
+import framework.utils as utils
+from .dut import Dut
+from .ssh_connection import SSHConnection
+from .virt_base import VirtBase
+from .virt_resource import VirtResource
+from .logger import getLogger
+from .config import VirtConf
+from .config import VIRTCONF
+from .exception import StartVMFailedException
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import ElementTree
from xml.dom import minidom
@@ -32,13 +32,13 @@
import os
import shutil
import re
-from exception import VerifyFailure
+from .exception import VerifyFailure
"""
Generate Rst Test Result Report
Example:
- import rst
+ import framework.rst as rst
rst.write_title("Test Case: " + test_case.__name__)
out = table.draw()
rst.write_text('\n' + out + '\n\n')
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from ssh_pexpect import SSHPexpect
-from settings import USERNAME
+from .settings import USERNAME
"""
Global structure for saving connections
@@ -1,9 +1,9 @@
import time
import pexpect
from pexpect import pxssh
-from debugger import ignore_keyintr, aware_keyintr
-from exception import TimeoutException, SSHConnectionException, SSHSessionDeadException
-from utils import RED, GREEN, parallel_lock
+from .debugger import ignore_keyintr, aware_keyintr
+from .exception import TimeoutException, SSHConnectionException, SSHSessionDeadException
+from .utils import RED, GREEN, parallel_lock
"""
Module handle ssh sessions between tester and DUT.
@@ -33,21 +33,21 @@
A base class for creating DTF test cases.
"""
import re
-import debugger
+import framework.debugger as debugger
import traceback
import signal
import time
-from exception import VerifyFailure, VerifySkip, TimeoutException
-from settings import DRIVERS, NICS, get_nic_name, load_global_setting
-from settings import PERF_SETTING, FUNC_SETTING, DEBUG_SETTING
-from settings import DEBUG_CASE_SETTING, HOST_DRIVER_SETTING
-from settings import UPDATE_EXPECTED, SUITE_SECTION_NAME
-from rst import RstReport
-from test_result import ResultTable, Result
-from logger import getLogger
-from config import SuiteConf
-from utils import BLUE, RED
+from .exception import VerifyFailure, VerifySkip, TimeoutException
+from .settings import DRIVERS, NICS, get_nic_name, load_global_setting
+from .settings import PERF_SETTING, FUNC_SETTING, DEBUG_SETTING
+from .settings import DEBUG_CASE_SETTING, HOST_DRIVER_SETTING
+from .settings import UPDATE_EXPECTED, SUITE_SECTION_NAME
+from .rst import RstReport
+from .test_result import ResultTable, Result
+from .logger import getLogger
+from .config import SuiteConf
+from .utils import BLUE, RED
from functools import wraps
class TestCase(object):
@@ -32,7 +32,7 @@
"""
Generic result container and reporters
"""
-import texttable # text format
+import framework.texttable as texttable # text format
class Result(object):
@@ -37,19 +37,19 @@ import re
import subprocess
import os
from time import sleep
-from settings import NICS, load_global_setting, PERF_SETTING
-from settings import IXIA, USERNAME, PKTGEN, PKTGEN_GRP
-from crb import Crb
-from net_device import GetNicObj
-from etgen import IxiaPacketGenerator, SoftwarePacketGenerator
+from .settings import NICS, load_global_setting, PERF_SETTING
+from .settings import IXIA, USERNAME, PKTGEN, PKTGEN_GRP
+from .crb import Crb
+from nics.net_device import GetNicObj
+from .etgen import IxiaPacketGenerator, SoftwarePacketGenerator
import random
-from utils import (GREEN, convert_int2ip, convert_ip2int,
+from .utils import (GREEN, convert_int2ip, convert_ip2int,
check_crb_python_version)
-from exception import ParameterInvalidException
+from .exception import ParameterInvalidException
from multiprocessing import Process
-from pktgen import getPacketGenerator
-from config import PktgenConf
-from packet import SCAPY_IMP_CMD
+from .pktgen import getPacketGenerator
+from .config import PktgenConf
+from .packet import SCAPY_IMP_CMD
class Tester(Crb):
@@ -35,14 +35,14 @@ import threading
from random import randint
-import utils
-import exception
-from dut import Dut
-from config import VirtConf
-from config import VIRTCONF
-from logger import getLogger
-from settings import CONFIG_ROOT_PATH
-from virt_dut import VirtDut
+import framework.utils as utils
+import framework.exception as exception
+from .dut import Dut
+from .config import VirtConf
+from .config import VIRTCONF
+from .logger import getLogger
+from .settings import CONFIG_ROOT_PATH
+from .virt_dut import VirtDut
ST_NOTSTART = "NOTSTART"
ST_PAUSE = "PAUSE"
@@ -30,11 +30,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
-from config import VirtConf
-from settings import CONFIG_ROOT_PATH
+from .config import VirtConf
+from .settings import CONFIG_ROOT_PATH
-from qemu_kvm import QEMUKvm
-from qemu_libvirt import LibvirtKvm
+from .qemu_kvm import QEMUKvm
+from .qemu_libvirt import LibvirtKvm
def VM(dut, vm_name, suite_name):
conf = VirtConf(CONFIG_ROOT_PATH + os.sep + suite_name + '.cfg')
@@ -32,14 +32,14 @@
import os
import re
import time
-import settings
-from utils import RED, parallel_lock
-from config import PortConf, AppNameConf
-from settings import NICS, LOG_NAME_SEP, get_netdev, load_global_setting, HOST_BUILD_TYPE_SETTING
-from project_dpdk import DPDKdut
-from dut import Dut
-from net_device import GetNicObj
-from net_device import RemoveNicObj
+import framework.settings as settings
+from .utils import RED, parallel_lock
+from .config import PortConf, AppNameConf
+from .settings import NICS, LOG_NAME_SEP, get_netdev, load_global_setting, HOST_BUILD_TYPE_SETTING
+from .project_dpdk import DPDKdut
+from .dut import Dut
+from nics.net_device import GetNicObj
+from nics.net_device import RemoveNicObj
class VirtDut(DPDKdut):
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from random import randint
-from utils import get_obj_funcs, parallel_lock, RED
+from .utils import get_obj_funcs, parallel_lock, RED
INIT_FREE_PORT = 6000
INIT_SERIAL_PORT = 7000
@@ -29,15 +29,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import time
-import utils
-
-from settings import CONFIG_ROOT_PATH, get_netdev
-from config import VirtConf
-from config import VIRTCONF
-from exception import *
-from qemu_kvm import QEMUKvm
-from pmd_output import PmdOutput
-from utils import create_mask
+import framework.utils as utils
+
+from .settings import CONFIG_ROOT_PATH, get_netdev
+from .config import VirtConf
+from .config import VIRTCONF
+from .exception import *
+from .qemu_kvm import QEMUKvm
+from .pmd_output import PmdOutput
+from .utils import create_mask
# scenario module for handling scenario
# 1. load configurations
similarity index 96%
rename from framework/main.py
rename to main.py
@@ -38,16 +38,11 @@ import os
import sys
import argparse
import subprocess
+from framework import dts
# change operation directory
-os.chdir("../")
cwd = os.getcwd()
-sys.path.append(cwd + '/nics')
-sys.path.append(cwd + '/framework')
-#sys.path.append(cwd + '/tests') # suites module path should be loaded in dts/run_all, not here
-sys.path.append(cwd + '/dep')
-import dts
def git_build_package(gitLabel, pkgName):
"""
new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
@@ -36,10 +36,10 @@ from functools import wraps
import time
-import settings
-from crb import Crb
-from settings import TIMEOUT, HEADER_SIZE
-from utils import RED
+import framework.settings as settings
+from framework.crb import Crb
+from framework.settings import TIMEOUT, HEADER_SIZE
+from framework.utils import RED
NICS_LIST = [] # global list for save nic objects
@@ -41,8 +41,8 @@ from email.mime.multipart import MIMEMultipart
from collections import OrderedDict
#install GitPython
from git import Repo
-from system_info import SystemInfo
-import utils
+from .system_info import SystemInfo
+import framework.utils as utils
def get_dpdk_git_info(repo_dir="/root/dpdk"):
@@ -63,14 +63,14 @@ def get_dpdk_git_info(repo_dir="/root/dpdk"):
return commit
def generate_html_report(file_tpl, perf_data, git_info, nic_info, system_info):
-
+
if not os.path.exists(file_tpl):
return None
templateLoader = jinja2.FileSystemLoader(searchpath = "/")
templateEnv = jinja2.Environment(loader=templateLoader)
template = templateEnv.get_template(file_tpl)
-
+
templateVars = { "title" : "Daily Performance Test Report", \
"test_results" : perf_data, \
"system_infos" : system_info, \
@@ -106,6 +106,6 @@ def send_email(sender, mailto, message, smtp_server):
print(utils.RED("Failed to send email " + str(e)))
def send_html_report(sender, mailto, subject, html_msg, smtp_server):
-
+
message = html_message(sender, mailto, subject, html_msg)
send_email(sender, mailto, message, smtp_server)
@@ -51,12 +51,12 @@ DPDK Test suite.
Test support of ABI .
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import load_global_setting, HOST_SHARED_LIB_SETTING, HOST_SHARED_LIB_PATH
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import load_global_setting, HOST_SHARED_LIB_SETTING, HOST_SHARED_LIB_PATH
class TestABIStable(TestCase):
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from test_case import TestCase
+from framework.test_case import TestCase
class TestACL(TestCase):
@@ -32,10 +32,10 @@
import os
import re
import time
-from settings import HEADER_SIZE
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestAfXdp(TestCase):
@@ -33,10 +33,10 @@
DPDK Test suite.
Test device blocklisting.
"""
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import DRIVERS
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
class TestBlockList(TestCase):
def set_up_all(self):
@@ -33,13 +33,13 @@
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import re
import time
-from test_case import TestCase
-from packet import Packet
-from pktgen import TRANSMIT_CONT
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import TRANSMIT_CONT
+from framework.pmd_output import PmdOutput
class TestCBDMA(TestCase):
@@ -45,10 +45,10 @@ from typing import List, Union, Tuple, Pattern
import time
-from rst import RstReport
-import utils
-from exception import VerifyFailure
-from pktgen import PacketGeneratorHelper
+from framework.rst import RstReport
+import framework.utils as utils
+from framework.exception import VerifyFailure
+from framework.pktgen import PacketGeneratorHelper
from scapy.layers.inet import UDP, TCP, IP
from scapy.layers.inet6 import IPv6
from scapy.layers.l2 import Ether, GRE
@@ -56,16 +56,16 @@ from scapy.layers.sctp import SCTP
from scapy.layers.vxlan import VXLAN
from scapy.packet import Raw
from scapy.utils import wrpcap, rdpcap
-from test_capabilities import DRIVER_TEST_LACK_CAPA
-from test_case import TestCase
+from framework.test_capabilities import DRIVER_TEST_LACK_CAPA
+from framework.test_case import TestCase
-from pmd_output import PmdOutput
-from test_capabilities import DRIVER_TEST_LACK_CAPA
-from pktgen import PacketGeneratorHelper
-from exception import VerifyFailure
-import packet
+from framework.pmd_output import PmdOutput
+from framework.test_capabilities import DRIVER_TEST_LACK_CAPA
+from framework.pktgen import PacketGeneratorHelper
+from framework.exception import VerifyFailure
+import framework.packet as packet
-from settings import FOLDERS
+from framework.settings import FOLDERS
l3_proto_classes = [
IP,
@@ -36,17 +36,17 @@ Test the support of generic flow API by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import DRIVERS
-from crb import Crb
-from dut import Dut
-import packet
-from exception import VerifyFailure
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
+from framework.crb import Crb
+from framework.dut import Dut
+import framework.packet as packet
+from framework.exception import VerifyFailure
import scapy.layers.inet
from scapy.utils import rdpcap
@@ -34,9 +34,9 @@ DPDK Test suite.
Test cmdline.
"""
-import utils
+import framework.utils as utils
-from test_case import TestCase
+from framework.test_case import TestCase
class TestCmdline(TestCase):
@@ -31,10 +31,10 @@
import os
-from test_case import TestCase
+from framework.test_case import TestCase
import json
import copy
-import compress_common as cc
+import tests.compress_common as cc
class TestCompressdevIsalPmd(TestCase):
@@ -31,10 +31,10 @@
import os
-from test_case import TestCase
+from framework.test_case import TestCase
import json
import copy
-import compress_common as cc
+import tests.compress_common as cc
class TestCompressdevQatPmd(TestCase):
@@ -31,10 +31,10 @@
import os
-from test_case import TestCase
+from framework.test_case import TestCase
import json
import copy
-import compress_common as cc
+import tests.compress_common as cc
class TestCompressdevZlibPmd(TestCase):
@@ -36,10 +36,10 @@ Test coremask parsing in DPDK.
"""
-import utils
+import framework.utils as utils
-from exception import VerifyFailure
-from test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.test_case import TestCase
#
#
@@ -31,8 +31,8 @@
import re
import json
-from test_case import TestCase
-import cryptodev_common as cc
+from framework.test_case import TestCase
+import tests.cryptodev_common as cc
class PerfTestsCryptodev(TestCase):
@@ -32,10 +32,10 @@
import re
import random
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .rte_flow_common import RssProcessing
vf0_mac = "00:11:22:33:44:55"
@@ -33,10 +33,10 @@
import re
import random
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .rte_flow_common import RssProcessing
mac_ipv4_gtpu_ipv4_basic = {
'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
@@ -33,10 +33,10 @@
import re
import random
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from .rte_flow_common import RssProcessing
mac_ipv4_gtpu_ipv4_basic = {
'ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
@@ -32,11 +32,11 @@ import re
import random
import string
import time
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from rte_flow_common import RssProcessing
-from config import UserConf
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from .rte_flow_common import RssProcessing
+from framework.config import UserConf
vf0_mac = '00:11:22:33:44:55'
@@ -32,10 +32,10 @@
import re
import random
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .rte_flow_common import RssProcessing
# toeplitz related data start
mac_ipv4_toeplitz_basic_pkt = {
@@ -32,10 +32,10 @@
import re
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .rte_flow_common import RssProcessing
mac_ipv4_gtpu_ipv4_basic = {
@@ -32,10 +32,10 @@
import re
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from .rte_flow_common import RssProcessing
mac_ipv4_gtpu_ipv4_basic = {
@@ -32,10 +32,10 @@
import re
import random
import string
-from test_case import TestCase, skip_unsupported_pkg
-from pmd_output import PmdOutput
-from packet import Packet
-from rte_flow_common import RssProcessing
+from framework.test_case import TestCase, skip_unsupported_pkg
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from .rte_flow_common import RssProcessing
mac_pppoe_pay_packets = {
'mismatch': [
@@ -31,11 +31,11 @@
import re
import random
import string
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from rte_flow_common import RssProcessing
-from config import UserConf
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from .rte_flow_common import RssProcessing
+from framework.config import UserConf
mac_ipv4_pfcp_session_packets = {
'match': [
@@ -34,11 +34,11 @@ import time
import re
import copy
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
-import rte_flow_common as rfc
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
+import tests.rte_flow_common as rfc
import os
@@ -32,9 +32,9 @@
import re
import time
-from pmd_output import PmdOutput
-from test_case import TestCase
-from packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.packet import Packet
class DcfDatePathTest(TestCase):
@@ -34,11 +34,11 @@ import time
import re
import copy
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
-import rte_flow_common as rfc
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
+import tests.rte_flow_common as rfc
import os
@@ -34,11 +34,11 @@ import time
import re
import copy
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
-import rte_flow_common as rfc
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
+import tests.rte_flow_common as rfc
import os
@@ -34,11 +34,11 @@ import time
import re
import copy
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
-import rte_flow_common as rfc
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
+import tests.rte_flow_common as rfc
import os
@@ -34,11 +34,11 @@ import time
import re
import copy
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
-import rte_flow_common as rfc
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
+import tests.rte_flow_common as rfc
import os
@@ -1,10 +1,10 @@
import re
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-import rte_flow_common as rfc
-import utils
-from utils import GREEN, RED
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+import tests.rte_flow_common as rfc
+import framework.utils as utils
+from framework.utils import GREEN, RED
import time
Mac_list = ['00:11:22:33:44:55', '00:11:22:33:44:11', '00:11:22:33:44:22', '00:11:22:33:44:33']
@@ -35,13 +35,13 @@ import time
import copy
import os
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg
-import rte_flow_common as rfc
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg
+import tests.rte_flow_common as rfc
-from utils import GREEN, RED
-import utils
+from framework.utils import GREEN, RED
+import framework.utils as utils
MAC_IPV4_PAY = {
"match": [
@@ -30,14 +30,14 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
import re
-from utils import GREEN, RED
+from framework.utils import GREEN, RED
import time
from scapy.all import *
-import rte_flow_common as rfc
+import tests.rte_flow_common as rfc
LAUNCH_QUEUE = 16
@@ -32,12 +32,12 @@
import json
import time
import re
-import packet
+import framework.packet as packet
import os
from scapy.contrib.gtp import *
-from test_case import TestCase
-from pmd_output import PmdOutput
-from rte_flow_common import RssProcessing
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from .rte_flow_common import RssProcessing
tv_packets_basic = {
'tv_mac_ipv4': 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.2",dst="192.168.0.3")/("X"*40)',
@@ -30,13 +30,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from utils import GREEN, RED
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.utils import GREEN, RED
import time
from scapy.all import *
-import rte_flow_common as rfc
+import tests.rte_flow_common as rfc
LAUNCH_QUEUE = 16
@@ -34,12 +34,12 @@ import re
import time
import os
import copy
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-import rte_flow_common as rfc
-from rte_flow_common import CVL_TXQ_RXQ_NUMBER
-import utils
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+import tests.rte_flow_common as rfc
+from .rte_flow_common import CVL_TXQ_RXQ_NUMBER
+import framework.utils as utils
# max rule number case: rte_flow_pattern and matched packets will be generated by code, and rte_flow_pattern will be writed to file.
tv_max_rule_number = {
@@ -33,11 +33,11 @@
import re
import time
import random
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, check_supported_nic, skip_unsupported_pkg
-from utils import GREEN, RED
-from rte_flow_common import RssProcessing
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, check_supported_nic, skip_unsupported_pkg
+from framework.utils import GREEN, RED
+from .rte_flow_common import RssProcessing
mac_qinq_ipv4_pay_src_ip = {
'name': 'mac_qinq_ipv4_pay_src_ip',
@@ -32,15 +32,15 @@
import json
import time
import re
-import packet
+import framework.packet as packet
import os
from scapy.contrib.gtp import *
-from test_case import TestCase
-from pmd_output import PmdOutput
-from utils import BLUE, RED
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.utils import BLUE, RED
from collections import OrderedDict
-from packet import IncreaseIP, IncreaseIPv6
-import rte_flow_common as rfc
+from framework.packet import IncreaseIP, IncreaseIPv6
+import tests.rte_flow_common as rfc
out = os.popen("pip list|grep scapy ")
version_result =out.read()
@@ -37,12 +37,12 @@ import copy
import random
from itertools import groupby
-from test_case import TestCase, skip_unsupported_pkg
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
+from framework.test_case import TestCase, skip_unsupported_pkg
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
from collections import OrderedDict
-import rte_flow_common as rfc
+import tests.rte_flow_common as rfc
import os
@@ -37,12 +37,12 @@ import copy
import random
from itertools import groupby
-from test_case import TestCase, skip_unsupported_pkg
-from pmd_output import PmdOutput
-from packet import Packet
-from utils import BLUE, RED, GREEN
+from framework.test_case import TestCase, skip_unsupported_pkg
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.utils import BLUE, RED, GREEN
from collections import OrderedDict
-import rte_flow_common as rfc
+import tests.rte_flow_common as rfc
import os
@@ -30,9 +30,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import re
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
vf0_mac = "00:11:22:33:44:55"
vf1_mac = "00:11:22:33:44:66"
@@ -52,12 +52,12 @@ from pprint import pformat
from functools import partial
-from settings import HEADER_SIZE
-from test_case import TestCase
-from exception import VerifyFailure
-from packet import Packet
-from pmd_output import PmdOutput
-import utils
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+import framework.utils as utils
class TestDcfLifeCycle(TestCase):
@@ -32,11 +32,11 @@
import time
import re
import sys
-import utils
-from qemu_kvm import QEMUKvm
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import get_nic_name
+import framework.utils as utils
+from framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import get_nic_name
import random
VM_CORES_MASK = 'all'
@@ -32,12 +32,12 @@
import time
import re
import sys
-import utils
+import framework.utils as utils
from scapy.all import *
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import get_nic_name
-import packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import get_nic_name
+import framework.packet as packet
class TestDdpGtpQregion(TestCase):
@@ -35,8 +35,8 @@ l2tpv3 test script.
"""
import time
import re
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
from scapy.all import *
import random
@@ -31,13 +31,13 @@
import time
import sys
-import utils
+import framework.utils as utils
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 framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import get_nic_name
import random
VM_CORES_MASK = 'all'
@@ -32,10 +32,10 @@
import time
import re
import sys
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import get_nic_name
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import get_nic_name
from scapy.all import *
import random
@@ -33,10 +33,10 @@
DPDK Test suite.
"""
import re
-import utils
+import framework.utils as utils
import os
-from test_case import TestCase
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pktgen import PacketGeneratorHelper
class TestDistributor(TestCase):
@@ -38,10 +38,10 @@ hostcpu to start qemu and only have one vcpu
"""
import re
import time
-import utils
-from test_case import TestCase
-from virt_common import VM
-import vhost_peer_conf as peer
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.virt_common import VM
+import tests.vhost_peer_conf as peer
class TestDPDKGROLib(TestCase):
@@ -37,12 +37,12 @@ In this suite, in order to check the performance of gso lib, will use one
hostcpu to start qemu and only have one vcpu
"""
import time
-import utils
+import framework.utils as utils
import re
-from test_case import TestCase
-from virt_common import VM
-from config import UserConf
-import vhost_peer_conf as peer
+from framework.test_case import TestCase
+from framework.virt_common import VM
+from framework.config import UserConf
+import tests.vhost_peer_conf as peer
class TestDPDKGsoLib(TestCase):
@@ -34,9 +34,9 @@ This feature is to limit DPDK to use the exact size which is the mounted hugepag
"""
import re
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
+from framework.test_case import TestCase
DEFAULT_MNT = '/mnt/huge'
MNT_PATH = ["/mnt/huge1", "/mnt/huge2", "/mnt/huge3"]
@@ -37,7 +37,7 @@ Test the support of Dual VLAN Offload Features by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import random
import re
import time
@@ -71,8 +71,8 @@ vlanCase = ["OUTER+INNER", "INNER", ("OUTER+INNER", "NONE"), ("INNER", "NONE"),
"TX+OUTER+INNER", "TX+OUTER", ("NONE", "TX+OUTER+INNER"), ("NONE", "TX+OUTER")]
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestDualVlan(TestCase):
@@ -36,11 +36,11 @@ Test the dynamic driver configuration feature.
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
#
@@ -31,10 +31,10 @@
import time
import re
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
-import packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+import framework.packet as packet
VM_CORES_MASK = 'all'
@@ -31,11 +31,11 @@
import time
import re
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import get_nic_name
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import get_nic_name
+from framework.packet import Packet
import random
test_loop = 3
@@ -33,10 +33,10 @@
"""
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import re
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
class TestEEPROMDump(TestCase):
@@ -33,10 +33,10 @@
DPDK Test suite.
"""
import re
-import utils
+import framework.utils as utils
import os
-from test_case import TestCase
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pktgen import PacketGeneratorHelper
class TestEFD(TestCase):
@@ -32,8 +32,8 @@
import time
import re
import os
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestEnable_Package_Download_In_Ice_Driver(TestCase):
@@ -38,15 +38,15 @@ import re
import time
import sys
-import utils
-from qemu_kvm import QEMUKvm
-from test_case import TestCase
-from pmd_output import PmdOutput
-from exception import VerifyFailure
+import framework.utils as utils
+from framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.exception import VerifyFailure
from scapy.utils import rdpcap
-from packet import Packet
+from framework.packet import Packet
VM_CORES_MASK = 'all'
@@ -39,14 +39,14 @@ import time
import os
import traceback
-from utils import create_mask as dts_create_mask
-from test_case import TestCase
-from pmd_output import PmdOutput
-from exception import VerifyFailure
+from framework.utils import create_mask as dts_create_mask
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.exception import VerifyFailure
-from packet import Packet
+from framework.packet import Packet
from scapy.sendrecv import sendp
-from settings import HEADER_SIZE
+from framework.settings import HEADER_SIZE
from functools import reduce
@@ -34,20 +34,20 @@ DPDK Test suite.
Test userland 10Gb/25Gb/40Gb/100Gb
"""
-import utils
+import framework.utils as utils
import re
import time
import os
-from test_case import TestCase
+from framework.test_case import TestCase
from time import sleep
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from etgen import IxiaPacketGenerator
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.etgen import IxiaPacketGenerator
-from settings import FOLDERS
-from system_info import SystemInfo
-import perf_report
+from framework.settings import FOLDERS
+from nics.system_info import SystemInfo
+import nics.perf_report as perf_report
from datetime import datetime
class TestEventdevPerf(TestCase,IxiaPacketGenerator):
@@ -34,13 +34,13 @@ DPDK Test suite.
Test eventdev pipeline
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
+from framework.test_case import TestCase
import scapy.layers.inet
from scapy.utils import rdpcap
-from packet import Packet
+from framework.packet import Packet
class TestEventdevPipeline(TestCase):
@@ -34,20 +34,20 @@ DPDK Test suite.
Test userland 10Gb/25Gb/40Gb/100Gb
"""
-import utils
+import framework.utils as utils
import re
import time
import os
-from test_case import TestCase
+from framework.test_case import TestCase
from time import sleep
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from etgen import IxiaPacketGenerator
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.etgen import IxiaPacketGenerator
-from settings import FOLDERS
-from system_info import SystemInfo
-import perf_report
+from framework.settings import FOLDERS
+from nics.system_info import SystemInfo
+import nics.perf_report as perf_report
from datetime import datetime
class TestEventdevPipelinePerf(TestCase,IxiaPacketGenerator):
@@ -37,7 +37,7 @@ Test example_build.
import time
import re
-from test_case import TestCase
+from framework.test_case import TestCase
class TestExamplebuild(TestCase):
@@ -37,8 +37,8 @@ Test external memory.
import time
import re
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestExternalMemory(TestCase):
@@ -34,9 +34,9 @@ DPDK Test suite.
Test external mempool handler
"""
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestExternalMempool(TestCase):
@@ -41,11 +41,11 @@ import string
from time import sleep
from scapy.utils import struct, socket, PcapWriter
-import utils
-from etgen import IxiaPacketGenerator
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.etgen import IxiaPacketGenerator
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
import sys
import imp
@@ -30,9 +30,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import utils
-from test_case import TestCase
-import cryptodev_common as cc
+import framework.utils as utils
+from framework.test_case import TestCase
+import tests.cryptodev_common as cc
import re
class FipCryptodev(TestCase):
@@ -33,8 +33,8 @@
"""
DPDK Test suite.
"""
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
import re
@@ -32,9 +32,9 @@
import time
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from flexible_common import FlexibleRxdBase
-import rte_flow_common as rfc
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from .flexible_common import FlexibleRxdBase
+import tests.rte_flow_common as rfc
class TestFlexibleRxd(TestCase, FlexibleRxdBase):
supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2', 'foxville']
@@ -38,14 +38,14 @@ Test Floating VEB Features by Poll Mode Drivers.
import re
import time
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from packet import Packet
-from utils import RED
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.utils import RED
class TestFloatingVEBSwitching(TestCase):
@@ -35,13 +35,13 @@ import re
from collections import Counter
from datetime import datetime
-from packet import Packet
+from framework.packet import Packet
from scapy.sendrecv import sendp
-from utils import create_mask as dts_create_mask
-from test_case import TestCase
-from exception import VerifyFailure
-from settings import HEADER_SIZE
+from framework.utils import create_mask as dts_create_mask
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.settings import HEADER_SIZE
from functools import reduce
@@ -29,24 +29,24 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import utils
+import framework.utils as utils
import re
import time
-from settings import HEADER_SIZE
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import DRIVERS
-from crb import Crb
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
+from framework.crb import Crb
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-from packet import Packet
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.packet import Packet
import os
import random
-from exception import VerifyFailure
+from framework.exception import VerifyFailure
import scapy.layers.inet
from scapy.utils import rdpcap
@@ -30,13 +30,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
-import utils
+import framework.utils as utils
import time
import re
import os
-import packet
-from test_case import TestCase
-from settings import HEADER_SIZE
+import framework.packet as packet
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
class TestFlowFiltering(TestCase):
@@ -50,9 +50,9 @@ Support 4*10G, 1*40G and 2*40G NICs.
import time
import random
import re
-import utils
-import dut
-from pmd_output import PmdOutput
+import framework.utils as utils
+import framework.dut as dut
+from framework.pmd_output import PmdOutput
testQueues = [16]
reta_entries = []
@@ -60,7 +60,7 @@ reta_lines = []
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
# Test class.
@@ -50,9 +50,9 @@ Support 4*10G, 1*40G and 2*40G NICs.
import time
import random
import re
-import utils
-import dut
-from pmd_output import PmdOutput
+import framework.utils as utils
+import framework.dut as dut
+from framework.pmd_output import PmdOutput
testQueues = [16]
reta_entries = []
@@ -60,7 +60,7 @@ reta_lines = []
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
# Test class.
@@ -36,14 +36,14 @@ Test the support of VLAN Offload Features by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from settings import DRIVERS
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
class TestGeneric_filter(TestCase):
@@ -36,24 +36,24 @@ Test the support of generic flow API by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from settings import DRIVERS
-from crb import Crb
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
+from framework.crb import Crb
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-import packet
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+import framework.packet as packet
import os
import random
-from exception import VerifyFailure
+from framework.exception import VerifyFailure
import scapy.layers.inet
from scapy.utils import rdpcap
@@ -34,8 +34,8 @@ DPDK Test suite.
Test HelloWorld example.
"""
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestHelloWorld(TestCase):
@@ -37,9 +37,9 @@ Test port hot plug.
import time
import re
-import utils
-from test_case import TestCase
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
import os
@@ -34,9 +34,9 @@ DPDK Test suite.
Hotplug Multi-process Test.
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
+from framework.test_case import TestCase
import itertools
test_loop = 2
@@ -40,13 +40,13 @@ import re
import time
import math
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
-from settings import get_nic_name
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.settings import get_nic_name
import random
-from settings import HEADER_SIZE
+from framework.settings import HEADER_SIZE
VM_CORES_MASK = 'Default'
@@ -33,16 +33,16 @@
import re
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg
-import rte_flow_common as rfc
-from rte_flow_common import CVL_TXQ_RXQ_NUMBER
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg
+import tests.rte_flow_common as rfc
+from .rte_flow_common import CVL_TXQ_RXQ_NUMBER
from multiprocessing import Process
from multiprocessing import Manager
-from utils import GREEN, RED
-import utils
+from framework.utils import GREEN, RED
+import framework.utils as utils
MAC_IPV4_PAY = {
"match": [
@@ -35,8 +35,8 @@ import time
import traceback
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-from flexible_common import FlexibleRxdBase
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+from .flexible_common import FlexibleRxdBase
class TestIavfFlexibleDescriptor(TestCase, FlexibleRxdBase):
@@ -32,9 +32,9 @@
import time
import re
import os
-from test_case import TestCase
-from pmd_output import PmdOutput
-from config import UserConf
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.config import UserConf
class Testiavf_package_and_driver_check(TestCase):
@@ -34,12 +34,12 @@ DPDK Test suite.
Test support of IEEE1588 Precise Time Protocol.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
DEV_TX_OFFLOAD_MULTI_SEGS = '0x00008000'
@@ -35,13 +35,13 @@ DPDK Test suite.
Test inline_ipsec.
"""
-import utils
+import framework.utils as utils
import time
import re
import random
from scapy.all import ESP, IP, Ether, sendp, SecurityAssociation
-from test_case import TestCase
+from framework.test_case import TestCase
ETHER_STANDARD_MTU = 1300
ETHER_JUMBO_FRAME_MTU = 9000
@@ -37,8 +37,8 @@ Test interrupt pmd.
import string
import time
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestInterruptPmd(TestCase):
@@ -29,24 +29,24 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import utils
+import framework.utils as utils
import re
import time
-from settings import HEADER_SIZE
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import DRIVERS
-from crb import Crb
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
+from framework.crb import Crb
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-from packet import Packet
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.packet import Packet
import os
import random
-from exception import VerifyFailure
+from framework.exception import VerifyFailure
import scapy.layers.inet
from scapy.utils import rdpcap
@@ -34,15 +34,15 @@ DPDK Test suite.
Test IPv4 fragmentation features in DPDK.
"""
-import utils
+import framework.utils as utils
import string
import re
import time
import os
-from settings import HEADER_SIZE
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
lpm_table_ipv4 = [
@@ -39,12 +39,12 @@ inside virtual point-to-point links over an Internet Protocol network.
Fortville support GRE packet detecting, checksum computing and filtering.
"""
-import utils
+import framework.utils as utils
import re
import time
import os
-from packet import Packet
+from framework.packet import Packet
from scapy.utils import wrpcap, rdpcap
from scapy.packet import split_layers,bind_layers
@@ -52,9 +52,9 @@ from scapy.layers.inet import Ether, IP, TCP, UDP
from scapy.layers.sctp import SCTP
from scapy.layers.l2 import GRE
-from test_case import TestCase
-from exception import VerifyFailure
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.pmd_output import PmdOutput
class TestIpgre(TestCase):
@@ -31,11 +31,11 @@
import binascii
import time
-import utils
-from test_case import TestCase
-import packet
+import framework.utils as utils
+from framework.test_case import TestCase
+import framework.packet as packet
-import cryptodev_common as cc
+import tests.cryptodev_common as cc
class TestIPsecGW(TestCase):
@@ -42,8 +42,8 @@ from scapy.utils import struct, socket, PcapWriter
from scapy.layers.inet import Ether, IP, TCP, fragment
from scapy.route import *
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class IpReassemblyTestConfig(object):
@@ -36,14 +36,14 @@ Test Niantic ixgbe_get_vf_queue Include Extra Information function.
import time
import random
import re
-import utils
+import framework.utils as utils
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
-from pmd_output import PmdOutput
-from virt_common import VM
-from qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.virt_common import VM
+from framework.qemu_kvm import QEMUKvm
class TestIxgbeVfGetExtraInfo(TestCase):
@@ -34,12 +34,12 @@ DPDK Test suite.
Test the support of Jumbo Frames by Poll Mode Drivers
"""
-import utils
+import framework.utils as utils
import re
from time import sleep
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import PROTOCOL_PACKET_SIZE
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import PROTOCOL_PACKET_SIZE
ETHER_HEADER_LEN = 18
IP_HEADER_LEN = 20
@@ -37,8 +37,8 @@ Test keep alive
import time
import re
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestKeepAlive(TestCase):
@@ -40,13 +40,13 @@ Test some vf function in ice driver
import re
import time
import random
-import utils
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from packet import Packet
-from utils import RED
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.utils import RED
VM_CORES_MASK = 'all'
MAX_VLAN = 4095
@@ -36,14 +36,14 @@ DPDK Test suite.
Test Kernel NIC Interface.
"""
-import utils
+import framework.utils as utils
import re
import os
import time
from random import randint
-from pktgen import PacketGeneratorHelper
-from test_case import TestCase
-import packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+import framework.packet as packet
dut_ports = []
port_virtual_interaces = []
@@ -34,10 +34,10 @@ Test Layer-2 Forwarding support
"""
import os
import time
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestL2fwd(TestCase):
@@ -33,9 +33,9 @@ import hmac
import hashlib
import binascii
import time
-import utils
-from test_case import TestCase
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives.ciphers.aead import AESCCM, AESGCM
@@ -47,7 +47,7 @@ from cryptography.hazmat.backends import default_backend
import CryptoMobile.CM as cm
import pyDes
-import cryptodev_common as cc
+import tests.cryptodev_common as cc
class TestL2fwdCrypto(TestCase):
@@ -37,8 +37,8 @@ Test L2fwd Jobstats
import time
import re
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestL2fwdJobstats(TestCase):
@@ -31,10 +31,10 @@
import re
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg, check_supported_nic
-import rte_flow_common as rfc
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg, check_supported_nic
+import tests.rte_flow_common as rfc
vf0_mac = "00:11:22:33:44:55"
@@ -33,8 +33,8 @@
DPDK Test suite.
Layer-3 forwarding test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
class TestL3fwd(TestCase, PerfTestBase):
@@ -33,8 +33,8 @@
DPDK Test suite.
Layer-3 forwarding test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
class TestL3fwdEm(TestCase, PerfTestBase):
@@ -33,8 +33,8 @@
DPDK Test suite.
Layer-3 forwarding test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
class TestL3fwdLpmIpv4(TestCase, PerfTestBase):
@@ -33,8 +33,8 @@
DPDK Test suite.
Layer-3 forwarding test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
class TestL3fwdLpmIpv4Rfc2544(TestCase, PerfTestBase):
@@ -33,8 +33,8 @@
DPDK Test suite.
Layer-3 forwarding test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, MATCH_MODE, IP_TYPE
class TestL3fwdLpmIpv6(TestCase, PerfTestBase):
@@ -35,10 +35,10 @@ Layer-3 forwarding ACL test script.
"""
import re
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-import packet
+from framework.test_case import TestCase
+import framework.packet as packet
class TestL3fwdacl(TestCase):
@@ -32,11 +32,11 @@
import re
import time
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
-from utils import GREEN, RED
+from framework.utils import GREEN, RED
multi_fdir_queue_group = {
"match": [
@@ -34,15 +34,15 @@ DPDK Test suite.
Test for Ethernet Link Flow Control Features by Poll Mode Drivers
"""
-import utils
+import framework.utils as utils
import re
import os
from time import sleep
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestLinkFlowctrl(TestCase):
@@ -35,12 +35,12 @@ DPDK Test suite.
Test link status.
"""
-import utils
+import framework.utils as utils
import string
import time
import re
-from test_case import TestCase
-from packet import Packet
+from framework.test_case import TestCase
+from framework.packet import Packet
class TestLinkStatusInterrupt(TestCase):
@@ -37,8 +37,8 @@ Linux Kernel Modules example.
import os
import time
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
from framework import settings
@@ -36,10 +36,10 @@ Test Load Balancer.
"""
-import dts
-from packet import Packet
-from test_case import TestCase
-import utils
+import framework.dts as dts
+from framework.packet import Packet
+from framework.test_case import TestCase
+import framework.utils as utils
import time
@@ -37,11 +37,11 @@ Benchmark Vhost loopback for 7 RX/TX PATHs.
Includes Mergeable, Normal, Vector_RX,Inorder_mergeable,
Inorder_no_mergeable, VIRTIO1.1_mergeable, VIRTIO1.1_normal Path.
"""
-import utils
+import framework.utils as utils
import time
import re
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
class TestLoopbackPortRestart(TestCase):
@@ -36,11 +36,11 @@ Includes Mergeable, Normal, Vector_RX, Inorder mergeable,
Inorder no-mergeable, Virtio 1.1 mergeable, Virtio 1.1 no-mergeable Path.
"""
-import utils
+import framework.utils as utils
import time
import re
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
class TestLoopbackMultiQueues(TestCase):
@@ -35,11 +35,11 @@
DPDK Test suite.
Test loopback virtio-user server mode
"""
-import utils
+import framework.utils as utils
import time
import re
-from pmd_output import PmdOutput
-from test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
class TestLoopbackVirtioUserServerMode(TestCase):
@@ -34,11 +34,11 @@ DPDK Test suite.
Test the support of Allowlist Features by Poll Mode Drivers
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
import operator
class TestMacFilter(TestCase):
@@ -33,10 +33,10 @@ import re
import time
import os
-from test_case import TestCase
-from dut import Dut
-from pktgen import PacketGeneratorHelper
-from packet import Packet
+from framework.test_case import TestCase
+from framework.dut import Dut
+from framework.pktgen import PacketGeneratorHelper
+from framework.packet import Packet
class TestMacsecForIxgbe(TestCase):
def set_up_all(self):
@@ -38,12 +38,12 @@ import re
import time
import traceback
from contextlib import contextmanager
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
-from exception import VerifyFailure
-from test_case import TestCase
-import utils
+from framework.exception import VerifyFailure
+from framework.test_case import TestCase
+import framework.utils as utils
class TestSuiteMaliciousDrvEventIndication(TestCase):
@@ -37,10 +37,10 @@ Test the support of Malicious Driver Detection
import re
import time
-from packet import Packet
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
VM_CORES_MASK = 'all'
send_pks_num = 2000
@@ -34,15 +34,15 @@ Test metering_and_policing.
"""
import os
-import utils
+import framework.utils as utils
import string
import time
import re
-from test_case import TestCase
-from plotting import Plotting
-from settings import HEADER_SIZE
-from dut import Dut
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.plotting import Plotting
+from framework.settings import HEADER_SIZE
+from framework.dut import Dut
+from framework.pmd_output import PmdOutput
class TestMeteringAndPolicing(TestCase):
@@ -41,13 +41,13 @@ import traceback
from copy import deepcopy
from pprint import pformat
-from test_case import TestCase
-from pmd_output import PmdOutput
-from exception import VerifyFailure
-from settings import HEADER_SIZE
-from packet import Packet
-from pktgen import TRANSMIT_CONT
-from config import SuiteConf
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.exception import VerifyFailure
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.pktgen import TRANSMIT_CONT
+from framework.config import SuiteConf
class TestMetrics(TestCase):
@@ -39,20 +39,20 @@ import subprocess
from time import sleep
from typing import List, Tuple
-import utils
-from pmd_output import PmdOutput
-from test_case import TestCase
+import framework.utils as utils
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
-from pktgen_base import TRANSMIT_S_BURST
+from framework.pktgen_base import TRANSMIT_S_BURST
-import utils
+import framework.utils as utils
import re
import time
-from test_case import TestCase
-from pktgen import TRANSMIT_CONT
+from framework.test_case import TestCase
+from framework.pktgen import TRANSMIT_CONT
-from packet import Packet
-from settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.settings import HEADER_SIZE
ETHER_HEADER_LEN = 18
VLAN=4
@@ -36,8 +36,8 @@ multicast test script.
"""
import time
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
routeTbl = [
["224.0.0.101", "P1"], ["224.0.0.102", "P2"],
@@ -34,9 +34,9 @@ import os
import re
import random
import string
-import utils
-from test_case import TestCase
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
class TestMultiplePthread(TestCase):
@@ -34,13 +34,13 @@ DPDK Test suite.
Multi-process Test.
"""
-import utils
+import framework.utils as utils
import time
import os
executions = []
-from test_case import TestCase
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pktgen import PacketGeneratorHelper
class TestMultiprocess(TestCase):
@@ -35,11 +35,11 @@ DPDK Test suite.
Test Netmap_compat.
"""
-import utils
+import framework.utils as utils
import string
import time
import re
-from test_case import TestCase
+from framework.test_case import TestCase
class TestNetmapCompat(TestCase):
@@ -32,18 +32,18 @@
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import json
import os
import string
-from test_case import TestCase
-from exception import VerifyFailure
-from settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting
+from framework.pmd_output import PmdOutput
from copy import deepcopy
from numpy import mean
-import rst
-from pktgen import PacketGeneratorHelper
+import framework.rst as rst
+from framework.pktgen import PacketGeneratorHelper
class TestNicSingleCorePerf(TestCase):
@@ -32,11 +32,11 @@
import os
import re
import time
-from test_case import TestCase
-from net_device import GetNicObj
-from settings import HEADER_SIZE
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from nics.net_device import GetNicObj
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestNtb(TestCase):
@@ -36,13 +36,13 @@ Test NVGRE features in DPDK.
"""
-import utils
+import framework.utils as utils
import string
import re
import time
import os
-from pmd_output import PmdOutput
-from packet import IncreaseIP, IncreaseIPv6
+from framework.pmd_output import PmdOutput
+from framework.packet import IncreaseIP, IncreaseIPv6
from random import randint
from socket import AF_INET6
@@ -55,8 +55,8 @@ from scapy.sendrecv import sniff
from scapy.config import conf
from scapy.route import *
-from test_case import TestCase
-from settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
#
#
@@ -46,10 +46,10 @@ from scapy.packet import NoPayload
from scapy.packet import Packet as scapyPacket
from scapy.fields import ConditionalField
-from test_case import TestCase
-from exception import VerifyFailure
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
# These source code copy from packet.py module before sniff_packets/load_sniff_packets
@@ -36,9 +36,9 @@ Packet ordering example app test cases.
import os
import time
-import utils
-from test_case import TestCase
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
class TestPacketOrdering(TestCase):
@@ -37,16 +37,16 @@ Inorder non-mergeable, packed ring mergeable, non-mergeable, inorder mergeable,
inorder non-mergeable Path.
"""
-import utils
+import framework.utils as utils
import time
import re
import json
-import rst
+import framework.rst as rst
import os
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
from copy import deepcopy
-from test_case import TestCase
-from settings import UPDATE_EXPECTED, load_global_setting
+from framework.test_case import TestCase
+from framework.settings import UPDATE_EXPECTED, load_global_setting
class TestPerfVirtioUserLoopback(TestCase):
@@ -32,15 +32,15 @@
"""
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import json
-import rst
+import framework.rst as rst
import os
import re
import time
-from test_case import TestCase
-from packet import Packet
-from settings import UPDATE_EXPECTED, load_global_setting
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
@@ -40,15 +40,15 @@ please use qemu version greater 4.1.94 which support packed feathur to test this
"""
import re
import os
-import rst
+import framework.rst as rst
import json
import time
import string
import random
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import UPDATE_EXPECTED, load_global_setting
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
@@ -35,10 +35,10 @@ Performance-Thread test script.
"""
import os
import string
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestPerformanceThread(TestCase):
@@ -29,14 +29,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from smoke_base import SmokeTest
-from smoke_base import JUMBO_FRAME_LENGTH
-from smoke_base import JUMBO_FRAME_MTU
-from smoke_base import DEFAULT_MTU_VALUE
-from smoke_base import LAUNCH_QUEUE
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .smoke_base import SmokeTest
+from .smoke_base import JUMBO_FRAME_LENGTH
+from .smoke_base import JUMBO_FRAME_MTU
+from .smoke_base import DEFAULT_MTU_VALUE
+from .smoke_base import LAUNCH_QUEUE
class TestPfSmoke(TestCase):
@@ -29,25 +29,25 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import utils
+import framework.utils as utils
import re
import time
import socket
-from settings import HEADER_SIZE
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import DRIVERS
-from crb import Crb
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
+from framework.crb import Crb
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-from packet import Packet
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.packet import Packet
import os
import random
-from exception import VerifyFailure
+from framework.exception import VerifyFailure
import scapy.layers.inet
from scapy.utils import rdpcap
@@ -34,21 +34,21 @@ DPDK Test suite.
Test userland 10Gb PMD
"""
-import utils
+import framework.utils as utils
import re
import time
import os
-from test_case import TestCase
+from framework.test_case import TestCase
from time import sleep
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
-from settings import FOLDERS
-from system_info import SystemInfo
-import perf_report
+from framework.settings import FOLDERS
+from nics.system_info import SystemInfo
+import nics.perf_report as perf_report
from datetime import datetime
-from pktgen import PacketGeneratorHelper
+from framework.pktgen import PacketGeneratorHelper
class TestPmd(TestCase):
@@ -43,11 +43,11 @@ import random
from socket import htons, htonl
from functools import wraps
-import utils
-from test_case import TestCase
-from exception import TimeoutException
-from settings import TIMEOUT
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.exception import TimeoutException
+from framework.settings import TIMEOUT
+from framework.pmd_output import PmdOutput
SOCKET_0 = 0
SOCKET_1 = 1
@@ -34,12 +34,12 @@ import re
import traceback
# import dts/framework libs
-from test_case import TestCase
-from exception import VerifyFailure
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
# import bonding lib(common methods for pmd bonding command)
-import bonding
-from bonding import MODE_LACP, FRAME_SIZE_64
+import tests.bonding as bonding
+from .bonding import MODE_LACP, FRAME_SIZE_64
######################
# bonding 802.3ad mode
@@ -33,13 +33,13 @@ import time
import traceback
# import dts/framework libs
-import utils
-from test_case import TestCase
-from exception import VerifyFailure
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
# import bonding lib
-import bonding
-from bonding import (
+import tests.bonding as bonding
+from .bonding import (
MODE_ROUND_ROBIN,
MODE_ACTIVE_BACKUP,
MODE_XOR_BALANCE,
@@ -31,12 +31,12 @@
'''
'''
-from test_case import TestCase
+from framework.test_case import TestCase
from time import sleep
from scapy.layers.inet import Ether, IP
from scapy.utils import wrpcap
-import utils
+import framework.utils as utils
#
@@ -39,7 +39,7 @@ Support 4*10G, 1*40G and 2*40G NICs.
import time
import random
import re
-import utils
+import framework.utils as utils
queue = 16
reta_entries = []
@@ -60,7 +60,7 @@ iptypes = {'ipv4-sctp': 'sctp',
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
# Test class.
@@ -36,7 +36,7 @@ Test RSS reta (redirection table) update function.
import time
import random
import re
-import utils
+import framework.utils as utils
import textwrap
testQueues = [2, 9, 16]
reta_entries = []
@@ -44,8 +44,8 @@ reta_lines = []
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestPmdrssreta(TestCase):
@@ -30,13 +30,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
-import utils
+import framework.utils as utils
import time
import re
-import packet
-from test_case import TestCase
-from pmd_output import PmdOutput
-from virt_common import VM
+import framework.packet as packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.virt_common import VM
class TestPortControl(TestCase):
@@ -39,10 +39,10 @@ independent on the control plane and data plane.
import time
import re
-from test_case import TestCase
-from dut import Dut
-from packet import Packet
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.dut import Dut
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
class TestPortRepresentor(TestCase):
@@ -37,10 +37,10 @@ import os
import time
import traceback
-from utils import create_mask as dts_create_mask
-from qemu_libvirt import LibvirtKvm
-from exception import VerifyFailure
-from test_case import TestCase
+from framework.utils import create_mask as dts_create_mask
+from framework.qemu_libvirt import LibvirtKvm
+from framework.exception import VerifyFailure
+from framework.test_case import TestCase
class TestPowerBidirectionChannel(TestCase):
@@ -42,15 +42,15 @@ from pprint import pformat
import traceback
-from settings import load_global_setting
-from settings import HOST_BUILD_TYPE_SETTING
-from utils import create_mask as dts_create_mask
-from qemu_libvirt import LibvirtKvm
-from pktgen import TRANSMIT_CONT
-from exception import VerifyFailure
-from settings import HEADER_SIZE
-from packet import Packet
-from test_case import TestCase
+from framework.settings import load_global_setting
+from framework.settings import HOST_BUILD_TYPE_SETTING
+from framework.utils import create_mask as dts_create_mask
+from framework.qemu_libvirt import LibvirtKvm
+from framework.pktgen import TRANSMIT_CONT
+from framework.exception import VerifyFailure
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.test_case import TestCase
class TestPowerBranchRatio(TestCase):
@@ -39,12 +39,12 @@ import traceback
from copy import deepcopy
from pprint import pformat
-from utils import create_mask as dts_create_mask
-from exception import VerifyFailure
-from test_case import TestCase
-from settings import HEADER_SIZE, PKTGEN_TREX
-from packet import Packet
-from pktgen import TRANSMIT_CONT
+from framework.utils import create_mask as dts_create_mask
+from framework.exception import VerifyFailure
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE, PKTGEN_TREX
+from framework.packet import Packet
+from framework.pktgen import TRANSMIT_CONT
class TestPowerEmptyPoll(TestCase):
@@ -39,10 +39,10 @@ import re
import time
import traceback
-from utils import create_mask as dts_create_mask
-from qemu_libvirt import LibvirtKvm
-from exception import VerifyFailure
-from test_case import TestCase
+from framework.utils import create_mask as dts_create_mask
+from framework.qemu_libvirt import LibvirtKvm
+from framework.exception import VerifyFailure
+from framework.test_case import TestCase
class TestPowerNegative(TestCase):
@@ -39,12 +39,12 @@ import traceback
from collections import Counter
from pprint import pformat
-# import dts libs
-from settings import load_global_setting
-from settings import HOST_BUILD_TYPE_SETTING
-from test_case import TestCase
-from exception import VerifyFailure
-from utils import create_mask
+# import framework.dts as dts libs
+from framework.settings import load_global_setting
+from framework.settings import HOST_BUILD_TYPE_SETTING
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.utils import create_mask
class TestPowerPbf(TestCase):
@@ -37,10 +37,10 @@ import traceback
from collections import Counter
from pprint import pformat
-# import dts libs
-from test_case import TestCase
-from exception import VerifyFailure
-from utils import create_mask
+# import framework.dts as dts libs
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.utils import create_mask
class TestPowerPstate(TestCase):
@@ -42,15 +42,15 @@ import json
from copy import deepcopy
from pprint import pformat
-from settings import load_global_setting
-from settings import HOST_BUILD_TYPE_SETTING
-from utils import create_mask as dts_create_mask
-from settings import HEADER_SIZE
-from test_case import TestCase
-from pktgen import TRANSMIT_CONT
-from exception import VerifyFailure
-
-from packet import Packet
+from framework.settings import load_global_setting
+from framework.settings import HOST_BUILD_TYPE_SETTING
+from framework.utils import create_mask as dts_create_mask
+from framework.settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.pktgen import TRANSMIT_CONT
+from framework.exception import VerifyFailure
+
+from framework.packet import Packet
class TestPowerTelemetry(TestCase):
@@ -34,10 +34,10 @@ DPDK Test suite.
Test support of IEEE1588 Precise Time Protocol.
"""
-import utils
+import framework.utils as utils
import re
import time
-from test_case import TestCase
+from framework.test_case import TestCase
class TestPtpClient(TestCase):
@@ -30,11 +30,11 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import utils
-from test_case import TestCase
-from exception import VerifyFailure
-from pmd_output import PmdOutput
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
import time
import re
@@ -40,12 +40,12 @@ qemu =
"""
import re
import time
-import utils
+import framework.utils as utils
from scapy.utils import wrpcap
-from test_case import TestCase
-from settings import HEADER_SIZE
-from virt_common import VM
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.virt_common import VM
+from framework.pktgen import PacketGeneratorHelper
class TestVhostPVPDiffQemuVersion(TestCase):
@@ -34,15 +34,15 @@ DPDK Test suite.
Test PVP performance using virtio_user on 8 tx/rx path.
"""
import json
-import rst
+import framework.rst as rst
import os
-import utils
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from settings import UPDATE_EXPECTED, load_global_setting
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
class TestPVPMultiPathPerformance(TestCase):
@@ -35,15 +35,15 @@ Test PVP vhost single core performance using virtio_user on 8 tx/rx path.
"""
import json
-import rst
+import framework.rst as rst
import os
-import utils
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from settings import UPDATE_EXPECTED, load_global_setting
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
class TestPVPMultiPathVhostPerformance(TestCase):
@@ -35,15 +35,15 @@ Test PVP virtio single core performance using virtio_user on 8 tx/rx path.
"""
import json
-import rst
+import framework.rst as rst
import os
-import utils
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from settings import UPDATE_EXPECTED, load_global_setting
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
class TestPVPMultiPathVirtioPerformance(TestCase):
@@ -38,13 +38,13 @@ includes Mergeable, Normal, Vector_RX.
Cover virtio 1.0 and virtio 0.95.Also cover
port restart test with each path
"""
-import utils
+import framework.utils as utils
import time
import re
-from virt_common import VM
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestPVPQemuMultiPathPortRestart(TestCase):
@@ -34,10 +34,10 @@ DPDK Test suite.
The feature need compile dpdk as shared libraries.
"""
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestPVPShareLib(TestCase):
@@ -33,13 +33,13 @@
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
+from framework.pmd_output import PmdOutput
class TestPVPVhostUserBuiltInNetDriver(TestCase):
@@ -37,12 +37,12 @@ Becase this suite will use the reconnet feature, the VM will start as
server mode, so the qemu version should greater than 2.7
"""
import re
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from virt_common import VM
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.virt_common import VM
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestPVPVhostUserReconnect(TestCase):
@@ -36,12 +36,12 @@ link bonding devices from within testpmd interactive prompt.
"""
import re
import time
-import utils
-from test_case import TestCase
-from virt_common import VM
-from pmd_output import PmdOutput
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.virt_common import VM
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestPVPVirtIOBonding(TestCase):
@@ -34,11 +34,11 @@ DPDK Test suite.
vhost/virtio-user pvp with 2M hugepage.
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestPVPVirtioWith2Mhuge(TestCase):
@@ -34,11 +34,11 @@ DPDK Test suite.
vhost/virtio-user pvp with 4K pages.
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestPvpVirtioUser4kPages(TestCase):
@@ -41,10 +41,10 @@ non-mergeable path, also cover port restart test with each path.
"""
import time
import re
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.pmd_output import PmdOutput
class TestPVPVirtioUserMultiQueuesPortRestart(TestCase):
@@ -37,10 +37,10 @@ Test the support of VLAN Offload Features by Poll Mode Drivers.
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
import time
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
class TestQinqFilter(TestCase):
@@ -34,14 +34,14 @@ DPDK Test suite.
Test QOS API in DPDK.
"""
-import utils
+import framework.utils as utils
import string
import re
import time
import os
-from pktgen import PacketGeneratorHelper
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestQosApi(TestCase):
@@ -35,11 +35,11 @@ Test QOS API in DPDK.
The DUT must have two 10G Ethernet ports connected to two ports of IXIA.
"""
import os
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import TRANSMIT_CONT
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import TRANSMIT_CONT
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
class TestQosMeter(TestCase):
@@ -36,18 +36,18 @@ Test the support of VLAN Offload Features by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from settings import DRIVERS
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
-from project_dpdk import DPDKdut
-from dut import Dut
-from packet import Packet
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.packet import Packet
class TestQueue_region(TestCase):
@@ -41,10 +41,10 @@ Test queue start stop Feature
import time
import re
import os
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import FOLDERS
-from packet import Packet, strip_pktload
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import FOLDERS
+from framework.packet import Packet, strip_pktload
#
#
@@ -40,10 +40,10 @@ Test the support of RSS Key Update by Poll Mode Drivers.
import time
import re
import random
-import utils
+import framework.utils as utils
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
queue = 16
reta_entries = []
@@ -38,10 +38,10 @@ Test moving RSS to rte_flow.
import time
import re
-import packet
+import framework.packet as packet
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestRSS_to_Rteflow(TestCase):
@@ -38,11 +38,11 @@ import time
import ipaddress
from typing import Callable
-import utils
-from pmd_output import PmdOutput
-from test_case import TestCase
+import framework.utils as utils
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
-from test_case import TestCase
+from framework.test_case import TestCase
from framework.flow import generator
@@ -41,11 +41,11 @@ import string
from time import sleep
from scapy.utils import struct, socket, PcapWriter
-import utils
-from etgen import IxiaPacketGenerator
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.etgen import IxiaPacketGenerator
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
import sys
import imp
imp.reload(sys)
@@ -36,10 +36,10 @@ DPDK Test suite.
import time
import re
-from qemu_kvm import QEMUKvm
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
RSS_KEY = '6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E'
PACKET_COUNT = 100
@@ -37,11 +37,11 @@ runtime_vf_queue_number_kernel test script.
import random
import time
-import utils
-from pmd_output import PmdOutput
-from test_case import TestCase
-from virt_common import VM
-from packet import Packet
+import framework.utils as utils
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.virt_common import VM
+from framework.packet import Packet
VM_CORES_MASK = 'all'
@@ -37,8 +37,8 @@ DPDK Test suite.
import time
import re
import math
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestRuntimeVfQnMaxinum(TestCase):
@@ -34,10 +34,10 @@
DPDK Test suite.
Test Rxtx_Callbacks.
"""
-import utils
+import framework.utils as utils
import string
import time
-from test_case import TestCase
+from framework.test_case import TestCase
class TestRxtxCallbacks(TestCase):
@@ -36,18 +36,18 @@ New RX/TX offload APIs.
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pmd_output import PmdOutput
-from settings import DRIVERS
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pmd_output import PmdOutput
+from framework.settings import DRIVERS
-from project_dpdk import DPDKdut
-from dut import Dut
-from packet import Packet
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.packet import Packet
ETHER_STANDARD_MTU = 1518
ETHER_JUMBO_FRAME_MTU = 9000
@@ -33,9 +33,9 @@
DPDK Test suite.
Test Scattered Packets.
"""
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet, strip_pktload
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet, strip_pktload
import time
#
#
@@ -41,9 +41,9 @@ Test short live dpdk app Feature
import time
import re
import os
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import FOLDERS
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import FOLDERS
#
#
@@ -36,19 +36,19 @@ Test Shutdown API Feature
"""
-import utils
+import framework.utils as utils
import time
import re
import os
import random
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE, PROTOCOL_PACKET_SIZE
-from exception import VerifyFailure
-from qemu_kvm import QEMUKvm
-from settings import get_nic_name
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE, PROTOCOL_PACKET_SIZE
+from framework.exception import VerifyFailure
+from framework.qemu_kvm import QEMUKvm
+from framework.settings import get_nic_name
from random import randint
-from settings import DRIVERS
+from framework.settings import DRIVERS
#
#
# Test class.
@@ -34,10 +34,10 @@
DPDK Test suite.
Test Skeleton.
"""
-import utils
+import framework.utils as utils
import string
import time
-from test_case import TestCase
+from framework.test_case import TestCase
@@ -34,15 +34,15 @@ DPDK Test suite.
Test softnic API in DPDK.
"""
-import utils
+import framework.utils as utils
import string
import re
import time
-from settings import HEADER_SIZE
+from framework.settings import HEADER_SIZE
import os
-from pktgen import PacketGeneratorHelper
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestSoftnic(TestCase):
@@ -33,9 +33,9 @@
"""
DPDK Test suite.
"""
-import utils
-from pmd_output import PmdOutput
-from test_case import TestCase
+import framework.utils as utils
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
class TestSpeedCapabilities(TestCase):
@@ -42,11 +42,11 @@ import pdb
import time
import random
-from virt_common import VM
-from test_case import TestCase
+from framework.virt_common import VM
+from framework.test_case import TestCase
-from pmd_output import PmdOutput
-from settings import PROTOCOL_PACKET_SIZE
+from framework.pmd_output import PmdOutput
+from framework.settings import PROTOCOL_PACKET_SIZE
FRAME_SIZE_64 = 64
VM_CORES_MASK = 'all'
@@ -40,11 +40,11 @@ import random
import struct
import socket
import re
-import utils
-from pmd_output import PmdOutput
-import packet
+import framework.utils as utils
+from framework.pmd_output import PmdOutput
+import framework.packet as packet
-from test_case import TestCase
+from framework.test_case import TestCase
ETHER_HEADER_LEN = 18
IP_HEADER_LEN = 20
@@ -36,9 +36,9 @@ import re
import textwrap
from pprint import pformat
-# import dts libs
-from test_case import TestCase
-from pmd_output import PmdOutput
+# import framework.dts as dts libs
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestTelemetry(TestCase):
@@ -34,8 +34,8 @@ DPDK Test suite.
testpmd perf test script.
"""
-from test_case import TestCase
-from perf_test_base import PerfTestBase, BIN_TYPE, MATCH_MODE, IP_TYPE
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, BIN_TYPE, MATCH_MODE, IP_TYPE
class TestPmdPerf(TestCase, PerfTestBase):
@@ -34,12 +34,12 @@ DPDK Test suite.
Test Timer.
"""
-import utils
+import framework.utils as utils
import re
import time
-from test_case import TestCase
+from framework.test_case import TestCase
class TestTimer(TestCase):
@@ -37,14 +37,14 @@ Tests for TSO.
"""
import os
-import utils
+import framework.utils as utils
import time
import re
import os
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
-from packet import Packet
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
+from framework.packet import Packet
DEFAULT_MUT = 1500
TSO_MTU = 9000
@@ -40,14 +40,14 @@ Test tx preparation feature
import os
import time
-import dut
+import framework.dut as dut
import re
import subprocess
-from config import PortConf
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import FOLDERS
-from packet import Packet
+from framework.config import PortConf
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import FOLDERS
+from framework.packet import Packet
import random
#
#
@@ -43,12 +43,12 @@ translate the offloaded packet types into these 7 fields of information, for
user applications
"""
-import utils
-from test_case import TestCase
-from exception import VerifyFailure
-from packet import Packet
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.exception import VerifyFailure
+from framework.packet import Packet
import time
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
class TestUniPacket(TestCase):
@@ -36,8 +36,8 @@ Cmdline autotest
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Crc autotest
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -30,10 +30,10 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
-import cryptodev_common as cc
+import tests.cryptodev_common as cc
class UnitTestsCryptodev(TestCase):
@@ -38,8 +38,8 @@ Run Inter-VM share memory autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,10 +36,10 @@ EAL autotest.
"""
-import utils
+import framework.utils as utils
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
@@ -34,9 +34,9 @@ DPDK Test suite.
Test Event Timer Adapter Unit test
"""
-import utils
+import framework.utils as utils
-from test_case import TestCase
+from framework.test_case import TestCase
class TestUnitTestEventTimer(TestCase):
@@ -35,8 +35,8 @@ DPDK Test suite.
This TestSuite runs the unit tests included in DPDK for KNI feature.
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -35,10 +35,10 @@ DPDK Test suite.
This TestSuite runs the unit tests included in DPDK for X710/XL710/XXV710 loopback mode.
"""
-import utils
+import framework.utils as utils
import re
import time
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
@@ -36,8 +36,8 @@ This TestSuite runs the unit tests included in DPDK for LPM methods in l3fwd.
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Run all mbuf autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Run all Mempool autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,7 +36,7 @@ This TestSuite runs the unit tests included in DPDK for pmd performance.
"""
import re
-from test_case import TestCase
+from framework.test_case import TestCase
#
#
@@ -35,8 +35,8 @@ DPDK Test suite.
This TestSuite runs the unit tests included in DPDK for power feature.
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ This TestSuite runs the unit tests included in DPDK for Random Early
Detection, Metering and Scheduling QoS features.
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Run all Ring autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Run Inter-VM share memory autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -36,8 +36,8 @@ Run all timer autotests
"""
-from test_case import TestCase
-import utils
+from framework.test_case import TestCase
+import framework.utils as utils
#
#
@@ -35,17 +35,17 @@ Test support of userspace ethtool feature
"""
import os
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
-from packet import Packet
+from framework.test_case import TestCase
+from framework.packet import Packet
import random
-from etgen import IxiaPacketGenerator
-from settings import HEADER_SIZE
-from settings import SCAPY2IXIA
-from utils import RED
-from exception import VerifyFailure
+from framework.etgen import IxiaPacketGenerator
+from framework.settings import HEADER_SIZE
+from framework.settings import SCAPY2IXIA
+from framework.utils import RED
+from framework.exception import VerifyFailure
class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
@@ -43,9 +43,9 @@ sends them out by writing them directly to a suitable TX queue.
import time
import re
-import utils
-from test_case import TestCase
-from virt_common import VM
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.virt_common import VM
class TestVdevPrimarySecondary(TestCase):
@@ -37,16 +37,16 @@ Test VEB Switch and floating VEB Features by Poll Mode Drivers.
import re
import time
-import utils
-
-from virt_dut import VirtDut
-from project_dpdk import DPDKdut
-from dut import Dut
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from packet import Packet
-from utils import RED
+import framework.utils as utils
+
+from framework.virt_dut import VirtDut
+from framework.project_dpdk import DPDKdut
+from framework.dut import Dut
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.utils import RED
class TestVEBSwitching(TestCase):
@@ -31,14 +31,14 @@
import time
import sys
-import utils
+import framework.utils as utils
from scapy.utils import rdpcap
-from qemu_kvm import QEMUKvm
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
-from settings import get_nic_name
+from framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.settings import get_nic_name
import random
VM_CORES_MASK = 'all'
@@ -35,13 +35,13 @@ DPDK Test suite.
Test vf_interrupt_pmd.
"""
-import utils
+import framework.utils as utils
import time
import re
import pdb
-from virt_common import VM
-from test_case import TestCase
-from packet import Packet
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.packet import Packet
class TestVfInterruptPmd(TestCase):
supported_vf_driver = ['pci-stub', 'vfio-pci']
@@ -32,13 +32,13 @@
import re
import time
-import utils
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from packet import Packet
-from utils import RED
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.utils import RED
VM_CORES_MASK = 'all'
@@ -35,18 +35,18 @@ DPDK Test suite.
Test VF kernel
"""
-import utils
+import framework.utils as utils
import time
import datetime
import re
import random
import threading
-from test_case import TestCase
-from qemu_kvm import QEMUKvm
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.qemu_kvm import QEMUKvm
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
import random
-from utils import GREEN, RED
+from framework.utils import GREEN, RED
class TestVfKernel(TestCase):
@@ -32,11 +32,11 @@
import time
import os
import string
-import utils
-from test_case import TestCase
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestVfL3fwd(TestCase):
@@ -31,8 +31,8 @@
import os
import time
-from test_case import TestCase
-from perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
class TestVfL3fwdEmKernelPf(TestCase, PerfTestBase):
@@ -31,8 +31,8 @@
import os
import time
-from test_case import TestCase
-from perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
class TestVfL3fwdKernelPf(TestCase, PerfTestBase):
@@ -31,8 +31,8 @@
import os
import time
-from test_case import TestCase
-from perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
class TestVfL3fwdLpmIpv4KernelPf(TestCase, PerfTestBase):
@@ -31,8 +31,8 @@
import os
import time
-from test_case import TestCase
-from perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
class TestVfL3fwdLpmIpv4Rfc2544KernelPf(TestCase, PerfTestBase):
@@ -31,8 +31,8 @@
import os
import time
-from test_case import TestCase
-from perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
+from framework.test_case import TestCase
+from .perf_test_base import PerfTestBase, IP_TYPE, MATCH_MODE, SUITE_TYPE, VF_L3FWD_NIC_SUPPORT
class TestVfL3fwdLpmIpv6KernelPf(TestCase, PerfTestBase):
@@ -32,9 +32,9 @@
import re
import time
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
VM_CORES_MASK = 'all'
@@ -33,14 +33,14 @@ import re
import time
import string
-import utils
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from utils import RED, GREEN
-from net_device import NetDevice
-from crb import Crb
-from settings import HEADER_SIZE
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.utils import RED, GREEN
+from nics.net_device import NetDevice
+from framework.crb import Crb
+from framework.settings import HEADER_SIZE
VM_CORES_MASK = 'all'
DEFAULT_MTU = 1500
TSO_MTU = 9000
@@ -32,10 +32,10 @@
import re
import time
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
VM_CORES_MASK = 'all'
@@ -32,10 +32,10 @@
import re
import time
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
VM_CORES_MASK = 'all'
class TestVfPortStartStop(TestCase):
@@ -42,9 +42,9 @@ reta_lines = []
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
-from test_case import TestCase
-from pmd_output import PmdOutput
-from virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.virt_common import VM
class TestVfRss(TestCase):
@@ -32,15 +32,15 @@
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import json
import os
-from test_case import TestCase
-from settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting
+from framework.pmd_output import PmdOutput
from copy import deepcopy
-import rst
-from pktgen import PacketGeneratorHelper
+import framework.rst as rst
+from framework.pktgen import PacketGeneratorHelper
class TestVfSingleCorePerf(TestCase):
@@ -29,14 +29,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase
-from smoke_base import SmokeTest
-from smoke_base import JUMBO_FRAME_LENGTH
-from smoke_base import JUMBO_FRAME_MTU
-from smoke_base import DEFAULT_MTU_VALUE
-from smoke_base import LAUNCH_QUEUE
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase
+from .smoke_base import SmokeTest
+from .smoke_base import JUMBO_FRAME_LENGTH
+from .smoke_base import JUMBO_FRAME_MTU
+from .smoke_base import DEFAULT_MTU_VALUE
+from .smoke_base import LAUNCH_QUEUE
VF_MAC_ADDR = '00:11:22:33:44:55'
@@ -34,13 +34,13 @@ Test vf to vf nic bridge
"""
import re
-import utils
+import framework.utils as utils
import time
import pdb
-from test_case import TestCase
-from virt_common import VM
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.virt_common import VM
+from framework.pmd_output import PmdOutput
VF_NUMS_ON_ONE_PF = 2
VF_TEMP_MAC = "52:54:12:45:67:1%d"
@@ -32,11 +32,11 @@
import re
import time
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
-from settings import get_nic_name
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.settings import get_nic_name
import random
VM_CORES_MASK = 'all'
@@ -34,8 +34,8 @@ DPDK Test suite.
Basic test for launch vhost with 1024 ethports
"""
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestVhost1024Ethports(TestCase):
@@ -42,16 +42,16 @@ Here is an example:
$ ./testpmd -c f -n 4 \
--vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas=[txq0@80:04.0],dmathr=1024'
"""
-import rst, json
+import framework.rst as rst, json
import os
import re
import time
-from test_case import TestCase
-from settings import HEADER_SIZE
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from pmd_output import PmdOutput
-from settings import UPDATE_EXPECTED, load_global_setting
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.pmd_output import PmdOutput
+from framework.settings import UPDATE_EXPECTED, load_global_setting
from copy import deepcopy
@@ -34,11 +34,11 @@ DPDK Test suite.
Vhost event idx interrupt need test with l3fwd-power sample
"""
-import utils
+import framework.utils as utils
import time
import re
-from virt_common import VM
-from test_case import TestCase
+from framework.virt_common import VM
+from framework.test_case import TestCase
class TestVhostEventIdxInterrupt(TestCase):
@@ -36,13 +36,13 @@ Vhost PVP performance using Qemu test suite.
"""
import re
import time
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-from virt_common import VM
-from packet import Packet
-from pmd_output import PmdOutput
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.virt_common import VM
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.pktgen import PacketGeneratorHelper
class TestVhostMultiQueueQemu(TestCase):
@@ -36,14 +36,14 @@ vhost pmd xstats test suite.
"""
import re
import time
-import utils
+import framework.utils as utils
import datetime
import copy
-from test_case import TestCase
-from settings import HEADER_SIZE
-from qemu_kvm import QEMUKvm
-from packet import Packet
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.qemu_kvm import QEMUKvm
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
ETHER_JUMBO_FRAME_MTU = 9000
DEFAULT_JUMBO_FRAME_MTU = 1500
@@ -34,10 +34,10 @@ DPDK Test suite.
Vhost enqueue interrupt need test with l3fwd-power sample
"""
-import utils
+import framework.utils as utils
import time
import re
-from test_case import TestCase
+from framework.test_case import TestCase
class TestVhostUserInterrupt(TestCase):
@@ -31,11 +31,11 @@
import re
import time
-import utils
-from virt_common import VM
-from test_case import TestCase
-from config import UserConf
-from exception import VirtDutInitException
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.config import UserConf
+from framework.exception import VirtDutInitException
class TestVhostUserLiveMigration(TestCase):
@@ -34,13 +34,13 @@ DPDK Test suite.
vhost virtio pmd interrupt need test with l3fwd-power sample
"""
-import utils
+import framework.utils as utils
import time
import re
-from virt_common import VM
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
class TestVhostVirtioPmdInterrupt(TestCase):
@@ -36,8 +36,8 @@ Virtio-user interrupt need test with l3fwd-power sample
import re
import time
-import utils
-from test_case import TestCase
+import framework.utils as utils
+from framework.test_case import TestCase
class TestVirtioUserInterrupt(TestCase):
@@ -34,13 +34,13 @@ DPDK Test suite.
Virtio idx interrupt need test with l3fwd-power sample
"""
-import utils
+import framework.utils as utils
import time
import _thread
import re
-from virt_common import VM
-from test_case import TestCase
-from pktgen import PacketGeneratorHelper
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pktgen import PacketGeneratorHelper
class TestVirtioIdxInterrupt(TestCase):
@@ -33,14 +33,14 @@ DPDK Test suite
Test DPDK vhost + virtio scenarios
"""
import os
-import utils
+import framework.utils as utils
import time
import subprocess
import binascii
-from test_case import TestCase
-from qemu_kvm import QEMUKvm
-import cryptodev_common as cc
-from packet import Packet
+from framework.test_case import TestCase
+from framework.qemu_kvm import QEMUKvm
+import tests.cryptodev_common as cc
+from framework.packet import Packet
class VirtioCryptodevIpsecTest(TestCase):
def set_up_all(self):
@@ -33,11 +33,11 @@ DPDK Test suite
Test DPDK vhost + virtio scenarios
"""
import os
-import utils
+import framework.utils as utils
import subprocess
-from test_case import TestCase
-from qemu_kvm import QEMUKvm
-import cryptodev_common as cc
+from framework.test_case import TestCase
+from framework.qemu_kvm import QEMUKvm
+import tests.cryptodev_common as cc
class VirtioCryptodevPerfTest(TestCase):
def set_up_all(self):
@@ -43,11 +43,11 @@ qemu =
"""
import re
import time
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-from virt_common import VM
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.virt_common import VM
+from framework.pktgen import PacketGeneratorHelper
class TestVirtioPVPRegression(TestCase):
@@ -34,8 +34,8 @@ DPDK Test suite.
"""
import re
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
DEFAULT_MTU = 1500
TSO_MTU = 9000
@@ -35,11 +35,11 @@ Test DPDK vhost + virtio scenarios
"""
import os
-import utils
+import framework.utils as utils
import subprocess
-from test_case import TestCase
-from qemu_kvm import QEMUKvm
-import cryptodev_common as cc
+from framework.test_case import TestCase
+from framework.qemu_kvm import QEMUKvm
+import tests.cryptodev_common as cc
class VirtioCryptodevUnitTest(TestCase):
def set_up_all(self):
@@ -36,11 +36,11 @@ virtio user as exception path test suite.
"""
import re
import time
-import utils
-from test_case import TestCase
-from settings import HEADER_SIZE
-import vhost_peer_conf as peer
-from pktgen import PacketGeneratorHelper
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+import tests.vhost_peer_conf as peer
+from framework.pktgen import PacketGeneratorHelper
class TestVirtioUserAsExceptionalPath(TestCase):
@@ -34,11 +34,11 @@ DPDK Test suite.
Virtio user for container networking
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestVirtioUserForContainer(TestCase):
@@ -37,13 +37,13 @@ Test the support of VLAN Offload Features by Poll Mode Drivers.
"""
-import utils
+import framework.utils as utils
import time
-from test_case import TestCase
-from pmd_output import PmdOutput
-from packet import Packet
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.packet import Packet
class TestVlan(TestCase):
@@ -37,17 +37,17 @@ Test the support of VLAN Offload Features by Poll Mode Drivers.
"""
-import dts
+import framework.dts as dts
import time
-import utils
+import framework.utils as utils
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
from scapy.utils import struct, socket, wrpcap, rdpcap
from scapy.layers.inet import Ether, IP, TCP, UDP, ICMP
from scapy.layers.l2 import Dot1Q, ARP, GRE
-from settings import DPDK_RXMODE_SETTING
-from settings import load_global_setting
+from framework.settings import DPDK_RXMODE_SETTING
+from framework.settings import load_global_setting
import random
MAX_VLAN = 4095
@@ -42,10 +42,10 @@ import re
import time
import string
import random
-import utils
-from virt_common import VM
-from test_case import TestCase
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
class TestVM2VMVirtioNetPerf(TestCase):
@@ -40,11 +40,11 @@ About mergeable path check the large packet payload.
"""
import re
import time
-import utils
-from virt_common import VM
-from test_case import TestCase
-from packet import Packet
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.virt_common import VM
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
class TestVM2VMVirtioPMD(TestCase):
def set_up_all(self):
@@ -40,10 +40,10 @@ mergeable, non-mergeable path test
"""
import re
import time
-import utils
-from test_case import TestCase
-from packet import Packet
-from pmd_output import PmdOutput
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
class TestVM2VMVirtioUser(TestCase):
@@ -39,9 +39,9 @@ Test some vm hotplug function with vfio
import os
import re
import time
-from qemu_kvm import QEMUKvm
-from test_case import TestCase
-from pmd_output import PmdOutput
+from framework.qemu_kvm import QEMUKvm
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
VM_CORES_MASK = 'all'
@@ -35,11 +35,11 @@ VM power manager test suite.
"""
import re
-import utils
-from test_case import TestCase
-from etgen import IxiaPacketGenerator
-from settings import HEADER_SIZE
-from qemu_libvirt import LibvirtKvm
+import framework.utils as utils
+from framework.test_case import TestCase
+from framework.etgen import IxiaPacketGenerator
+from framework.settings import HEADER_SIZE
+from framework.qemu_libvirt import LibvirtKvm
class TestVmPowerManager(TestCase, IxiaPacketGenerator):
@@ -44,13 +44,13 @@ from datetime import datetime, timedelta
from copy import deepcopy
from pprint import pformat
-from utils import create_mask as dts_create_mask
-from test_case import TestCase
-from pmd_output import PmdOutput
-from qemu_libvirt import LibvirtKvm
-from pktgen import TRANSMIT_CONT
-from exception import VerifyFailure
-from packet import Packet
+from framework.utils import create_mask as dts_create_mask
+from framework.test_case import TestCase
+from framework.pmd_output import PmdOutput
+from framework.qemu_libvirt import LibvirtKvm
+from framework.pktgen import TRANSMIT_CONT
+from framework.exception import VerifyFailure
+from framework.packet import Packet
class TestVmPwMgmtPolicy(TestCase):
@@ -35,13 +35,13 @@ DPDK Test suite.
Tests for vmdq.
"""
-import utils
+import framework.utils as utils
import os
import re
-from test_case import TestCase
+from framework.test_case import TestCase
from time import sleep
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestVmdq(TestCase):
@@ -36,13 +36,13 @@ DPDK Test suite.
Test example vmdq_dcb.
"""
-import utils
+import framework.utils as utils
import os
import re
import random
-from test_case import TestCase
-from settings import HEADER_SIZE
-from pktgen import PacketGeneratorHelper
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE
+from framework.pktgen import PacketGeneratorHelper
class TestVmdqDcb(TestCase):
@@ -33,16 +33,16 @@
DPDK Test suite.
"""
-import utils
+import framework.utils as utils
import re
import time
import os
-from test_case import TestCase
-from packet import Packet
-from pktgen import PacketGeneratorHelper
-from pmd_output import PmdOutput
-from virt_common import VM
-from settings import HEADER_SIZE
+from framework.test_case import TestCase
+from framework.packet import Packet
+from framework.pktgen import PacketGeneratorHelper
+from framework.pmd_output import PmdOutput
+from framework.virt_common import VM
+from framework.settings import HEADER_SIZE
import random
import string
@@ -36,13 +36,13 @@ Test VXLAN behaviour in DPDK.
"""
-import utils
+import framework.utils as utils
import string
import re
import time
import os
-from pmd_output import PmdOutput
-from packet import IncreaseIP, IncreaseIPv6
+from framework.pmd_output import PmdOutput
+from framework.packet import IncreaseIP, IncreaseIPv6
from random import randint
from scapy.utils import wrpcap, rdpcap
@@ -55,10 +55,10 @@ from scapy.sendrecv import sniff
from scapy.config import conf
from scapy.route import *
-from test_case import TestCase
-from settings import HEADER_SIZE, FOLDERS
-from etgen import IxiaPacketGenerator
-import packet
+from framework.test_case import TestCase
+from framework.settings import HEADER_SIZE, FOLDERS
+from framework.etgen import IxiaPacketGenerator
+import framework.packet as packet
#
#
@@ -36,17 +36,17 @@ Test VXLAN-GPE behaviour in DPDK.
"""
-import utils
+import framework.utils as utils
import os
import re
-from pmd_output import PmdOutput
+from framework.pmd_output import PmdOutput
from scapy.utils import wrpcap, rdpcap
from scapy.layers.inet import Ether, IP, UDP
from scapy.layers.l2 import Dot1Q
from scapy.layers.vxlan import VXLAN
from scapy.config import conf
-from test_case import TestCase
-from settings import FOLDERS
+from framework.test_case import TestCase
+from framework.settings import FOLDERS
#
#
new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
@@ -36,14 +36,14 @@ import struct
import socket
from socket import htonl
-from packet import Packet, TMP_PATH
+from framework.packet import Packet, TMP_PATH
from scapy.sendrecv import sendp
from scapy.utils import wrpcap
-import utils
-from exception import TimeoutException, VerifyFailure
-from pmd_output import PmdOutput
-from settings import HEADER_SIZE
+import framework.utils as utils
+from framework.exception import TimeoutException, VerifyFailure
+from framework.pmd_output import PmdOutput
+from framework.settings import HEADER_SIZE
# define bonding mode
MODE_ROUND_ROBIN = 0
@@ -32,8 +32,8 @@
import os
import re
-import utils
-from config import SuiteConf
+import framework.utils as utils
+from framework.config import SuiteConf
conf = SuiteConf('compressdev_sample')
@@ -29,8 +29,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from net_device import GetNicObj
-from config import SuiteConf
+from nics.net_device import GetNicObj
+from framework.config import SuiteConf
conf = SuiteConf('cryptodev_sample')
@@ -30,8 +30,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import time
-from packet import Packet
-from pmd_output import PmdOutput
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
import re
@@ -36,7 +36,7 @@ import os
import re
import time
import traceback
-import texttable
+import framework.texttable as texttable
import json
import numpy as np
from enum import Enum, unique
@@ -44,12 +44,12 @@ from pprint import pformat
from itertools import product
from copy import deepcopy
-from config import SuiteConf
-from packet import Packet
-from pktgen import TRANSMIT_CONT, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK
-from utils import convert_int2ip, convert_ip2int
-from exception import VerifyFailure
-import utils
+from framework.config import SuiteConf
+from framework.packet import Packet
+from framework.pktgen import TRANSMIT_CONT, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN_IXIA_NETWORK
+from framework.utils import convert_int2ip, convert_ip2int
+from framework.exception import VerifyFailure
+import framework.utils as utils
VF_L3FWD_NIC_SUPPORT = frozenset((
@@ -32,8 +32,8 @@
import json
import time
import re
-from utils import GREEN, RED
-from packet import Packet
+from framework.utils import GREEN, RED
+from framework.packet import Packet
CVL_TXQ_RXQ_NUMBER = 16
@@ -31,7 +31,7 @@
import re
import time
-from settings import HEADER_SIZE
+from framework.settings import HEADER_SIZE
JUMBO_FRAME_MTU = 9600
DEFAULT_MTU_VALUE = 1500
@@ -29,7 +29,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from config import UserConf
+from framework.config import UserConf
conf_file = 'conf/vhost_peer_conf.cfg'
conf_peer = UserConf(conf_file)
new file mode 100644
@@ -0,0 +1,30 @@
+#!/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.
@@ -13,9 +13,9 @@ DTS_FRAMEWORK = DTS_PATH + '/framework'
sys.path.append(DTS_SUITES)
sys.path.append(DTS_FRAMEWORK)
-import dts
-from test_case import TestCase
-from utils import pprint
+import framework.dts as dts
+from framework.test_case import TestCase
+from framework.utils import pprint
def get_subclasses(module, clazz):
@@ -22,10 +22,10 @@ DTS_IXIA_CFG = DTS_PATH + '/conf/ixia.cfg'
sys.path.append(DTS_FRAMEWORK)
sys.path.append(DTS_TOOLS)
-import utils
-from parse_opt import Option
-from settings import NICS
-from utils import GREEN, RED
+import framework.utils as utils
+from .parse_opt import Option
+from framework.settings import NICS
+from framework.utils import GREEN, RED
global def_opt
global dut_ip