From patchwork Wed Apr 13 14:54:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Owen Hilyard X-Patchwork-Id: 109704 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C3745A050E; Wed, 13 Apr 2022 16:54:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E99D410E1; Wed, 13 Apr 2022 16:54:50 +0200 (CEST) Received: from mail-pj1-f98.google.com (mail-pj1-f98.google.com [209.85.216.98]) by mails.dpdk.org (Postfix) with ESMTP id 2310B40694 for ; Wed, 13 Apr 2022 16:54:49 +0200 (CEST) Received: by mail-pj1-f98.google.com with SMTP id h15-20020a17090a054f00b001cb7cd2b11dso2460591pjf.5 for ; Wed, 13 Apr 2022 07:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Np05GdD6JVglPvlVFj18vK8JVCPIh9P47lM4lhRoL14=; b=V4E4XoGu9xIZsiEX0/IxNoqrn6hDd9iJeD58jso/KQAaY/tczSuugto0nQPRcHvI9h HiX2Y1z503ih5WMwJwSWfSImL10eWnKOSXAdtocc3UkfazBWLuDC5QEZRdTI9uRlGOMO GhDRnI+pGnCwjMd4FIc3OpI1RPZWdLyViMcqU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Np05GdD6JVglPvlVFj18vK8JVCPIh9P47lM4lhRoL14=; b=evpXuH1d8cx6RTCTVx/VaeL8FHRlnxGrgKHLFZgvIhXgaTJKmm23IBenM8Q3sHfNHP zksgka3q/kzld/Y7Ms21FCIgtMe50A+dXo4utfSYKXWmksmS+qG7w4oJrMCuyA2XiRMI cG1vbopCdEIOWjAhCFdTRNUfO+Opxk7Umy8qWokJl5rgeoVEU/hjWN95jWSFB4F7yv7G wgFkImUmo47H8nMzb5MkqFUh+0pZb61hMyMdTJMD1OyzdFCa0DrE5fjga2D9jt7bpb1y mCevWF8sD2auVP5p4jumWNtsHTjtrXBoozY3RWBd56Q01ZfaUmujrAl4sNz1+RKBLlYh TvAA== X-Gm-Message-State: AOAM533g1lpoth4/74e8uiQ+lxnbPvZVYL0swQBqCHPS7+c/939qddPZ Lf+pVOYOOS05JKVnwrWujP8QGC8ScWLn48gQdY4P+xztSolY6erpRES4xqmUvpp79lGL4Vjj/nU Lw3gmmt3bDtHzW0CHQAAoX6EEl0BO9a5+PHxMbcoPsrUtuyQIR6aluxl8bQtPMlQFg8HwGl6hs3 m79D09CwcIovHFTg== X-Google-Smtp-Source: ABdhPJw6OelqNmXVipyr3g3nX6c+TmUVJ6vPqgasL89eRo+0yrhfCwkyMSUiylNdpYVja4VYRfKzo/ADecr2 X-Received: by 2002:a17:902:6acc:b0:149:8f60:a526 with SMTP id i12-20020a1709026acc00b001498f60a526mr43384036plt.25.1649861688226; Wed, 13 Apr 2022 07:54:48 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id cp17-20020a170902e79100b001549d3bcb3csm456489plb.106.2022.04.13.07.54.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2022 07:54:48 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d]) by postal.iol.unh.edu (Postfix) with ESMTP id 1C9326051839; Wed, 13 Apr 2022 10:54:47 -0400 (EDT) From: ohilyard@iol.unh.edu To: dts@dpdk.org Cc: lijuan.tu@intel.com, juraj.linkes@pantheon.tech, Owen Hilyard Subject: [PATCH v3 1/3] framework: Move test-specific files to test directory Date: Wed, 13 Apr 2022 10:54:35 -0400 Message-Id: <20220413145437.31526-1-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org From: Owen Hilyard The DTS Improvement Working Group decided to move files specific to a single test or a small group of tests into tests/util. This is done in order to aid in the organization of DTS. Signed-off-by: Owen Hilyard --- framework/flow/__init__.py | 0 framework/virt_resource.py | 2 +- tests/data/__init__.py | 2 ++ tests/util/__init__.py | 2 ++ tests/util/flow/__init__.py | 2 ++ {framework => tests/util}/flow/enums.py | 0 {framework => tests/util}/flow/exceptions.py | 0 {framework => tests/util}/flow/flow.py | 0 {framework => tests/util}/flow/flow_action_items.py | 0 {framework => tests/util}/flow/flow_items.py | 8 +++----- {framework => tests/util}/flow/flow_pattern_items.py | 0 {framework => tests/util}/flow/flow_rule.py | 2 +- {framework => tests/util}/flow/generator.py | 0 tests/util/virt/__init__.py | 2 ++ {framework => tests/util/virt}/virt_base.py | 8 ++++---- {framework => tests/util/virt}/virt_common.py | 8 ++++---- {framework => tests/util/virt}/virt_dut.py | 10 +++++----- {framework => tests/util/virt}/virt_scene.py | 12 ++++++------ 18 files changed, 32 insertions(+), 26 deletions(-) delete mode 100644 framework/flow/__init__.py create mode 100644 tests/data/__init__.py create mode 100644 tests/util/__init__.py create mode 100644 tests/util/flow/__init__.py rename {framework => tests/util}/flow/enums.py (100%) rename {framework => tests/util}/flow/exceptions.py (100%) rename {framework => tests/util}/flow/flow.py (100%) rename {framework => tests/util}/flow/flow_action_items.py (100%) rename {framework => tests/util}/flow/flow_items.py (94%) rename {framework => tests/util}/flow/flow_pattern_items.py (100%) rename {framework => tests/util}/flow/flow_rule.py (97%) rename {framework => tests/util}/flow/generator.py (100%) create mode 100644 tests/util/virt/__init__.py rename {framework => tests/util/virt}/virt_base.py (99%) rename {framework => tests/util/virt}/virt_common.py (92%) rename {framework => tests/util/virt}/virt_dut.py (98%) rename {framework => tests/util/virt}/virt_scene.py (98%) diff --git a/framework/flow/__init__.py b/framework/flow/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/framework/virt_resource.py b/framework/virt_resource.py index 36b6fe9c..0e012511 100644 --- a/framework/virt_resource.py +++ b/framework/virt_resource.py @@ -30,7 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from random import randint -from .utils import RED, get_obj_funcs, parallel_lock +from framework.utils import RED, get_obj_funcs, parallel_lock INIT_FREE_PORT = 6000 INIT_SERIAL_PORT = 7000 diff --git a/tests/data/__init__.py b/tests/data/__init__.py new file mode 100644 index 00000000..4ad62931 --- /dev/null +++ b/tests/data/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2022 University of New Hampshire diff --git a/tests/util/__init__.py b/tests/util/__init__.py new file mode 100644 index 00000000..93e83aee --- /dev/null +++ b/tests/util/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2022 University of New Hampshire \ No newline at end of file diff --git a/tests/util/flow/__init__.py b/tests/util/flow/__init__.py new file mode 100644 index 00000000..93e83aee --- /dev/null +++ b/tests/util/flow/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2022 University of New Hampshire \ No newline at end of file diff --git a/framework/flow/enums.py b/tests/util/flow/enums.py similarity index 100% rename from framework/flow/enums.py rename to tests/util/flow/enums.py diff --git a/framework/flow/exceptions.py b/tests/util/flow/exceptions.py similarity index 100% rename from framework/flow/exceptions.py rename to tests/util/flow/exceptions.py diff --git a/framework/flow/flow.py b/tests/util/flow/flow.py similarity index 100% rename from framework/flow/flow.py rename to tests/util/flow/flow.py diff --git a/framework/flow/flow_action_items.py b/tests/util/flow/flow_action_items.py similarity index 100% rename from framework/flow/flow_action_items.py rename to tests/util/flow/flow_action_items.py diff --git a/framework/flow/flow_items.py b/tests/util/flow/flow_items.py similarity index 94% rename from framework/flow/flow_items.py rename to tests/util/flow/flow_items.py index e43614c5..35d07008 100644 --- a/framework/flow/flow_items.py +++ b/tests/util/flow/flow_items.py @@ -33,9 +33,7 @@ from __future__ import annotations import copy -import itertools -from functools import reduce -from typing import Any, Dict, FrozenSet, Hashable, Iterable, Set, Tuple, Union +from typing import Dict, FrozenSet, Iterable, Tuple, Union from .enums import FlowActionType, FlowItemType from .exceptions import InvalidFlowItemException @@ -95,8 +93,8 @@ class FlowItem(object): raise InvalidFlowItemException(self, other) elif other.type in self.valid_next_items: # These imports are in here so there is no circular import - from framework.flow.flow_action_items import ActionFlowItem - from framework.flow.flow_pattern_items import PatternFlowItem + from tests.util.flow.flow_action_items import ActionFlowItem + from tests.util.flow.flow_pattern_items import PatternFlowItem from .flow import Flow diff --git a/framework/flow/flow_pattern_items.py b/tests/util/flow/flow_pattern_items.py similarity index 100% rename from framework/flow/flow_pattern_items.py rename to tests/util/flow/flow_pattern_items.py diff --git a/framework/flow/flow_rule.py b/tests/util/flow/flow_rule.py similarity index 97% rename from framework/flow/flow_rule.py rename to tests/util/flow/flow_rule.py index 6687bffe..4d4cf487 100644 --- a/framework/flow/flow_rule.py +++ b/tests/util/flow/flow_rule.py @@ -32,7 +32,7 @@ from typing import Union -import framework.flow.flow_action_items as flow_action_items +import tests.util.flow.flow_action_items as flow_action_items from .enums import * from .flow import Flow diff --git a/framework/flow/generator.py b/tests/util/flow/generator.py similarity index 100% rename from framework/flow/generator.py rename to tests/util/flow/generator.py diff --git a/tests/util/virt/__init__.py b/tests/util/virt/__init__.py new file mode 100644 index 00000000..93e83aee --- /dev/null +++ b/tests/util/virt/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2022 University of New Hampshire \ No newline at end of file diff --git a/framework/virt_base.py b/tests/util/virt/virt_base.py similarity index 99% rename from framework/virt_base.py rename to tests/util/virt/virt_base.py index d4af8b98..4cc64565 100644 --- a/framework/virt_base.py +++ b/tests/util/virt/virt_base.py @@ -37,10 +37,10 @@ from random import randint import framework.exception as exception import framework.utils as utils -from .config import VIRTCONF, VirtConf -from .dut import Dut -from .logger import getLogger -from .settings import CONFIG_ROOT_PATH +from framework.config import VIRTCONF, VirtConf +from framework.dut import Dut +from framework.logger import getLogger +from framework.settings import CONFIG_ROOT_PATH from .virt_dut import VirtDut ST_NOTSTART = "NOTSTART" diff --git a/framework/virt_common.py b/tests/util/virt/virt_common.py similarity index 92% rename from framework/virt_common.py rename to tests/util/virt/virt_common.py index eb5ee066..36ea540e 100644 --- a/framework/virt_common.py +++ b/tests/util/virt/virt_common.py @@ -30,10 +30,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os -from .config import VirtConf -from .qemu_kvm import QEMUKvm -from .qemu_libvirt import LibvirtKvm -from .settings import CONFIG_ROOT_PATH +from framework.config import VirtConf +from framework.qemu_kvm import QEMUKvm +from framework.qemu_libvirt import LibvirtKvm +from framework.settings import CONFIG_ROOT_PATH def VM(dut, vm_name, suite_name): diff --git a/framework/virt_dut.py b/tests/util/virt/virt_dut.py similarity index 98% rename from framework/virt_dut.py rename to tests/util/virt/virt_dut.py index 369abacf..8bbec12c 100644 --- a/framework/virt_dut.py +++ b/tests/util/virt/virt_dut.py @@ -36,11 +36,11 @@ import time import framework.settings as settings from nics.net_device import GetNicObj, RemoveNicObj -from .config import AppNameConf, PortConf -from .dut import Dut -from .project_dpdk import DPDKdut -from .settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting -from .utils import RED, parallel_lock +from framework.config import AppNameConf, PortConf +from framework.dut import Dut +from framework.project_dpdk import DPDKdut +from framework.settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting +from framework.utils import RED, parallel_lock class VirtDut(DPDKdut): diff --git a/framework/virt_scene.py b/tests/util/virt/virt_scene.py similarity index 98% rename from framework/virt_scene.py rename to tests/util/virt/virt_scene.py index 63760192..694f84b9 100644 --- a/framework/virt_scene.py +++ b/tests/util/virt/virt_scene.py @@ -32,12 +32,12 @@ import time import framework.utils as utils -from .config import VIRTCONF, VirtConf -from .exception import * -from .pmd_output import PmdOutput -from .qemu_kvm import QEMUKvm -from .settings import CONFIG_ROOT_PATH, get_netdev -from .utils import create_mask +from framework.config import VIRTCONF, VirtConf +from framework.exception import * +from framework.pmd_output import PmdOutput +from framework.qemu_kvm import QEMUKvm +from framework.settings import CONFIG_ROOT_PATH, get_netdev +from framework.utils import create_mask # scenario module for handling scenario # 1. load configurations From patchwork Wed Apr 13 14:54:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Owen Hilyard X-Patchwork-Id: 109705 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30D13A050F; Wed, 13 Apr 2022 16:54:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AF52427FC; Wed, 13 Apr 2022 16:54:50 +0200 (CEST) Received: from mail-pg1-f228.google.com (mail-pg1-f228.google.com [209.85.215.228]) by mails.dpdk.org (Postfix) with ESMTP id 3B5014068E for ; Wed, 13 Apr 2022 16:54:49 +0200 (CEST) Received: by mail-pg1-f228.google.com with SMTP id t13so2026113pgn.8 for ; Wed, 13 Apr 2022 07:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5q4ucl+tWNDerphEz7rIEoklWpqVJfRPV4GZ2GHe4sg=; b=X5TgOAyAUGCFyKMZWWcEDORnqgyDezCdHND+ASgSEkQ0sD4IKwQfL2ov/F7VXaYyxh lt9S5B/yfeJPU4ETAUewlSURnIDH+Zw2nrB7x7BMP/43QZf2mKOV6v7ujVY6K5Wo+bIQ 6Ry8CDxo+a4SS+i/geadjsvMzw1zdS/qOMjF0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5q4ucl+tWNDerphEz7rIEoklWpqVJfRPV4GZ2GHe4sg=; b=HomabvDrEoFSwm3usyHisSsMDqbjQW5T2xYUN0bg4dAPcTB0KFJTrSlq5oOuv16kXu PW+1jwqja+kgMhCt4OR5+vH6Fak16GTULhbuWjwo//H0XQTgcTd8JRH+djmLJXI4lwGw 5fhHk0sG5tddbz/GAQaSCiQysinSyUgTdNeLDAqB+pUWdAyLtQHCucUXHlJVjOfZeXIV keYZWA9t5NmeaXO5hqXI3q0k5BJ5nNaugydM6XpIksb7M7yadsYMbJ+Hvt4ChBf+BvJb PsQsBKVRemNZjr2IqjAHGDro7rQhXbxTeBPg7+R2FWvA/iIywiKPipys8JXsdjKUKnaS G1rA== X-Gm-Message-State: AOAM530Nxg0FF6Uh2pdNagFmzrs21XZbMdwq+H3UwgOIoZuQvNt9aRQR cpEmESR2onmMksUvFGA42IQLvbT3clT9qNd17btY3nPKkfY32WlUj+vXAsN0luEL/OqflIw5j3o L9vDYvuc7useeePeq01VcdyLL/AEbAFrQb4SS3nbFEdI6uNoXW/r01v+PZhKJ7pgcbpdHyZW293 xJr2n5paiJGLhJNQ== X-Google-Smtp-Source: ABdhPJwf2GO9iv8hIuOtDF18imMqvTBFUV6RzfHIumgZZ0T0FhpPZBgTq7nsS4fg7eCJtqujiswwtuF6zk3i X-Received: by 2002:a05:6a00:b8e:b0:4fa:de88:9fc7 with SMTP id g14-20020a056a000b8e00b004fade889fc7mr43489088pfj.56.1649861688293; Wed, 13 Apr 2022 07:54:48 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id bc10-20020a170902930a00b0014f76a16fc9sm478169plb.117.2022.04.13.07.54.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2022 07:54:48 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d]) by postal.iol.unh.edu (Postfix) with ESMTP id 2C7EB605183A; Wed, 13 Apr 2022 10:54:47 -0400 (EDT) From: ohilyard@iol.unh.edu To: dts@dpdk.org Cc: lijuan.tu@intel.com, juraj.linkes@pantheon.tech, Owen Hilyard Subject: [PATCH v3 2/3] update files depending on tests/util Date: Wed, 13 Apr 2022 10:54:36 -0400 Message-Id: <20220413145437.31526-2-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220413145437.31526-1-ohilyard@iol.unh.edu> References: <20220413145437.31526-1-ohilyard@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org From: Owen Hilyard All of these files imported something that has been moved from framework/ to tests/util/. Unused imports have been removed as part of updating the import paths. Signed-off-by: Owen Hilyard --- framework/dut.py | 2 +- framework/multiple_vm.py | 4 +-- tests/TestSuite_ddp_gtp.py | 4 +-- tests/TestSuite_ddp_mpls.py | 7 +----- tests/TestSuite_dpdk_gro_lib.py | 2 +- tests/TestSuite_dpdk_gso_lib.py | 3 +-- tests/TestSuite_floating_veb.py | 5 ---- tests/TestSuite_flow_classify_softnic.py | 24 +++--------------- tests/TestSuite_generic_flow_api.py | 10 -------- tests/TestSuite_iavf.py | 7 ++---- tests/TestSuite_ip_pipeline.py | 25 +++---------------- ...te_ixgbe_vf_get_extra_queue_information.py | 6 +---- tests/TestSuite_kernelpf_iavf.py | 4 +-- tests/TestSuite_mdd.py | 4 +-- tests/TestSuite_pipeline.py | 24 +++--------------- tests/TestSuite_port_control.py | 4 +-- tests/TestSuite_power_bidirection_channel.py | 2 +- tests/TestSuite_power_negative.py | 6 +---- tests/TestSuite_pvp_diff_qemu_version.py | 5 +--- ...Suite_pvp_qemu_multi_paths_port_restart.py | 3 +-- tests/TestSuite_pvp_vhost_user_reconnect.py | 2 +- tests/TestSuite_pvp_virtio_bonding.py | 2 +- tests/TestSuite_rte_flow.py | 5 +--- tests/TestSuite_runtime_vf_queue_number.py | 2 +- ...estSuite_runtime_vf_queue_number_kernel.py | 2 +- tests/TestSuite_shutdown_api.py | 6 ++--- tests/TestSuite_sriov_kvm.py | 6 +---- tests/TestSuite_vdev_primary_secondary.py | 2 +- tests/TestSuite_veb_switch.py | 5 ---- tests/TestSuite_vf_daemon.py | 7 +----- tests/TestSuite_vf_interrupt_pmd.py | 6 +---- tests/TestSuite_vf_jumboframe.py | 5 +--- tests/TestSuite_vf_kernel.py | 4 +-- tests/TestSuite_vf_macfilter.py | 3 +-- tests/TestSuite_vf_offload.py | 7 +----- tests/TestSuite_vf_packet_rxtx.py | 3 +-- tests/TestSuite_vf_port_start_stop.py | 3 +-- tests/TestSuite_vf_rss.py | 2 +- tests/TestSuite_vf_to_vf_nic_bridge.py | 3 +-- tests/TestSuite_vf_vlan.py | 4 +-- tests/TestSuite_vhost_event_idx_interrupt.py | 3 +-- tests/TestSuite_vhost_multi_queue_qemu.py | 2 +- tests/TestSuite_vhost_pmd_xstats.py | 4 --- tests/TestSuite_vhost_user_live_migration.py | 3 +-- tests/TestSuite_vhost_virtio_pmd_interrupt.py | 2 +- tests/TestSuite_virtio_event_idx_interrupt.py | 3 +-- .../TestSuite_virtio_ipsec_cryptodev_func.py | 5 +--- tests/TestSuite_virtio_perf_cryptodev_func.py | 5 +--- tests/TestSuite_virtio_pvp_regression.py | 3 +-- tests/TestSuite_virtio_unit_cryptodev_func.py | 6 +---- tests/TestSuite_vm2vm_virtio_net_perf.py | 2 +- tests/TestSuite_vm2vm_virtio_pmd.py | 2 +- tests/TestSuite_vm_hotplug.py | 2 +- tests/TestSuite_vm_power_manager.py | 3 +-- tests/TestSuite_vm_pw_mgmt_policy.py | 3 +-- tests/TestSuite_vswitch_sample_cbdma.py | 2 +- {framework => tests/util/virt}/qemu_kvm.py | 8 +++--- .../util/virt}/qemu_libvirt.py | 11 ++------ tests/util/virt/virt_common.py | 4 +-- tests/util/virt/virt_scene.py | 5 ++-- 60 files changed, 74 insertions(+), 234 deletions(-) rename {framework => tests/util/virt}/qemu_kvm.py (99%) rename {framework => tests/util/virt}/qemu_libvirt.py (99%) diff --git a/framework/dut.py b/framework/dut.py index 6a8fc957..83f0d7a2 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -46,7 +46,7 @@ from .settings import LOG_NAME_SEP, NICS from .ssh_connection import SSHConnection from .test_result import ResultTable from .utils import RED, remove_old_rsa_key -from .virt_resource import VirtResource +from framework.virt_resource import VirtResource class Dut(Crb): diff --git a/framework/multiple_vm.py b/framework/multiple_vm.py index aac8f160..985dea7f 100644 --- a/framework/multiple_vm.py +++ b/framework/multiple_vm.py @@ -1,4 +1,3 @@ -import re import threading import time import traceback @@ -7,7 +6,6 @@ import threadpool from .logger import getLogger from .settings import DTS_ERR_TBL, DTS_PARALLEL_SETTING, save_global_setting -from .utils import RED class MultipleVM(object): @@ -79,7 +77,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 tests.util.virt.qemu_kvm import QEMUKvm # VM configured by configuration file if "virt_config" in args: diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py index f6ceb5b4..7b1b4f81 100644 --- a/tests/TestSuite_ddp_gtp.py +++ b/tests/TestSuite_ddp_gtp.py @@ -31,13 +31,11 @@ import random import re -import sys import time import framework.utils as utils from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm -from framework.settings import get_nic_name +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase VM_CORES_MASK = "all" diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index 9b1179be..0ab4cb6c 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -30,15 +30,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import random -import sys import time -from scapy.utils import rdpcap - -import framework.utils as utils from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm -from framework.settings import get_nic_name +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase VM_CORES_MASK = "all" diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py index e19b3695..87af21ca 100644 --- a/tests/TestSuite_dpdk_gro_lib.py +++ b/tests/TestSuite_dpdk_gro_lib.py @@ -42,7 +42,7 @@ import time import framework.utils as utils import tests.vhost_peer_conf as peer from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestDPDKGROLib(TestCase): diff --git a/tests/TestSuite_dpdk_gso_lib.py b/tests/TestSuite_dpdk_gso_lib.py index 25293643..6b7c86f1 100644 --- a/tests/TestSuite_dpdk_gso_lib.py +++ b/tests/TestSuite_dpdk_gso_lib.py @@ -41,9 +41,8 @@ import time import framework.utils as utils import tests.vhost_peer_conf as peer -from framework.config import UserConf from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestDPDKGsoLib(TestCase): diff --git a/tests/TestSuite_floating_veb.py b/tests/TestSuite_floating_veb.py index c3c0f83c..3d2e44eb 100644 --- a/tests/TestSuite_floating_veb.py +++ b/tests/TestSuite_floating_veb.py @@ -38,14 +38,9 @@ Test Floating VEB Features by Poll Mode Drivers. import re import time -from framework.dut import Dut from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.utils import RED -from framework.virt_dut import VirtDut class TestFloatingVEBSwitching(TestCase): diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py index 14042d18..d0f35b82 100644 --- a/tests/TestSuite_flow_classify_softnic.py +++ b/tests/TestSuite_flow_classify_softnic.py @@ -29,33 +29,17 @@ # (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 os -import random import re import time from time import sleep -import scapy.layers.inet -from scapy.arch import get_if_hwaddr -from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether +from scapy.layers.inet import IP, TCP, UDP, Ether from scapy.layers.inet6 import IPv6 -from scapy.layers.l2 import ARP, GRE, Dot1Q -from scapy.layers.sctp import SCTP, SCTPChunkData -from scapy.packet import Raw, bind_layers -from scapy.route import * -from scapy.sendrecv import sendp, sniff -from scapy.utils import hexstr, rdpcap, wrpcap - -import framework.utils as utils -from framework.crb import Crb -from framework.dut import Dut -from framework.exception import VerifyFailure -from framework.packet import Packet +from scapy.layers.sctp import SCTP +from scapy.utils import rdpcap, wrpcap + from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import DRIVERS, HEADER_SIZE from framework.test_case import TestCase -from framework.virt_dut import VirtDut class TestFlowClassifySoftnic(TestCase): diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py index a87f3f8b..998edc46 100644 --- a/tests/TestSuite_generic_flow_api.py +++ b/tests/TestSuite_generic_flow_api.py @@ -36,24 +36,14 @@ Test the support of generic flow API by Poll Mode Drivers. """ -import os import random import re import time -import scapy.layers.inet -from scapy.utils import rdpcap - import framework.packet as packet import framework.utils as utils -from framework.crb import Crb -from framework.dut import Dut -from framework.exception import VerifyFailure from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import DRIVERS, HEADER_SIZE from framework.test_case import TestCase, check_supported_nic -from framework.virt_dut import VirtDut MAX_VLAN = 4095 MAX_QUEUE = 15 diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py index d52996d2..15dfba08 100644 --- a/tests/TestSuite_iavf.py +++ b/tests/TestSuite_iavf.py @@ -36,16 +36,13 @@ Test some iavf function in i40e driver """ -import math -import random import re import time -from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.settings import HEADER_SIZE, get_nic_name +from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "Default" diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py index e5720e74..efed9672 100644 --- a/tests/TestSuite_ip_pipeline.py +++ b/tests/TestSuite_ip_pipeline.py @@ -29,34 +29,17 @@ # (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 os -import random import re import time from time import sleep -import scapy.layers.inet -from scapy.arch import get_if_hwaddr -from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether -from scapy.layers.l2 import ARP, GRE, Dot1Q -from scapy.layers.sctp import SCTP, SCTPChunkData -from scapy.packet import Raw, bind_layers -from scapy.route import * -from scapy.sendrecv import sendp, sniff +from scapy.layers.inet import IP, TCP, Ether +from scapy.packet import Raw # from scapy.all import conf -from scapy.utils import hexstr, rdpcap, wrpcap - -import framework.utils as utils -from framework.crb import Crb -from framework.dut import Dut -from framework.exception import VerifyFailure -from framework.packet import Packet -from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import DRIVERS, HEADER_SIZE +from scapy.utils import rdpcap, wrpcap + from framework.test_case import TestCase -from framework.virt_dut import VirtDut class TestIPPipeline(TestCase): diff --git a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py index 0e64a5d6..2fa2974f 100644 --- a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py +++ b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py @@ -33,18 +33,14 @@ DPDK Test suite. Test Niantic ixgbe_get_vf_queue Include Extra Information function. """ -import random -import re import time -import framework.utils as utils from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm # Use scapy to send packets with different source and dest ip. # and collect the hash result of five tuple and the queue id. from framework.test_case import TestCase -from framework.virt_common import VM class TestIxgbeVfGetExtraInfo(TestCase): diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index 3c8e5929..55e40630 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -44,10 +44,8 @@ import time import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.utils import RED -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" MAX_VLAN = 4095 diff --git a/tests/TestSuite_mdd.py b/tests/TestSuite_mdd.py index dc28b9fe..43049974 100644 --- a/tests/TestSuite_mdd.py +++ b/tests/TestSuite_mdd.py @@ -34,14 +34,12 @@ DPDK Test suite. Test the support of Malicious Driver Detection """ - -import re import time from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" send_pks_num = 2000 diff --git a/tests/TestSuite_pipeline.py b/tests/TestSuite_pipeline.py index c13bd714..b36d62e9 100644 --- a/tests/TestSuite_pipeline.py +++ b/tests/TestSuite_pipeline.py @@ -31,34 +31,18 @@ import itertools import os -import random import re import socket import time from time import sleep -import scapy.layers.inet -from scapy.arch import get_if_hwaddr -from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether -from scapy.layers.l2 import ARP, GRE, Dot1Q -from scapy.layers.sctp import SCTP, SCTPChunkData -from scapy.packet import Raw, bind_layers -from scapy.route import * -from scapy.sendrecv import sendp, sniff +from scapy.layers.inet import IP, TCP, Ether +from scapy.packet import Raw # from scapy.all import conf -from scapy.utils import hexstr, rdpcap, wrpcap - -import framework.utils as utils -from framework.crb import Crb -from framework.dut import Dut -from framework.exception import VerifyFailure -from framework.packet import Packet -from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import DRIVERS, HEADER_SIZE +from scapy.utils import rdpcap, wrpcap + from framework.test_case import TestCase -from framework.virt_dut import VirtDut TIMESTAMP = re.compile(r"\d{2}\:\d{2}\:\d{2}\.\d{6}") PAYLOAD = re.compile(r"\t0x([0-9a-fA-F]+): ([0-9a-fA-F ]+)") diff --git a/tests/TestSuite_port_control.py b/tests/TestSuite_port_control.py index 8055b776..fce2c523 100755 --- a/tests/TestSuite_port_control.py +++ b/tests/TestSuite_port_control.py @@ -29,15 +29,13 @@ # (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 os import re import time import framework.packet as 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 tests.util.virt.virt_common import VM class TestPortControl(TestCase): diff --git a/tests/TestSuite_power_bidirection_channel.py b/tests/TestSuite_power_bidirection_channel.py index 1f2dcd1d..b8a5e028 100644 --- a/tests/TestSuite_power_bidirection_channel.py +++ b/tests/TestSuite_power_bidirection_channel.py @@ -38,7 +38,7 @@ import time import traceback from framework.exception import VerifyFailure -from framework.qemu_libvirt import LibvirtKvm +from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask diff --git a/tests/TestSuite_power_negative.py b/tests/TestSuite_power_negative.py index b1ca3ebd..2d98d8a6 100644 --- a/tests/TestSuite_power_negative.py +++ b/tests/TestSuite_power_negative.py @@ -35,14 +35,10 @@ power negative test suite. """ import os -import re import time -import traceback -from framework.exception import VerifyFailure -from framework.qemu_libvirt import LibvirtKvm +from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase -from framework.utils import create_mask as dts_create_mask class TestPowerNegative(TestCase): diff --git a/tests/TestSuite_pvp_diff_qemu_version.py b/tests/TestSuite_pvp_diff_qemu_version.py index b1fb18ae..eac63a63 100644 --- a/tests/TestSuite_pvp_diff_qemu_version.py +++ b/tests/TestSuite_pvp_diff_qemu_version.py @@ -41,13 +41,10 @@ qemu = import re import time -from scapy.utils import wrpcap - -import framework.utils as utils from framework.pktgen import PacketGeneratorHelper from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVhostPVPDiffQemuVersion(TestCase): diff --git a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py index 0a5dcdd2..855d4251 100644 --- a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py +++ b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py @@ -41,11 +41,10 @@ port restart test with each path import re import time -import framework.utils as utils from framework.packet import Packet from framework.pktgen import PacketGeneratorHelper from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestPVPQemuMultiPathPortRestart(TestCase): diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py index 327444fb..ec494106 100644 --- a/tests/TestSuite_pvp_vhost_user_reconnect.py +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py @@ -43,7 +43,7 @@ import framework.utils as utils from framework.packet import Packet from framework.pktgen import PacketGeneratorHelper from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestPVPVhostUserReconnect(TestCase): diff --git a/tests/TestSuite_pvp_virtio_bonding.py b/tests/TestSuite_pvp_virtio_bonding.py index 3565882e..e009a819 100644 --- a/tests/TestSuite_pvp_virtio_bonding.py +++ b/tests/TestSuite_pvp_virtio_bonding.py @@ -42,7 +42,7 @@ from framework.packet import Packet from framework.pktgen import PacketGeneratorHelper from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestPVPVirtIOBonding(TestCase): diff --git a/tests/TestSuite_rte_flow.py b/tests/TestSuite_rte_flow.py index b8d41540..237a2559 100644 --- a/tests/TestSuite_rte_flow.py +++ b/tests/TestSuite_rte_flow.py @@ -34,12 +34,9 @@ DPDK Test suite. MTU Checks example. """ -import ipaddress -import time from typing import Callable -import framework.utils as utils -from framework.flow import generator +from tests.util.flow import generator from framework.pmd_output import PmdOutput from framework.test_case import TestCase diff --git a/tests/TestSuite_runtime_vf_queue_number.py b/tests/TestSuite_runtime_vf_queue_number.py index ae431f56..99af8710 100644 --- a/tests/TestSuite_runtime_vf_queue_number.py +++ b/tests/TestSuite_runtime_vf_queue_number.py @@ -39,7 +39,7 @@ import time from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase RSS_KEY = "6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E" diff --git a/tests/TestSuite_runtime_vf_queue_number_kernel.py b/tests/TestSuite_runtime_vf_queue_number_kernel.py index e8f9f5c9..16101c98 100755 --- a/tests/TestSuite_runtime_vf_queue_number_kernel.py +++ b/tests/TestSuite_runtime_vf_queue_number_kernel.py @@ -41,7 +41,7 @@ import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py index a109932a..9248447a 100644 --- a/tests/TestSuite_shutdown_api.py +++ b/tests/TestSuite_shutdown_api.py @@ -36,8 +36,6 @@ Test Shutdown API Feature """ -import os -import random import re import time from random import randint @@ -45,8 +43,8 @@ from random import randint import framework.utils as utils from framework.exception import VerifyFailure from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm -from framework.settings import DRIVERS, HEADER_SIZE, PROTOCOL_PACKET_SIZE, get_nic_name +from tests.util.virt.qemu_kvm import QEMUKvm +from framework.settings import DRIVERS, HEADER_SIZE from framework.test_case import TestCase # diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py index c2ce2259..245eca70 100644 --- a/tests/TestSuite_sriov_kvm.py +++ b/tests/TestSuite_sriov_kvm.py @@ -37,15 +37,11 @@ Test userland 10Gb PMD. """ -import pdb -import random -import re import time from framework.pmd_output import PmdOutput -from framework.settings import PROTOCOL_PACKET_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM FRAME_SIZE_64 = 64 VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vdev_primary_secondary.py b/tests/TestSuite_vdev_primary_secondary.py index 7f054cda..2bfe862b 100644 --- a/tests/TestSuite_vdev_primary_secondary.py +++ b/tests/TestSuite_vdev_primary_secondary.py @@ -46,7 +46,7 @@ import time import framework.utils as utils from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVdevPrimarySecondary(TestCase): diff --git a/tests/TestSuite_veb_switch.py b/tests/TestSuite_veb_switch.py index 7b91fee3..5fd5526e 100644 --- a/tests/TestSuite_veb_switch.py +++ b/tests/TestSuite_veb_switch.py @@ -39,14 +39,9 @@ import re import time import framework.utils as utils -from framework.dut import Dut from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.project_dpdk import DPDKdut -from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.utils import RED -from framework.virt_dut import VirtDut class TestVEBSwitching(TestCase): diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py index 29520965..1f119adf 100644 --- a/tests/TestSuite_vf_daemon.py +++ b/tests/TestSuite_vf_daemon.py @@ -30,16 +30,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import random -import sys import time -from scapy.utils import rdpcap - -import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm -from framework.settings import get_nic_name +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py index d0b02b12..a4d6020f 100644 --- a/tests/TestSuite_vf_interrupt_pmd.py +++ b/tests/TestSuite_vf_interrupt_pmd.py @@ -35,14 +35,10 @@ DPDK Test suite. Test vf_interrupt_pmd. """ -import pdb -import re -import time - import framework.utils as utils from framework.packet import Packet from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVfInterruptPmd(TestCase): diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py index 2245a92e..0fb15a3f 100644 --- a/tests/TestSuite_vf_jumboframe.py +++ b/tests/TestSuite_vf_jumboframe.py @@ -29,16 +29,13 @@ # (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 re import time import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.utils import RED -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py index b30b60b2..755f5741 100755 --- a/tests/TestSuite_vf_kernel.py +++ b/tests/TestSuite_vf_kernel.py @@ -44,9 +44,9 @@ import time import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase -from framework.utils import GREEN, RED +from framework.utils import GREEN class TestVfKernel(TestCase): diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py index 5351cb68..2e4d08b4 100644 --- a/tests/TestSuite_vf_macfilter.py +++ b/tests/TestSuite_vf_macfilter.py @@ -29,12 +29,11 @@ # (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 re import time from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index dff1a1b9..ff01e2ad 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -30,17 +30,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import re -import string import time import framework.utils as utils -from framework.crb import Crb from framework.pmd_output import PmdOutput -from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.utils import GREEN, RED -from framework.virt_common import VM -from nics.net_device import NetDevice +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" DEFAULT_MTU = 1500 diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py index ea000c83..d3597013 100644 --- a/tests/TestSuite_vf_packet_rxtx.py +++ b/tests/TestSuite_vf_packet_rxtx.py @@ -29,13 +29,12 @@ # (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 re import time from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vf_port_start_stop.py b/tests/TestSuite_vf_port_start_stop.py index 5192653d..eebf68ac 100644 --- a/tests/TestSuite_vf_port_start_stop.py +++ b/tests/TestSuite_vf_port_start_stop.py @@ -29,13 +29,12 @@ # (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 re import time from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py index b8bf65a5..150d658a 100644 --- a/tests/TestSuite_vf_rss.py +++ b/tests/TestSuite_vf_rss.py @@ -46,7 +46,7 @@ from framework.pmd_output import PmdOutput # Use scapy to send packets with different source and dest ip. # and collect the hash result of five tuple and the queue id. from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVfRss(TestCase): diff --git a/tests/TestSuite_vf_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py index f9b5b9ab..f46a65ad 100644 --- a/tests/TestSuite_vf_to_vf_nic_bridge.py +++ b/tests/TestSuite_vf_to_vf_nic_bridge.py @@ -33,14 +33,13 @@ DPDK Test suite Test vf to vf nic bridge """ -import pdb import re import time import framework.utils as utils from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VF_NUMS_ON_ONE_PF = 2 VF_TEMP_MAC = "52:54:12:45:67:1%d" diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index d4cf29b3..e80531e3 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -30,14 +30,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import random -import re import time from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.settings import get_nic_name from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM VM_CORES_MASK = "all" MAX_VLAN = 4095 diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py index f01465f1..65001305 100644 --- a/tests/TestSuite_vhost_event_idx_interrupt.py +++ b/tests/TestSuite_vhost_event_idx_interrupt.py @@ -37,9 +37,8 @@ Vhost event idx interrupt need test with l3fwd-power sample import re import time -import framework.utils as utils from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVhostEventIdxInterrupt(TestCase): diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py index 6359bfc8..f17daf70 100644 --- a/tests/TestSuite_vhost_multi_queue_qemu.py +++ b/tests/TestSuite_vhost_multi_queue_qemu.py @@ -43,7 +43,7 @@ from framework.pktgen import PacketGeneratorHelper from framework.pmd_output import PmdOutput from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVhostMultiQueueQemu(TestCase): diff --git a/tests/TestSuite_vhost_pmd_xstats.py b/tests/TestSuite_vhost_pmd_xstats.py index 9adb9708..7f6dcecf 100644 --- a/tests/TestSuite_vhost_pmd_xstats.py +++ b/tests/TestSuite_vhost_pmd_xstats.py @@ -37,13 +37,9 @@ vhost pmd xstats test suite. import copy import datetime import re -import time -import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm -from framework.settings import HEADER_SIZE from framework.test_case import TestCase ETHER_JUMBO_FRAME_MTU = 9000 diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py index a5e72672..8ac41973 100644 --- a/tests/TestSuite_vhost_user_live_migration.py +++ b/tests/TestSuite_vhost_user_live_migration.py @@ -32,12 +32,11 @@ import os.path import re import time -import framework.utils as utils from framework.config import UserConf from framework.exception import VirtDutInitException from framework.settings import CONFIG_ROOT_PATH from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVhostUserLiveMigration(TestCase): diff --git a/tests/TestSuite_vhost_virtio_pmd_interrupt.py b/tests/TestSuite_vhost_virtio_pmd_interrupt.py index e541b5e3..51ad0154 100644 --- a/tests/TestSuite_vhost_virtio_pmd_interrupt.py +++ b/tests/TestSuite_vhost_virtio_pmd_interrupt.py @@ -41,7 +41,7 @@ import framework.utils as utils from framework.packet import Packet from framework.pktgen import PacketGeneratorHelper from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVhostVirtioPmdInterrupt(TestCase): diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py index 2429887b..2ef56fac 100644 --- a/tests/TestSuite_virtio_event_idx_interrupt.py +++ b/tests/TestSuite_virtio_event_idx_interrupt.py @@ -38,10 +38,9 @@ import _thread import re import time -import framework.utils as utils from framework.pktgen import PacketGeneratorHelper from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVirtioIdxInterrupt(TestCase): diff --git a/tests/TestSuite_virtio_ipsec_cryptodev_func.py b/tests/TestSuite_virtio_ipsec_cryptodev_func.py index 07ec5633..00dc7558 100644 --- a/tests/TestSuite_virtio_ipsec_cryptodev_func.py +++ b/tests/TestSuite_virtio_ipsec_cryptodev_func.py @@ -33,14 +33,11 @@ DPDK Test suite Test DPDK vhost + virtio scenarios """ import binascii -import os -import subprocess -import time import framework.utils as utils import tests.cryptodev_common as cc from framework.packet import Packet -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase diff --git a/tests/TestSuite_virtio_perf_cryptodev_func.py b/tests/TestSuite_virtio_perf_cryptodev_func.py index 2a1ae951..d89cb024 100644 --- a/tests/TestSuite_virtio_perf_cryptodev_func.py +++ b/tests/TestSuite_virtio_perf_cryptodev_func.py @@ -32,12 +32,9 @@ DPDK Test suite Test DPDK vhost + virtio scenarios """ -import os -import subprocess -import framework.utils as utils import tests.cryptodev_common as cc -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase diff --git a/tests/TestSuite_virtio_pvp_regression.py b/tests/TestSuite_virtio_pvp_regression.py index 9d7fe197..3ea0aef7 100644 --- a/tests/TestSuite_virtio_pvp_regression.py +++ b/tests/TestSuite_virtio_pvp_regression.py @@ -44,11 +44,10 @@ qemu = import re import time -import framework.utils as utils from framework.pktgen import PacketGeneratorHelper from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVirtioPVPRegression(TestCase): diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index 22e595e4..08cd03e3 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -34,12 +34,8 @@ DPDK Test suite Test DPDK vhost + virtio scenarios """ -import os -import subprocess - -import framework.utils as utils import tests.cryptodev_common as cc -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py b/tests/TestSuite_vm2vm_virtio_net_perf.py index 486f1acf..3b107368 100644 --- a/tests/TestSuite_vm2vm_virtio_net_perf.py +++ b/tests/TestSuite_vm2vm_virtio_net_perf.py @@ -46,7 +46,7 @@ import time import framework.utils as utils from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVM2VMVirtioNetPerf(TestCase): diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py index 9460c5fa..e208c87c 100644 --- a/tests/TestSuite_vm2vm_virtio_pmd.py +++ b/tests/TestSuite_vm2vm_virtio_pmd.py @@ -45,7 +45,7 @@ import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVM2VMVirtioPMD(TestCase): diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.py index b9084e35..b96d780c 100644 --- a/tests/TestSuite_vm_hotplug.py +++ b/tests/TestSuite_vm_hotplug.py @@ -41,7 +41,7 @@ import re import time from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vm_power_manager.py b/tests/TestSuite_vm_power_manager.py index 917a60f3..2c6a37bc 100644 --- a/tests/TestSuite_vm_power_manager.py +++ b/tests/TestSuite_vm_power_manager.py @@ -37,8 +37,7 @@ VM power manager test suite. import re import framework.utils as utils -from framework.qemu_libvirt import LibvirtKvm -from framework.settings import HEADER_SIZE +from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py b/tests/TestSuite_vm_pw_mgmt_policy.py index d15cbbe0..0f43f289 100644 --- a/tests/TestSuite_vm_pw_mgmt_policy.py +++ b/tests/TestSuite_vm_pw_mgmt_policy.py @@ -36,7 +36,6 @@ virtual power manager policy (traffic/time) test suite. import os import random import re -import textwrap import time import traceback from copy import deepcopy @@ -48,7 +47,7 @@ from framework.exception import VerifyFailure from framework.packet import Packet from framework.pktgen import TRANSMIT_CONT from framework.pmd_output import PmdOutput -from framework.qemu_libvirt import LibvirtKvm +from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py index 503c8ba0..5fa901f7 100644 --- a/tests/TestSuite_vswitch_sample_cbdma.py +++ b/tests/TestSuite_vswitch_sample_cbdma.py @@ -45,7 +45,7 @@ from framework.pktgen import PacketGeneratorHelper from framework.pmd_output import PmdOutput from framework.settings import HEADER_SIZE from framework.test_case import TestCase -from framework.virt_common import VM +from tests.util.virt.virt_common import VM class TestVswitchSampleCBDMA(TestCase): diff --git a/framework/qemu_kvm.py b/tests/util/virt/qemu_kvm.py similarity index 99% rename from framework/qemu_kvm.py rename to tests/util/virt/qemu_kvm.py index 5615263b..c6db1bb7 100644 --- a/framework/qemu_kvm.py +++ b/tests/util/virt/qemu_kvm.py @@ -34,10 +34,10 @@ import os import re import time -from .exception import StartVMFailedException -from .settings import DTS_PARALLEL_SETTING, get_host_ip, load_global_setting -from .utils import RED, parallel_lock -from .virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase +from framework.exception import StartVMFailedException +from framework.settings import get_host_ip +from framework.utils import RED, parallel_lock +from tests.util.virt.virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase # This name is directly defined in the qemu guest service # So you can not change it except it is changed by the service diff --git a/framework/qemu_libvirt.py b/tests/util/virt/qemu_libvirt.py similarity index 99% rename from framework/qemu_libvirt.py rename to tests/util/virt/qemu_libvirt.py index 740b7bbc..63a4bce9 100644 --- a/framework/qemu_libvirt.py +++ b/tests/util/virt/qemu_libvirt.py @@ -36,15 +36,8 @@ import xml.etree.ElementTree as ET from xml.dom import minidom from xml.etree.ElementTree import ElementTree -import framework.utils as utils - -from .config import VIRTCONF, VirtConf -from .dut import Dut -from .exception import StartVMFailedException -from .logger import getLogger -from .ssh_connection import SSHConnection -from .virt_base import VirtBase -from .virt_resource import VirtResource +from framework.exception import StartVMFailedException +from tests.util.virt.virt_base import VirtBase class LibvirtKvm(VirtBase): diff --git a/tests/util/virt/virt_common.py b/tests/util/virt/virt_common.py index 36ea540e..a0057ded 100644 --- a/tests/util/virt/virt_common.py +++ b/tests/util/virt/virt_common.py @@ -31,8 +31,8 @@ import os from framework.config import VirtConf -from framework.qemu_kvm import QEMUKvm -from framework.qemu_libvirt import LibvirtKvm +from tests.util.virt.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.settings import CONFIG_ROOT_PATH diff --git a/tests/util/virt/virt_scene.py b/tests/util/virt/virt_scene.py index 694f84b9..7dc7d45e 100644 --- a/tests/util/virt/virt_scene.py +++ b/tests/util/virt/virt_scene.py @@ -28,14 +28,13 @@ # 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. -import time import framework.utils as utils -from framework.config import VIRTCONF, VirtConf +from framework.config import VirtConf from framework.exception import * from framework.pmd_output import PmdOutput -from framework.qemu_kvm import QEMUKvm +from tests.util.virt.qemu_kvm import QEMUKvm from framework.settings import CONFIG_ROOT_PATH, get_netdev from framework.utils import create_mask From patchwork Wed Apr 13 14:54:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Owen Hilyard X-Patchwork-Id: 109703 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68679A050D; Wed, 13 Apr 2022 16:54:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B6A040694; Wed, 13 Apr 2022 16:54:50 +0200 (CEST) Received: from mail-il1-f228.google.com (mail-il1-f228.google.com [209.85.166.228]) by mails.dpdk.org (Postfix) with ESMTP id B21AC4068E for ; Wed, 13 Apr 2022 16:54:48 +0200 (CEST) Received: by mail-il1-f228.google.com with SMTP id r11so1278371ila.1 for ; Wed, 13 Apr 2022 07:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2SSdv1qOuPTA6IWfbOodzcM6flZ5Lid+Nzl+ATHpqR4=; b=iGQW/13UBEc7ABie0biI9lVv83rwW8VzcttaQRkTVexqi+QNU2AoIOZUPl379U//fG BAUhKKjEyvimQbUSYaTPrOoDGxWsQdcNsmifUZMJzHw0rqNjxAapM7hRJ/c/IA7bfu4b 6X2XWZ1FixBpa6DxwZBurlQ4i4i2JP8/5rLzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2SSdv1qOuPTA6IWfbOodzcM6flZ5Lid+Nzl+ATHpqR4=; b=34maxMgu+m4vG1h+CzPBo08gvDgCuEAx5ewU1lbvdQjhqByoA3olV5GOc9z0Pj/S5z MH7OiQtFdeNeWW0ZyaFyuJ/hmbn82rwFWYN84hORUTomQXRgfLBH9QdSRTle23jAQJmv z2AyzemAJ/up2c21CvlDHA2240VuaAu5Y9wi8K090Ta09ANarN91pD9ebx3lQywuJKB9 00rFFW9+SNlXFKN7lIjJDPGqgbFVDOCjtNOwDtr8qBDCW0r6xoVYmvy/bxPIH5dXYGyi yp93BavpMK+xjhcvwaMiF1EsjtruEwsDNJi6g7Dp6R9sWqhfvVRO7RCfCLhQeO0lguEU JAHA== X-Gm-Message-State: AOAM532eiLbXB3K8wElY6pJnL6OZrOF/A5JoF3Wev+uBYGeLYw1cBwyL 3S4NYEjw87aSX/ccItx63UhIBhqtxhRdsFTkRu6mWQUR7h7BN2voI61g0jP2vDeW7dERcrEbGhk XOEjcOnW7T+XqBDW3CgmCyVpPejk721kjIJMSDm6i1RS9NSyu7SphHPa/G+HOpA2kWEB5FwusWY QM+0b2CrfCDNCRRA== X-Google-Smtp-Source: ABdhPJy09YHyUy3NvM+5Y2H7eh61TOxxKC9J9Mplc/5dfmoQpAb7MIBOrcJPF7+Wbt7QXvSjsSZMXsSmRogS X-Received: by 2002:a92:6e0b:0:b0:2c9:a276:58cc with SMTP id j11-20020a926e0b000000b002c9a27658ccmr18583957ilc.199.1649861687923; Wed, 13 Apr 2022 07:54:47 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id p6-20020a029186000000b003263a48f105sm265556jag.19.2022.04.13.07.54.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Apr 2022 07:54:47 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d]) by postal.iol.unh.edu (Postfix) with ESMTP id 3D149605183B; Wed, 13 Apr 2022 10:54:47 -0400 (EDT) From: ohilyard@iol.unh.edu To: dts@dpdk.org Cc: lijuan.tu@intel.com, juraj.linkes@pantheon.tech, Owen Hilyard Subject: [PATCH v3 3/3] all: ran formatter Date: Wed, 13 Apr 2022 10:54:37 -0400 Message-Id: <20220413145437.31526-3-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220413145437.31526-1-ohilyard@iol.unh.edu> References: <20220413145437.31526-1-ohilyard@iol.unh.edu> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org From: Owen Hilyard It looks like some other parts of DTS were not formatted properly. Since the formatter script is all or nothing, I have to push those up as well. Signed-off-by: Owen Hilyard --- framework/dut.py | 2 +- ...uite_cvl_advanced_iavf_rss_pppol2tpoudp.py | 447 +++++++++--------- tests/TestSuite_cvl_iavf_fdir_pppol2tpoudp.py | 90 ++-- tests/TestSuite_ddp_gtp.py | 2 +- tests/TestSuite_ddp_mpls.py | 2 +- tests/TestSuite_eeprom_dump.py | 10 +- ...te_ixgbe_vf_get_extra_queue_information.py | 2 +- tests/TestSuite_power_bidirection_channel.py | 2 +- tests/TestSuite_power_negative.py | 2 +- tests/TestSuite_rte_flow.py | 2 +- tests/TestSuite_runtime_vf_queue_number.py | 2 +- tests/TestSuite_shutdown_api.py | 2 +- tests/TestSuite_unit_tests_cmdline.py | 4 +- tests/TestSuite_unit_tests_crc.py | 4 +- tests/TestSuite_unit_tests_cryptodev_func.py | 4 +- tests/TestSuite_unit_tests_dump.py | 4 +- tests/TestSuite_unit_tests_eal.py | 4 +- tests/TestSuite_unit_tests_event_timer.py | 4 +- tests/TestSuite_unit_tests_kni.py | 4 +- tests/TestSuite_unit_tests_loopback.py | 4 +- tests/TestSuite_unit_tests_lpm.py | 4 +- tests/TestSuite_unit_tests_mbuf.py | 4 +- tests/TestSuite_unit_tests_mempool.py | 4 +- tests/TestSuite_unit_tests_pmd_perf.py | 4 +- tests/TestSuite_unit_tests_power.py | 4 +- tests/TestSuite_unit_tests_qos.py | 4 +- tests/TestSuite_unit_tests_ring.py | 4 +- tests/TestSuite_unit_tests_ringpmd.py | 4 +- tests/TestSuite_unit_tests_timer.py | 4 +- tests/TestSuite_vf_daemon.py | 2 +- tests/TestSuite_vf_kernel.py | 2 +- .../TestSuite_virtio_ipsec_cryptodev_func.py | 2 +- tests/TestSuite_virtio_perf_cryptodev_func.py | 2 +- tests/TestSuite_virtio_unit_cryptodev_func.py | 2 +- tests/TestSuite_vm_hotplug.py | 2 +- tests/TestSuite_vm_power_manager.py | 2 +- tests/TestSuite_vm_pw_mgmt_policy.py | 2 +- tests/util/__init__.py | 2 +- tests/util/flow/__init__.py | 2 +- tests/util/virt/__init__.py | 2 +- tests/util/virt/qemu_kvm.py | 8 +- tests/util/virt/virt_base.py | 2 +- tests/util/virt/virt_common.py | 2 +- tests/util/virt/virt_dut.py | 3 +- tests/util/virt/virt_scene.py | 3 +- 45 files changed, 361 insertions(+), 312 deletions(-) diff --git a/framework/dut.py b/framework/dut.py index 83f0d7a2..74260c90 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -37,6 +37,7 @@ from typing import Dict, List, Optional, Union from uuid import uuid4 import framework.settings as settings +from framework.virt_resource import VirtResource from nics.net_device import GetNicObj from .config import AppNameConf, PortConf @@ -46,7 +47,6 @@ from .settings import LOG_NAME_SEP, NICS from .ssh_connection import SSHConnection from .test_result import ResultTable from .utils import RED, remove_old_rsa_key -from framework.virt_resource import VirtResource class Dut(Crb): diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_pppol2tpoudp.py b/tests/TestSuite_cvl_advanced_iavf_rss_pppol2tpoudp.py index f47a3ae7..c6ee9699 100644 --- a/tests/TestSuite_cvl_advanced_iavf_rss_pppol2tpoudp.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_pppol2tpoudp.py @@ -1884,7 +1884,7 @@ vector_case_64 = [ }, ] -#l2tpv2 control + data +# l2tpv2 control + data vector_case_65 = [ { "sub_casename": "l2tpv2_session_id_MAC_IPV4_L2TPV2_CONTROL", @@ -1893,21 +1893,21 @@ vector_case_65 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -1919,21 +1919,21 @@ vector_case_66 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -1945,21 +1945,21 @@ vector_case_67 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -1971,21 +1971,21 @@ vector_case_68 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0xc80,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -1997,21 +1997,21 @@ vector_case_69 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2023,21 +2023,21 @@ vector_case_70 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2049,21 +2049,21 @@ vector_case_71 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2075,21 +2075,21 @@ vector_case_72 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2101,21 +2101,21 @@ vector_case_73 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2127,21 +2127,21 @@ vector_case_74 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2153,21 +2153,21 @@ vector_case_75 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2179,21 +2179,21 @@ vector_case_76 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2205,21 +2205,21 @@ vector_case_77 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2231,21 +2231,21 @@ vector_case_78 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2257,21 +2257,21 @@ vector_case_79 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2283,21 +2283,21 @@ vector_case_80 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2309,21 +2309,21 @@ vector_case_81 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2335,21 +2335,21 @@ vector_case_82 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=8,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2361,21 +2361,21 @@ vector_case_83 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2387,21 +2387,21 @@ vector_case_84 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2413,21 +2413,21 @@ vector_case_85 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2439,21 +2439,21 @@ vector_case_86 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2465,21 +2465,21 @@ vector_case_87 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x2222)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2491,21 +2491,21 @@ vector_case_88 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x2222)", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=12,session_id=0x1111)", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2517,21 +2517,21 @@ vector_case_89 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2543,21 +2543,21 @@ vector_case_90 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2569,21 +2569,21 @@ vector_case_91 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2595,21 +2595,21 @@ vector_case_92 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2621,21 +2621,21 @@ vector_case_93 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2647,21 +2647,21 @@ vector_case_94 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2673,21 +2673,21 @@ vector_case_95 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2699,21 +2699,21 @@ vector_case_96 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2725,21 +2725,21 @@ vector_case_97 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2751,21 +2751,21 @@ vector_case_98 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2777,21 +2777,21 @@ vector_case_99 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2803,21 +2803,21 @@ vector_case_100 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x000,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2829,21 +2829,21 @@ vector_case_101 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2855,21 +2855,21 @@ vector_case_102 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=12,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2881,21 +2881,21 @@ vector_case_103 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2907,21 +2907,21 @@ vector_case_104 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x080,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2933,21 +2933,21 @@ vector_case_105 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2959,21 +2959,21 @@ vector_case_106 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x2222,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x020,session_id=0x1111,offset=6)/Raw(b'\\x00\\x00\\x00\\x00')/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -2985,21 +2985,21 @@ vector_case_107 = [ "test": [ { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] @@ -3011,24 +3011,25 @@ vector_case_108 = [ "test": [ { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "save_hash" + "action": "save_hash", }, { "send_packet": "Ether(src='11:22:33:44:55:77')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_different" + "action": "check_hash_different", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IPv6()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x2222)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_hash_same" + "action": "check_hash_same", }, { "send_packet": "Ether(src='00:00:00:00:00:01')/IP()/UDP(dport=1701)/L2TP(hdr=0x480,len=16,session_id=0x1111)/HDLC()/Raw(b'\\x00\\x00')", - "action": "check_no_hash" + "action": "check_no_hash", }, - ] + ], }, ] + class TestCVLAdvancedIAVFRSSPPPoL2TPv2oUDP(TestCase): def set_up_all(self): """ @@ -3467,8 +3468,8 @@ class TestCVLAdvancedIAVFRSSPPPoL2TPv2oUDP(TestCase): ): self.switch_testpmd(symmetric=False) self.rssprocess.handle_rss_distribute_cases(cases_info=vector_case_64) - - #l2tpv2 control + data + + # l2tpv2 control + data def test_case_l2tpv2_session_id_MAC_IPV4_L2TPV2_CONTROL(self): self.switch_testpmd(symmetric=False) self.rssprocess.handle_rss_distribute_cases(cases_info=vector_case_65) diff --git a/tests/TestSuite_cvl_iavf_fdir_pppol2tpoudp.py b/tests/TestSuite_cvl_iavf_fdir_pppol2tpoudp.py index 85d455be..1d367aaf 100644 --- a/tests/TestSuite_cvl_iavf_fdir_pppol2tpoudp.py +++ b/tests/TestSuite_cvl_iavf_fdir_pppol2tpoudp.py @@ -30,18 +30,18 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import re import random +import re import time from multiprocessing import Manager, Process +import framework.utils as utils +import tests.rte_flow_common as rfc from framework.packet import Packet from framework.pmd_output import PmdOutput from framework.test_case import TestCase - -import framework.utils as utils -import tests.rte_flow_common as rfc from framework.utils import GREEN, RED + from .rte_flow_common import CVL_TXQ_RXQ_NUMBER tv_l2tpv2_seession_id_mac_ipv4_l2tpv2_control = { @@ -80,7 +80,7 @@ vectors_mac_ipv4_l2tpv2_control = [ tv_l2tpv2_seession_id_mac_ipv4_l2tpv2_control, tv_eth_l2_src_only_mac_ipv4_l2tpv2_control, ] - + tv_l2tpv2_seession_id_mac_ipv6_l2tpv2_control = { "name": "l2tpv2_seession_id_mac_ipv6_l2tpv2_control", "rule": "flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 type control session_id is 0x1111 / end actions queue index 3 / end", @@ -113,7 +113,10 @@ tv_eth_l2_src_only_mac_ipv6_l2tpv2_control = { "check_param": {"port_id": 0, "drop": 1}, } -vectors_mac_ipv6_l2tpv2_control = [tv_l2tpv2_seession_id_mac_ipv6_l2tpv2_control,tv_eth_l2_src_only_mac_ipv6_l2tpv2_control] +vectors_mac_ipv6_l2tpv2_control = [ + tv_l2tpv2_seession_id_mac_ipv6_l2tpv2_control, + tv_eth_l2_src_only_mac_ipv6_l2tpv2_control, +] tv_l2tpv2_seession_id_mac_ipv4_l2tpv2_data = { "name": "l2tpv2_seession_id_mac_ipv4_l2tpv2_data", @@ -1609,7 +1612,7 @@ tv_ipv4_tcp_mac_ipv6_pppol2tpv2_ipv4_tcp_data_o = { "match": [ 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,offset=6)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="10.0.0.22")/TCP(sport=11)', 'Ether(src="00:00:00:00:00:01")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,offset=6)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="10.0.0.22")/TCP(sport=11)', - ], + ], "mismatch": [ 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,offset=6)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="10.0.0.22")/TCP(sport=10)', 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x020,offset=6)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="10.0.0.20")/TCP(sport=11)', @@ -1744,7 +1747,7 @@ tv_ipv6_udp_mac_ipv6_pppol2tpv2_ipv6_udp_pay_data = { "match": [ 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=11)', 'Ether(src="00:00:00:00:00:01")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=11)', - ], + ], "mismatch": [ 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=10)', 'Ether(src="11:22:33:44:55:77")/IPv6()/UDP(dport=1701)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=11)', @@ -1829,7 +1832,7 @@ vectors_mac_ipv6_pppol2tpv2_ipv6_udp_pay = [ tv_ipv6_udp_mac_ipv6_pppol2tpv2_ipv6_udp_pay_data_o, tv_ipv6_udp_mac_ipv6_pppol2tpv2_ipv6_udp_pay_data_l_s, ] - + tv_ipv6_tcp_mac_ipv6_pppol2tpv2_ipv6_tcp_data = { "name": "ipv6_tcp_mac_ipv6_pppol2tpv2_ipv6_tcp_data", "rule": "flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 type data / ppp / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 11 / end actions queue index 3 / end", @@ -1923,8 +1926,8 @@ vectors_mac_ipv6_pppol2tpv2_ipv6_tcp = [ tv_ipv6_tcp_mac_ipv6_pppol2tpv2_ipv6_tcp_data_l_s, ] -class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): +class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): def rte_flow_process(self, vectors): test_results = {} for tv in vectors: @@ -1941,15 +1944,15 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): # send and check match packets out1 = self.send_pkts_getouput(pkts=tv["scapy_str"]["match"]) rfc.check_iavf_fdir_mark( - out1, - pkt_num=len(tv["scapy_str"]["match"]), + out1, + pkt_num=len(tv["scapy_str"]["match"]), check_param=tv["check_param"], ) # send and check mismatch packets out2 = self.send_pkts_getouput(pkts=tv["scapy_str"]["mismatch"]) rfc.check_iavf_fdir_mark( - out2, - pkt_num=len(tv["scapy_str"]["mismatch"]), + out2, + pkt_num=len(tv["scapy_str"]["mismatch"]), check_param=tv["check_param"], stats=False, ) @@ -1960,7 +1963,7 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): out3 = self.send_pkts_getouput(pkts=tv["scapy_str"]["match"]) rfc.check_iavf_fdir_mark( out3, - pkt_num=len(tv["scapy_str"]["match"]), + pkt_num=len(tv["scapy_str"]["match"]), check_param=tv["check_param"], stats=False, ) @@ -1992,17 +1995,19 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) self.tester_port0 = self.tester.get_local_port(self.dut_ports[0]) self.tester_iface0 = self.tester.get_interface(self.tester_port0) - self.pci0 = self.dut.ports_info[self.dut_ports[0]]['pci'] - self.pf0_intf = self.dut.ports_info[self.dut_ports[0]]['intf'] + self.pci0 = self.dut.ports_info[self.dut_ports[0]]["pci"] + self.pf0_intf = self.dut.ports_info[self.dut_ports[0]]["intf"] - self.vf_driver = self.get_suite_cfg()['vf_driver'] + self.vf_driver = self.get_suite_cfg()["vf_driver"] if self.vf_driver is None: - self.vf_driver = 'vfio-pci' + self.vf_driver = "vfio-pci" self.used_dut_port_0 = self.dut_ports[0] - self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 1, driver=self.kdriver) - self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] + self.dut.generate_sriov_vfs_by_port( + self.used_dut_port_0, 1, driver=self.kdriver + ) + self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port_0]["vfs_port"] self.dut.send_expect( - 'ip link set %s vf 0 mac 00:11:22:33:44:55' % self.pf0_intf, '#' + "ip link set %s vf 0 mac 00:11:22:33:44:55" % self.pf0_intf, "#" ) self.vf0_pci = self.sriov_vfs_port[0].pci for port in self.sriov_vfs_port: @@ -2029,14 +2034,14 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): ) self.pmd_output.execute_cmd("set fwd rxonly") self.pmd_output.execute_cmd("set verbose 1") - res = self.pmd_output.wait_link_status_up('all', timeout=15) - self.verify(res is True, 'there have port link is down') - + res = self.pmd_output.wait_link_status_up("all", timeout=15) + self.verify(res is True, "there have port link is down") + def send_packets(self, packets, pf_id=0, count=1): self.pkt.update_pkt(packets) tx_port = self.tester_iface0 self.pkt.send_pkt(crb=self.tester, tx_port=tx_port, count=count) - + def send_pkts_getouput(self, pkts, pf_id=0, count=1): """ if pkt_info is True, we need to get packet infomation to check the RSS hash and FDIR. @@ -2075,13 +2080,15 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): raise Exception("unsupported rule type, only accept list or str") if check_stats: self.verify( - all(rule_list), "some rules validate failed, result %s" % rule_list, + all(rule_list), + "some rules validate failed, result %s" % rule_list, ) elif check_stats == False: self.verify( - not any(rule_list), "all rules should validate failed, result %s" % rule_list, + not any(rule_list), + "all rules should validate failed, result %s" % rule_list, ) - + def create_fdir_rule(self, rule, check_stats=None): p = re.compile(r"Flow rule #(\d+) created") rule_list = [] @@ -2104,14 +2111,16 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): raise Exception("unsupported rule type, only accept list or str") if check_stats: self.verify( - all(rule_list), "some rules create failed, result %s" % rule_list, + all(rule_list), + "some rules create failed, result %s" % rule_list, ) elif check_stats == False: self.verify( - not any(rule_list), "all rules should create failed, result %s" % rule_list, + not any(rule_list), + "all rules should create failed, result %s" % rule_list, ) - return rule_list - + return rule_list + def destroy_fdir_rule(self, rule_id, port_id=0): if isinstance(rule_id, list): for i in rule_id: @@ -2141,12 +2150,12 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): result = [i.group(1) for i in res] self.verify( sorted(result) == sorted(rule_list), - "check rule list failed. expect %s, result %s" + "check rule list failed. expect %s, result %s" % (rule_list, result), ) else: self.verify(not p.search(out), "flow rule on port %s is existed" % port_id) - + def destroy_vf(self): self.dut.send_expect("quit", "# ", 60) time.sleep(2) @@ -2154,10 +2163,10 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): def test_mac_ipv4_l2tpv2_control(self): self.rte_flow_process(vectors_mac_ipv4_l2tpv2_control) - + def test_mac_ipv6_l2tpv2_control(self): self.rte_flow_process(vectors_mac_ipv6_l2tpv2_control) - + def test_mac_ipv4_l2tpv2(self): self.rte_flow_process(vectors_mac_ipv4_l2tpv2) @@ -2172,16 +2181,16 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): def test_mac_ipv4_pppol2tpv2_ipv4_pay(self): self.rte_flow_process(vectors_mac_ipv4_pppol2tpv2_ipv4_pay) - + def test_mac_ipv4_pppol2tpv2_ipv4_udp_pay(self): self.rte_flow_process(vectors_mac_ipv4_pppol2tpv2_ipv4_udp_pay) - + def test_mac_ipv4_pppol2tpv2_ipv4_tcp(self): self.rte_flow_process(vectors_mac_ipv4_pppol2tpv2_ipv4_tcp) def test_mac_ipv4_pppol2tpv2_ipv6_pay(self): self.rte_flow_process(vectors_mac_ipv4_pppol2tpv2_ipv6_pay) - + def test_mac_ipv4_pppol2tpv2_ipv6_udp_pay(self): self.rte_flow_process(vectors_mac_ipv4_pppol2tpv2_ipv6_udp_pay) @@ -2215,4 +2224,3 @@ class TestCVLIAVFFDIRPPPoL2TPv2oUDP(TestCase): def tear_down_all(self): self.destroy_vf() self.dut.kill_all() - diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py index 7b1b4f81..b7d08d12 100644 --- a/tests/TestSuite_ddp_gtp.py +++ b/tests/TestSuite_ddp_gtp.py @@ -35,8 +35,8 @@ import time import framework.utils as utils from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm VM_CORES_MASK = "all" diff --git a/tests/TestSuite_ddp_mpls.py b/tests/TestSuite_ddp_mpls.py index 0ab4cb6c..867bf2bf 100644 --- a/tests/TestSuite_ddp_mpls.py +++ b/tests/TestSuite_ddp_mpls.py @@ -33,8 +33,8 @@ import random import time from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm VM_CORES_MASK = "all" PF_MAX_QUEUE = 64 diff --git a/tests/TestSuite_eeprom_dump.py b/tests/TestSuite_eeprom_dump.py index dc665219..c1a5b4ea 100644 --- a/tests/TestSuite_eeprom_dump.py +++ b/tests/TestSuite_eeprom_dump.py @@ -74,14 +74,14 @@ class TestEEPROMDump(TestCase): # if nic is columbiaville, eeprom_dump get testpmd output of the first 1000 lines, # module_eeprom_dump get testpmd output of the first 16 lines. if self.nic in ["columbiaville_25g", "columbiaville_100g"]: - if testname == "eeprom": + if testname == "eeprom": count = 1000 elif testname == "module_eeprom": count = 16 - n=0 + n = 0 # Get testpmd output to have only hex value for line in re.findall(regex, get): - n= n+1 + n = n + 1 if n <= count: line = line.replace(" ", "").lower() self.dut.send_expect(f"echo {line} >> {to}", "#") @@ -98,7 +98,9 @@ class TestEEPROMDump(TestCase): for port in self.ports: # show port {port} eeprom has 10485760 bytes, and it takes about 13 minutes to show finish. - pmdout = self.dut.send_expect(f"show port {port} {testname}", "testpmd>", timeout=800) + pmdout = self.dut.send_expect( + f"show port {port} {testname}", "testpmd>", timeout=800 + ) self.verify("Finish --" in pmdout, f"{testname} dump failed") # get length from testpmd outout diff --git a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py index 2fa2974f..c51dbfe8 100644 --- a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py +++ b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py @@ -36,11 +36,11 @@ Test Niantic ixgbe_get_vf_queue Include Extra Information function. import time from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm # Use scapy to send packets with different source and dest ip. # and collect the hash result of five tuple and the queue id. from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm class TestIxgbeVfGetExtraInfo(TestCase): diff --git a/tests/TestSuite_power_bidirection_channel.py b/tests/TestSuite_power_bidirection_channel.py index b8a5e028..f75d3abc 100644 --- a/tests/TestSuite_power_bidirection_channel.py +++ b/tests/TestSuite_power_bidirection_channel.py @@ -38,9 +38,9 @@ import time import traceback from framework.exception import VerifyFailure -from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask +from tests.util.virt.qemu_libvirt import LibvirtKvm class TestPowerBidirectionChannel(TestCase): diff --git a/tests/TestSuite_power_negative.py b/tests/TestSuite_power_negative.py index 2d98d8a6..c14f0b58 100644 --- a/tests/TestSuite_power_negative.py +++ b/tests/TestSuite_power_negative.py @@ -37,8 +37,8 @@ power negative test suite. import os import time -from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase +from tests.util.virt.qemu_libvirt import LibvirtKvm class TestPowerNegative(TestCase): diff --git a/tests/TestSuite_rte_flow.py b/tests/TestSuite_rte_flow.py index 237a2559..566759e1 100644 --- a/tests/TestSuite_rte_flow.py +++ b/tests/TestSuite_rte_flow.py @@ -36,9 +36,9 @@ MTU Checks example. """ from typing import Callable -from tests.util.flow import generator from framework.pmd_output import PmdOutput from framework.test_case import TestCase +from tests.util.flow import generator class RteFlow(TestCase): diff --git a/tests/TestSuite_runtime_vf_queue_number.py b/tests/TestSuite_runtime_vf_queue_number.py index 99af8710..5d882e41 100644 --- a/tests/TestSuite_runtime_vf_queue_number.py +++ b/tests/TestSuite_runtime_vf_queue_number.py @@ -39,8 +39,8 @@ import time from framework.packet import Packet from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm RSS_KEY = "6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E" PACKET_COUNT = 100 diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py index 9248447a..56361665 100644 --- a/tests/TestSuite_shutdown_api.py +++ b/tests/TestSuite_shutdown_api.py @@ -43,9 +43,9 @@ from random import randint import framework.utils as utils from framework.exception import VerifyFailure from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.settings import DRIVERS, HEADER_SIZE from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm # # diff --git a/tests/TestSuite_unit_tests_cmdline.py b/tests/TestSuite_unit_tests_cmdline.py index a1ff4d3d..20bde65e 100644 --- a/tests/TestSuite_unit_tests_cmdline.py +++ b/tests/TestSuite_unit_tests_cmdline.py @@ -59,7 +59,9 @@ class TestUnitTestsCmdline(TestCase): """ # icc compilation cost long long time. self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_crc.py b/tests/TestSuite_unit_tests_crc.py index b3ba6af2..84ec1dff 100644 --- a/tests/TestSuite_unit_tests_crc.py +++ b/tests/TestSuite_unit_tests_crc.py @@ -57,7 +57,9 @@ class TestUnitTestsCrc(TestCase): Run at the start of each test suite. """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_cryptodev_func.py b/tests/TestSuite_unit_tests_cryptodev_func.py index 7290c9ef..bd289fdb 100644 --- a/tests/TestSuite_unit_tests_cryptodev_func.py +++ b/tests/TestSuite_unit_tests_cryptodev_func.py @@ -40,7 +40,9 @@ class UnitTestsCryptodev(TestCase): def set_up_all(self): self._app_path = self.dut.apps_name["test"] cc.bind_qat_device(self, "vfio-pci") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): pass diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py index bebb92de..5e288be3 100644 --- a/tests/TestSuite_unit_tests_dump.py +++ b/tests/TestSuite_unit_tests_dump.py @@ -66,7 +66,9 @@ class TestUnitTestsDump(TestCase): self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") self.start_test_time = 60 self.run_cmd_time = 60 - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_eal.py b/tests/TestSuite_unit_tests_eal.py index 9c775535..52938b5e 100644 --- a/tests/TestSuite_unit_tests_eal.py +++ b/tests/TestSuite_unit_tests_eal.py @@ -65,7 +65,9 @@ class TestUnitTestsEal(TestCase): eal_params = self.dut.create_eal_parameters(cores=default_cores) app_name = self.dut.apps_name["test"] self.test_app_cmdline = app_name + eal_params - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_event_timer.py b/tests/TestSuite_unit_tests_event_timer.py index c1498082..d3e07191 100644 --- a/tests/TestSuite_unit_tests_event_timer.py +++ b/tests/TestSuite_unit_tests_event_timer.py @@ -66,7 +66,9 @@ class TestUnitTestEventTimer(TestCase): self.eventdev_timer_device_bus_id = "0000:0a:01.0" self.dut.bind_eventdev_port(port_to_bind=self.eventdev_timer_device_bus_id) - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_kni.py b/tests/TestSuite_unit_tests_kni.py index c076ac26..5c925546 100644 --- a/tests/TestSuite_unit_tests_kni.py +++ b/tests/TestSuite_unit_tests_kni.py @@ -64,7 +64,9 @@ class TestUnitTestsKni(TestCase): self.verify("Error" not in out, "Error loading KNI module: " + out) - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) # # diff --git a/tests/TestSuite_unit_tests_loopback.py b/tests/TestSuite_unit_tests_loopback.py index 8ced8979..0fd935d1 100644 --- a/tests/TestSuite_unit_tests_loopback.py +++ b/tests/TestSuite_unit_tests_loopback.py @@ -82,7 +82,9 @@ class TestUnitTestsLoopback(TestCase): self.tmp_path = "/tmp/test_pmd_perf.c" self.dut.send_expect("rm -fr %s" % self.tmp_path, "# ") self.dut.send_expect("cp app/test/test_pmd_perf.c %s" % self.tmp_path, "# ") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_lpm.py b/tests/TestSuite_unit_tests_lpm.py index bc8b85ac..5e46dbe9 100644 --- a/tests/TestSuite_unit_tests_lpm.py +++ b/tests/TestSuite_unit_tests_lpm.py @@ -61,7 +61,9 @@ class TestUnitTestsLpmIpv6(TestCase): Qos Prerequisites """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_mbuf.py b/tests/TestSuite_unit_tests_mbuf.py index 938dafca..62a21c9e 100644 --- a/tests/TestSuite_unit_tests_mbuf.py +++ b/tests/TestSuite_unit_tests_mbuf.py @@ -58,7 +58,9 @@ class TestUnitTestsMbuf(TestCase): Run at the start of each test suite. """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_mempool.py b/tests/TestSuite_unit_tests_mempool.py index 90f381a8..cd68f29c 100644 --- a/tests/TestSuite_unit_tests_mempool.py +++ b/tests/TestSuite_unit_tests_mempool.py @@ -58,7 +58,9 @@ class TestUnitTestsMempool(TestCase): Run at the start of each test suite. """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_pmd_perf.py b/tests/TestSuite_unit_tests_pmd_perf.py index 2cb57131..ee90f4dc 100644 --- a/tests/TestSuite_unit_tests_pmd_perf.py +++ b/tests/TestSuite_unit_tests_pmd_perf.py @@ -71,7 +71,9 @@ class TestUnitTestsPmdPerf(TestCase): self.anchors = ["rxtx", "rxonly", "txonly"] socket_id = self.dut.ports_info[0]["port"].socket self.cores = self.dut.get_core_list(config="1S/4C/1T", socket=socket_id) - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_power.py b/tests/TestSuite_unit_tests_power.py index ebe4b7c1..cce6e26a 100644 --- a/tests/TestSuite_unit_tests_power.py +++ b/tests/TestSuite_unit_tests_power.py @@ -59,7 +59,9 @@ class TestUnitTestsPower(TestCase): Power Prerequisites """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_qos.py b/tests/TestSuite_unit_tests_qos.py index 57e8b076..e8bb0743 100644 --- a/tests/TestSuite_unit_tests_qos.py +++ b/tests/TestSuite_unit_tests_qos.py @@ -60,7 +60,9 @@ class TestUnitTestsQos(TestCase): QoS Prerequisites """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_ring.py b/tests/TestSuite_unit_tests_ring.py index 9f448081..6c633223 100644 --- a/tests/TestSuite_unit_tests_ring.py +++ b/tests/TestSuite_unit_tests_ring.py @@ -58,7 +58,9 @@ class TestUnitTestsRing(TestCase): Run at the start of each test suite. """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_ringpmd.py b/tests/TestSuite_unit_tests_ringpmd.py index 7247d826..4befbc40 100644 --- a/tests/TestSuite_unit_tests_ringpmd.py +++ b/tests/TestSuite_unit_tests_ringpmd.py @@ -59,7 +59,9 @@ class TestUnitTestsRingPmd(TestCase): Nothing to do here. """ self.cores = self.dut.get_core_list("all") - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_unit_tests_timer.py b/tests/TestSuite_unit_tests_timer.py index 3a8d12d2..9d19f8c9 100644 --- a/tests/TestSuite_unit_tests_timer.py +++ b/tests/TestSuite_unit_tests_timer.py @@ -65,7 +65,9 @@ class TestUnitTestsTimer(TestCase): self.this_timeout = 60 if len(self.cores) > 16: self.this_timeout = self.this_timeout * len(self.cores) / 16 - self.logger.warning(f"Test Suite {self.__name__} is deprecated and will be removed in the next release") + self.logger.warning( + f"Test Suite {self.__name__} is deprecated and will be removed in the next release" + ) def set_up(self): """ diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py index 1f119adf..6265a601 100644 --- a/tests/TestSuite_vf_daemon.py +++ b/tests/TestSuite_vf_daemon.py @@ -34,8 +34,8 @@ import time from framework.packet import Packet from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm VM_CORES_MASK = "all" MAX_VLAN = 4095 diff --git a/tests/TestSuite_vf_kernel.py b/tests/TestSuite_vf_kernel.py index 755f5741..5b3eaf89 100755 --- a/tests/TestSuite_vf_kernel.py +++ b/tests/TestSuite_vf_kernel.py @@ -44,9 +44,9 @@ import time import framework.utils as utils from framework.packet import Packet from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase from framework.utils import GREEN +from tests.util.virt.qemu_kvm import QEMUKvm class TestVfKernel(TestCase): diff --git a/tests/TestSuite_virtio_ipsec_cryptodev_func.py b/tests/TestSuite_virtio_ipsec_cryptodev_func.py index 00dc7558..9b5556cd 100644 --- a/tests/TestSuite_virtio_ipsec_cryptodev_func.py +++ b/tests/TestSuite_virtio_ipsec_cryptodev_func.py @@ -37,8 +37,8 @@ import binascii import framework.utils as utils import tests.cryptodev_common as cc from framework.packet import Packet -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm class VirtioCryptodevIpsecTest(TestCase): diff --git a/tests/TestSuite_virtio_perf_cryptodev_func.py b/tests/TestSuite_virtio_perf_cryptodev_func.py index d89cb024..27418037 100644 --- a/tests/TestSuite_virtio_perf_cryptodev_func.py +++ b/tests/TestSuite_virtio_perf_cryptodev_func.py @@ -34,8 +34,8 @@ Test DPDK vhost + virtio scenarios """ import tests.cryptodev_common as cc -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm class VirtioCryptodevPerfTest(TestCase): diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index 08cd03e3..28700354 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -35,8 +35,8 @@ Test DPDK vhost + virtio scenarios """ import tests.cryptodev_common as cc -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm class VirtioCryptodevUnitTest(TestCase): diff --git a/tests/TestSuite_vm_hotplug.py b/tests/TestSuite_vm_hotplug.py index b96d780c..5ff69cf0 100644 --- a/tests/TestSuite_vm_hotplug.py +++ b/tests/TestSuite_vm_hotplug.py @@ -41,8 +41,8 @@ import re import time from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.test_case import TestCase +from tests.util.virt.qemu_kvm import QEMUKvm VM_CORES_MASK = "all" diff --git a/tests/TestSuite_vm_power_manager.py b/tests/TestSuite_vm_power_manager.py index 2c6a37bc..bc4fb366 100644 --- a/tests/TestSuite_vm_power_manager.py +++ b/tests/TestSuite_vm_power_manager.py @@ -37,8 +37,8 @@ VM power manager test suite. import re import framework.utils as utils -from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase +from tests.util.virt.qemu_libvirt import LibvirtKvm class TestVmPowerManager(TestCase): diff --git a/tests/TestSuite_vm_pw_mgmt_policy.py b/tests/TestSuite_vm_pw_mgmt_policy.py index 0f43f289..1710f619 100644 --- a/tests/TestSuite_vm_pw_mgmt_policy.py +++ b/tests/TestSuite_vm_pw_mgmt_policy.py @@ -47,9 +47,9 @@ from framework.exception import VerifyFailure from framework.packet import Packet from framework.pktgen import TRANSMIT_CONT from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_libvirt import LibvirtKvm from framework.test_case import TestCase from framework.utils import create_mask as dts_create_mask +from tests.util.virt.qemu_libvirt import LibvirtKvm class TestVmPwMgmtPolicy(TestCase): diff --git a/tests/util/__init__.py b/tests/util/__init__.py index 93e83aee..4ad62931 100644 --- a/tests/util/__init__.py +++ b/tests/util/__init__.py @@ -1,2 +1,2 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2022 University of New Hampshire \ No newline at end of file +# Copyright(c) 2022 University of New Hampshire diff --git a/tests/util/flow/__init__.py b/tests/util/flow/__init__.py index 93e83aee..4ad62931 100644 --- a/tests/util/flow/__init__.py +++ b/tests/util/flow/__init__.py @@ -1,2 +1,2 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2022 University of New Hampshire \ No newline at end of file +# Copyright(c) 2022 University of New Hampshire diff --git a/tests/util/virt/__init__.py b/tests/util/virt/__init__.py index 93e83aee..4ad62931 100644 --- a/tests/util/virt/__init__.py +++ b/tests/util/virt/__init__.py @@ -1,2 +1,2 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2022 University of New Hampshire \ No newline at end of file +# Copyright(c) 2022 University of New Hampshire diff --git a/tests/util/virt/qemu_kvm.py b/tests/util/virt/qemu_kvm.py index c6db1bb7..57285b2a 100644 --- a/tests/util/virt/qemu_kvm.py +++ b/tests/util/virt/qemu_kvm.py @@ -37,7 +37,13 @@ import time from framework.exception import StartVMFailedException from framework.settings import get_host_ip from framework.utils import RED, parallel_lock -from tests.util.virt.virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase +from tests.util.virt.virt_base import ( + ST_NOTSTART, + ST_PAUSE, + ST_RUNNING, + ST_UNKNOWN, + VirtBase, +) # This name is directly defined in the qemu guest service # So you can not change it except it is changed by the service diff --git a/tests/util/virt/virt_base.py b/tests/util/virt/virt_base.py index 4cc64565..9617fe1f 100644 --- a/tests/util/virt/virt_base.py +++ b/tests/util/virt/virt_base.py @@ -36,11 +36,11 @@ from random import randint import framework.exception as exception import framework.utils as utils - from framework.config import VIRTCONF, VirtConf from framework.dut import Dut from framework.logger import getLogger from framework.settings import CONFIG_ROOT_PATH + from .virt_dut import VirtDut ST_NOTSTART = "NOTSTART" diff --git a/tests/util/virt/virt_common.py b/tests/util/virt/virt_common.py index a0057ded..7fbd5583 100644 --- a/tests/util/virt/virt_common.py +++ b/tests/util/virt/virt_common.py @@ -31,9 +31,9 @@ import os from framework.config import VirtConf +from framework.settings import CONFIG_ROOT_PATH from tests.util.virt.qemu_kvm import QEMUKvm from tests.util.virt.qemu_libvirt import LibvirtKvm -from framework.settings import CONFIG_ROOT_PATH def VM(dut, vm_name, suite_name): diff --git a/tests/util/virt/virt_dut.py b/tests/util/virt/virt_dut.py index 8bbec12c..85c30390 100644 --- a/tests/util/virt/virt_dut.py +++ b/tests/util/virt/virt_dut.py @@ -34,13 +34,12 @@ import re import time import framework.settings as settings -from nics.net_device import GetNicObj, RemoveNicObj - from framework.config import AppNameConf, PortConf from framework.dut import Dut from framework.project_dpdk import DPDKdut from framework.settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting from framework.utils import RED, parallel_lock +from nics.net_device import GetNicObj, RemoveNicObj class VirtDut(DPDKdut): diff --git a/tests/util/virt/virt_scene.py b/tests/util/virt/virt_scene.py index 7dc7d45e..29b6625a 100644 --- a/tests/util/virt/virt_scene.py +++ b/tests/util/virt/virt_scene.py @@ -30,13 +30,12 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import framework.utils as utils - from framework.config import VirtConf from framework.exception import * from framework.pmd_output import PmdOutput -from tests.util.virt.qemu_kvm import QEMUKvm from framework.settings import CONFIG_ROOT_PATH, get_netdev from framework.utils import create_mask +from tests.util.virt.qemu_kvm import QEMUKvm # scenario module for handling scenario # 1. load configurations