aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharath <sharathkumarboyanapally@gmail.com>2018-10-09 15:16:18 +0530
committerVratko Polak <vrpolak@cisco.com>2018-10-24 18:21:26 +0000
commitda8fb7d7ab386fdefb728d71bfce9bb73624977c (patch)
tree52458408726e8f032ee373e727df7de2a9efebf5
parentf3e74e6b21a5d5568f4bd1357222e8a014d8397c (diff)
Migration of DMM-CSIT scripts to DMM repo
Change-Id: Ibaa7652b24385805b5cdd1540ed98b09e68c69bc Signed-off-by: sharath <sharathkumarboyanapally@gmail.com>
-rw-r--r--resources/libraries/python/DMM/DMMConstants.py5
-rw-r--r--resources/libraries/python/DMM/SetupDMMTest.py6
-rw-r--r--resources/libraries/python/DMM/SingleCliSer.py292
-rwxr-xr-xtests/dmm/dmm_scripts/install_prereq.sh28
-rwxr-xr-xtests/dmm/dmm_scripts/kill_given_proc.sh31
-rwxr-xr-xtests/dmm/dmm_scripts/run_dmm.sh36
-rwxr-xr-xtests/dmm/dmm_scripts/run_dmm_with_lwip.sh44
-rwxr-xr-xtests/dmm/dmm_scripts/setup_hugepage.sh37
-rw-r--r--tests/dmm/func/SingleCliSer-func.robot32
9 files changed, 186 insertions, 325 deletions
diff --git a/resources/libraries/python/DMM/DMMConstants.py b/resources/libraries/python/DMM/DMMConstants.py
index ec6f192bf3..265320a1d8 100644
--- a/resources/libraries/python/DMM/DMMConstants.py
+++ b/resources/libraries/python/DMM/DMMConstants.py
@@ -20,7 +20,10 @@ class DMMConstants(object):
REMOTE_FW_DIR = '/tmp/DMM-testing'
# Shell scripts location
- DMM_SCRIPTS = 'tests/dmm/dmm_scripts'
+ DMM_SCRIPTS = 'dmm/scripts/csit/'
+
+ # Run scripts location
+ DMM_RUN_SCRIPTS = 'dmm/scripts/csit/run'
# Libraries location
DMM_DEPLIBS = 'tests/dmm/dmm_deplibs'
diff --git a/resources/libraries/python/DMM/SetupDMMTest.py b/resources/libraries/python/DMM/SetupDMMTest.py
index 7bb596546c..993e11924e 100644
--- a/resources/libraries/python/DMM/SetupDMMTest.py
+++ b/resources/libraries/python/DMM/SetupDMMTest.py
@@ -95,7 +95,7 @@ def install_dmm_test(node):
"""
arch = Topology.get_node_arch(node)
- logger.console('Install the DMM on {0} ({1})'.format(node['host'], arch))
+ logger.console('Install DMM on {0} ({1})'.format(node['host'], arch))
ssh = SSH()
ssh.connect(node)
@@ -105,10 +105,10 @@ def install_dmm_test(node):
.format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS, arch), timeout=600)
if ret_code != 0:
- logger.error('Install the DMM error: {0}'.format(stderr))
+ logger.error('Install DMM error: {0}'.format(stderr))
raise RuntimeError('Install prereq failed')
else:
- logger.console('Install prereq on {0} success!'.format(node['host']))
+ logger.console('Install DMM on {0} success!'.format(node['host']))
def setup_node(args):
"""Run all set-up methods for a node.
diff --git a/resources/libraries/python/DMM/SingleCliSer.py b/resources/libraries/python/DMM/SingleCliSer.py
index e96843ac36..89ac10f923 100644
--- a/resources/libraries/python/DMM/SingleCliSer.py
+++ b/resources/libraries/python/DMM/SingleCliSer.py
@@ -13,158 +13,230 @@
"""
-This module exists to provide the vs_epoll ping test for DMM on topology nodes.
+This module exists to provide single client-server test for DMM
+on topology nodes.
"""
import time
+import os
+import glob
-from resources.libraries.python.ssh import exec_cmd_no_error
+from resources.libraries.python.ssh import exec_cmd, exec_cmd_no_error
from resources.libraries.python.DMM.DMMConstants import DMMConstants as con
from resources.libraries.python.topology import Topology
class SingleCliSer(object):
- """Test the DMM vs_epoll ping function."""
+ """Test DMM with single client-server topology."""
@staticmethod
- def exec_the_base_vs_epoll_test(dut1_node, dut2_node,
- dut1_if_name, dut2_if_name,
- dut1_if_ip, dut2_if_ip):
+ def set_dmm_interface_address(dut_node, ifname, ip_addr, ip4_prefix):
+ """
+ Flush ip, set ip, set interface up.
+
+ :param dut_node: Node to set the interface address on.
+ :param ifname: Interface name.
+ :param ip_addr: IP address to configure.
+ :param ip4_prefix: Prefix length.
+ :type dut_node: dict
+ :type ifname: str
+ :type ip_addr: str
+ :type ip4_prefix: int
+ """
+ cmd = 'sudo ip -4 addr flush dev {}'.format(ifname)
+ exec_cmd_no_error(dut_node, cmd)
+ cmd = 'sudo ip addr add {}/{} dev {}'\
+ .format(ip_addr, ip4_prefix, ifname)
+ exec_cmd_no_error(dut_node, cmd)
+ cmd = 'sudo ip link set {0} up'.format(ifname)
+ exec_cmd_no_error(dut_node, cmd)
+
+ @staticmethod
+ def setup_dmm_dut(dut1_node, dut2_node, dut1_if_name, dut2_if_name,
+ script_name, dut1_ip, dut2_ip, prefix_len):
"""
- Perform base vs_epoll test on DUT's.
+ Setup DMM on DUT nodes.
- :param dut1_node: Node to execute vs_epoll on.
- :param dut2_node: Node to execute vc_common on.
+ :param dut1_node: Node to setup DMM on.
+ :param dut2_node: Node to setup DMM on.
:param dut1_if_name: DUT1 to DUT2 interface name.
:param dut2_if_name: DUT2 to DUT1 interface name.
- :param dut1_if_ip: DUT1 to DUT2 interface ip.
- :param dut2_if_ip: DUT2 to DUT1 interface ip.
+ :param script_name: Name of the script to run.
+ :param dut1_ip: IP address to configure on DUT1.
+ :param dut2_ip: IP address to configure on DUT2.
+ :param prefix_len: Prefix length.
:type dut1_node: dict
:type dut2_node: dict
:type dut1_if_name: str
:type dut2_if_name: str
- :type dut1_if_ip: str
- :type dut2_if_ip: str
+ :type script_name: str
+ :type dut1_ip: str
+ :type dut2_ip: str
+ :type prefix_len: int
"""
- cmd = 'cd {0}/{1} && ./run_dmm.sh {2} {3} {4} {5} ' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS, 0, dut1_if_name,
- dut1_if_ip, dut2_if_ip)
-
- cmd += '2>&1 | tee log_run_dmm.txt &'
- exec_cmd_no_error(dut1_node, cmd)
- time.sleep(10)
+ SingleCliSer.set_dmm_interface_address(dut1_node, dut1_if_name,
+ dut1_ip, prefix_len)
+ SingleCliSer.set_dmm_interface_address(dut2_node, dut2_if_name,
+ dut2_ip, prefix_len)
+ cmd = 'cd {0}/{1} && ./{2} setup 0 {3} {4} {5}'\
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name,
+ dut1_if_name, dut1_ip, dut2_ip)
+ exec_cmd(dut1_node, cmd)
- cmd = 'cd {0}/{1} && ./run_dmm.sh {2} {3} {4} {5} ' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS, 1, dut2_if_name,
- dut1_if_ip, dut2_if_ip)
-
- cmd += '2>&1 | tee log_run_dmm.txt'
- exec_cmd_no_error(dut2_node, cmd)
+ cmd = 'cd {0}/{1} && ./{2} setup 1 {3} {4} {5}'\
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name,
+ dut2_if_name, dut1_ip, dut2_ip)
+ exec_cmd(dut2_node, cmd)
@staticmethod
- def get_the_test_result(dut_node):
+ def execute_test(dut1_node, dut2_node, dut1_if_name, dut2_if_name,
+ script_name, dut1_ip, dut2_ip):
"""
- After executing exec_the_base_vs_epoll_test, use this
- to get the test result.
+ Run the given test case.
- :param dut_node: Node to get the test result on.
- :type dut_node: dict
- :returns: Word count of "send 50000" in the log.
- :rtype: str
- """
- cmd = 'cat {0}/{1}/log_run_dmm.txt | grep "send 50000" | wc -l' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS)
- (stdout, _) = exec_cmd_no_error(dut_node, cmd)
- return stdout
-
- @staticmethod
- def echo_dmm_logs(dut_node):
- """
- Get the prerequisites installation log from DUT.
-
- :param dut_node: Node to get the installation log on.
- :type dut_node: dict
- """
- cmd = 'cat {0}/{1}/log_install_prereq.txt' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS)
- exec_cmd_no_error(dut_node, cmd)
-
- @staticmethod
- def exec_the_base_lwip_test(dut1_node, dut2_node,
- dut1_if_name, dut2_if_name,
- dut1_if_ip, dut2_if_ip):
- """Test DMM with LWIP.
-
- :param dut1_node: Node to execute vs_epoll on.
- :param dut2_node: Node to execute vc_common on.
+ :param dut1_node: Node to run an app with DMM on.
+ :param dut2_node: Node to run an app with DMM on.
:param dut1_if_name: DUT1 to DUT2 interface name.
:param dut2_if_name: DUT2 to DUT1 interface name.
- :param dut1_if_ip: DUT1 to DUT2 interface ip.
- :param dut2_if_ip: DUT2 to DUT1 interface ip.
+ :param script_name: Name of the script to run.
+ :param dut1_ip: DUT1 IP address.
+ :param dut2_ip: DUT2 IP address.
:type dut1_node: dict
:type dut2_node: dict
:type dut1_if_name: str
:type dut2_if_name: str
- :type dut1_if_ip: str
- :type dut2_if_ip: str
+ :type script_name: str
+ :type dut1_ip: str
+ :type dut2_ip: str
"""
- cmd = 'cd {0}/{1} && ./run_dmm_with_lwip.sh {2} {3} {4} {5} ' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS, 0, dut1_if_name,
- dut1_if_ip, dut2_if_ip)
-
- cmd += '2>&1 | tee log_run_dmm_with_lwip.txt &'
- exec_cmd_no_error(dut1_node, cmd)
+ cmd = 'cd {0}/{1} && ./{2} run 0 {3} {4} {5} ' \
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name,
+ dut1_if_name, dut1_ip, dut2_ip)
+ cmd += '2>&1 | tee log_{0}.txt &'.format(script_name)
+ exec_cmd(dut1_node, cmd)
time.sleep(10)
- cmd = 'cd {0}/{1} && ./run_dmm_with_lwip.sh {2} {3} {4} {5} ' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS, 1, dut2_if_name,
- dut1_if_ip, dut2_if_ip)
-
- cmd += '2>&1 | tee log_run_dmm_with_lwip.txt'
- exec_cmd_no_error(dut2_node, cmd)
+ cmd = 'cd {0}/{1} && ./{2} run 1 {3} {4} {5} ' \
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name,
+ dut2_if_name, dut1_ip, dut2_ip)
+ cmd += '2>&1 | tee log_{0}.txt'.format(script_name)
+ exec_cmd(dut2_node, cmd)
@staticmethod
- def get_lwip_test_result(dut_node):
+ def verify_test_result(dut1_node, dut2_node, script_name):
"""
- After executing exec_the_base_lwip_test, use this
- to get the test result.
+ Verify the test and return result.
- :param dut_node: Node to get the test result on.
- :type dut_node: dict
- :returns: Word count of "send 50" in the log.
+ :param dut1_node: Node to verify test result on.
+ :param dut2_node: Node to verify test result on.
+ :param script_name: Name of the script to run.
+ :type dut1_node: dict
+ :type dut2_node: dict
+ :type script_name: str
+ :returns: test result PASS/FAIL.
:rtype: str
"""
- cmd = 'cat {0}/{1}/log_run_dmm_with_lwip.txt | grep "send 50" | wc -l' \
- .format(con.REMOTE_FW_DIR, con.DMM_SCRIPTS)
+ cmd = 'cd {0}/{1} && ./{2} verify 0' \
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name)
+ (_, stdout_ser, _) = exec_cmd(dut1_node, cmd)
- (stdout, _) = exec_cmd_no_error(dut_node, cmd)
- return stdout
+ cmd = 'cd {0}/{1} && ./{2} verify 1' \
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name)
+ (_, stdout_cli, _) = exec_cmd(dut2_node, cmd)
+
+ if stdout_ser.find('DMM_CSIT_TEST_PASSED') != -1 \
+ and stdout_cli.find('DMM_CSIT_TEST_PASSED') != -1:
+ return "PASS"
+ else:
+ return "FAIL"
@staticmethod
- def echo_running_log(dut1_node, dut2_node):
+ def print_dmm_log(dut1_node, dut2_node, script_name):
"""
- Get the running log.
+ Print DMM logs.
- :param dut1_node: Node to get the running log on.
- :param dut2_node: Node to get the running log on.
+ :param dut1_node: Node to print DMM logs of.
+ :param dut2_node: Node to print DMM logs of.
+ :param script_name: Name of the script to run.
:type dut1_node: dict
:type dut2_node: dict
+ :type script_name: str
"""
- cmd = 'cat /var/log/nStack/running.log'
- exec_cmd_no_error(dut1_node, cmd)
- exec_cmd_no_error(dut2_node, cmd)
+ cmd = 'cd {0}/{1} && ./{2} log 0'\
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name)
+ exec_cmd(dut1_node, cmd)
+
+ cmd = 'cd {0}/{1} && ./{2} log 1'\
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name)
+ exec_cmd(dut2_node, cmd)
@staticmethod
- def echo_dpdk_log(dut1_node, dut2_node):
+ def cleanup_dmm_dut(dut1_node, dut2_node, script_name):
"""
- Get the dpdk log.
+ Cleanup DMM DUT node.
- :param dut1_node: Node to get the DPDK log on.
- :param dut2_node: Node to get the DPDK log on.
+ :param dut1_node: DMM node to be cleaned up.
+ :param dut2_node: DMM node to be cleaned up.
+ :param script_name: Name of the script to run.
:type dut1_node: dict
:type dut2_node: dict
+ :type script_name: str
"""
- cmd = 'cat /var/log/nstack-dpdk/nstack_dpdk.log'
- exec_cmd_no_error(dut1_node, cmd)
- exec_cmd_no_error(dut2_node, cmd)
+ cmd = 'cd {0}/{1} && ./{2} cleanup 0'\
+ .format(con.REMOTE_FW_DIR, con.DMM_RUN_SCRIPTS, script_name)
+ exec_cmd(dut1_node, cmd)
+ exec_cmd(dut2_node, cmd)
+ time.sleep(5)
+
+ @staticmethod
+ def run_dmm_func_test_cases(dut1_node, dut2_node, dut1_if_name,
+ dut2_if_name, dut1_ip, dut2_ip, prefix_len):
+ """
+ Execute all the functional test cases and return result.
+
+ :param dut1_node: Node to run an app with DMM on.
+ :param dut2_node: Node to run an app with DMM on.
+ :param dut1_if_name: DUT1 to DUT2 interface name.
+ :param dut2_if_name: DUT2 to DUT1 interface name.
+ :param dut1_ip: IP address to configure on DUT1.
+ :param dut2_ip: IP address to configure on DUT2.
+ :param prefix_len: Prefix length.
+ :type dut1_node: dict
+ :type dut2_node: dict
+ :type dut1_if_name: str
+ :type dut2_if_name: str
+ :type dut1_ip: str
+ :type dut2_ip: str
+ :type prefix_len: int
+ :returns: Total testcase count, Passed testcase count.
+ :rtype: tuple(int, int)
+ """
+ passed = 0
+ total = 0
+ failed = 0
+ path = '{0}/*'.format(con.DMM_RUN_SCRIPTS)
+ files = [os.path.basename(x) for x in glob.glob(path)]
+ print "list of files : {0}".format(files)
+
+ for name in files:
+ print("file name : {}").format(name)
+ total += 1
+ SingleCliSer.setup_dmm_dut(dut1_node, dut2_node, dut1_if_name,
+ dut2_if_name, name, dut1_ip, dut2_ip,
+ prefix_len)
+ SingleCliSer.execute_test(dut1_node, dut2_node, dut1_if_name,
+ dut2_if_name, name, dut1_ip, dut2_ip)
+ result = SingleCliSer.verify_test_result(dut1_node, dut2_node,
+ '{0}'.format(name))
+ if result == "PASS":
+ passed += 1
+ elif result == "FAIL":
+ failed += 1
+
+ SingleCliSer.print_dmm_log(dut1_node, dut2_node, name)
+ SingleCliSer.cleanup_dmm_dut(dut1_node, dut2_node, name)
+ print("TOTAL :{} PASSED : {} FAILED: {}").format\
+ (total, passed, failed)
+
+ return total, passed
@staticmethod
def dmm_get_interface_name(dut_node, dut_interface):
@@ -183,25 +255,3 @@ class SingleCliSer(object):
(stdout, _) = exec_cmd_no_error(dut_node, cmd)
interface_name = stdout.split(' ', 1)[0]
return interface_name
-
- @staticmethod
- def set_dmm_interface_address(dut_node, ifname, ip_addr, ip4_prefix):
- """
- Flush ip, set ip, set interface up.
-
- :param dut_node: Node to set the interface address on.
- :param ifname: Interface name.
- :param ip_addr: IP address to configure.
- :param ip4_prefix: Prefix length.
- :type dut_node: dict
- :type ifname: str
- :type ip_addr: str
- :type ip4_prefix: int
- """
- cmd = 'sudo ip -4 addr flush dev {}'.format(ifname)
- exec_cmd_no_error(dut_node, cmd)
- cmd = 'sudo ip addr add {}/{} dev {}'\
- .format(ip_addr, ip4_prefix, ifname)
- exec_cmd_no_error(dut_node, cmd)
- cmd = 'sudo ip link set {0} up'.format(ifname)
- exec_cmd_no_error(dut_node, cmd)
diff --git a/tests/dmm/dmm_scripts/install_prereq.sh b/tests/dmm/dmm_scripts/install_prereq.sh
deleted file mode 100755
index b03769ba6a..0000000000
--- a/tests/dmm/dmm_scripts/install_prereq.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-set -x
-SCRIPT_DIR=`dirname $(readlink -f $0)`
-ROOTDIR=$SCRIPT_DIR/../../../
-
-cd ${ROOTDIR}
-chmod +x *.deb
-sudo dpkg -i libnuma1_2.0.11-1ubuntu1.1_amd64.deb
-sudo dpkg -i libnuma-dev_2.0.11-1ubuntu1.1_amd64.deb
-sudo dpkg -i ethtool_4.5-1_amd64.deb
-sudo dpkg -i lsof_4.89+dfsg-0.1_amd64.deb
-
-DPDK_DOWNLOAD_PATH=$(cat $ROOTDIR/dmm/scripts/build_dpdk.sh | grep DPDK_DOWNLOAD_PATH= | cut -d "=" -f2)
-sudo rm /tmp/dpdk
-mkdir -p $DPDK_DOWNLOAD_PATH
-mv $ROOTDIR/dpdk-18.02.tar.xz $DPDK_DOWNLOAD_PATH
-# install DPDK
-cp -f $ROOTDIR/dmm/scripts/build_dpdk.sh $ROOTDIR/dmm/scripts/build_dpdk_csit.sh
-sed -i 's!wget.*!#comment wget!1' $ROOTDIR/dmm/scripts/build_dpdk_csit.sh
-bash -x $ROOTDIR/dmm/scripts/build_dpdk_csit.sh
-
-sudo modprobe uio
-sudo modprobe uio_pci_generic
-sudo insmod $DPDK_DOWNLOAD_PATH/dpdk-18.02/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
-
-bash $SCRIPT_DIR/kill_given_proc.sh vs_epoll
-bash $SCRIPT_DIR/setup_hugepage.sh
diff --git a/tests/dmm/dmm_scripts/kill_given_proc.sh b/tests/dmm/dmm_scripts/kill_given_proc.sh
deleted file mode 100755
index 772643a316..0000000000
--- a/tests/dmm/dmm_scripts/kill_given_proc.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-proc_name=$1
-sudo pgrep $proc_name
-if [ $? -eq "0" ]; then
- success=false
- sudo pkill $proc_name
- echo "RC = $?"
- for attempt in {1..5}; do
- echo "Checking if '$proc_name' is still alive, attempt nr ${attempt}"
- sudo pgrep $proc_name
- if [ $? -eq "1" ]; then
- echo "'$proc_name' is dead"
- success=true
- break
- fi
- echo "'$proc_name' is still alive, waiting 1 second"
- sleep 1
- done
- if [ "$success" = false ]; then
- echo "The command sudo pkill '$proc_name' failed"
- sudo pkill -9 $proc_name
- echo "RC = $?"
- exit 1
- fi
-else
- echo "'$proc_name' is not running"
-fi
-
-sleep 2
-exit 0 \ No newline at end of file
diff --git a/tests/dmm/dmm_scripts/run_dmm.sh b/tests/dmm/dmm_scripts/run_dmm.sh
deleted file mode 100755
index fd61fe842a..0000000000
--- a/tests/dmm/dmm_scripts/run_dmm.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-set -x
-
-CUR_DIR=`dirname $(readlink -f $0)`
-ROOTDIR=$CUR_DIR/../../../
-APP_DIR=${ROOTDIR}/dmm/config/app_test
-LIB_PATH=${ROOTDIR}/dmm/release/lib64
-DMM_SCRIPT_DIR=$ROOTDIR/dmm/scripts
-
-#proc_name => 0 = server, 1= client
-proc_name=$1
-ifname=$2
-dut1_if_ip=$3
-dut2_if_ip=$4
-
-ip addr
-lspci -nn
-lsmod | grep uio
-bash kill_given_proc.sh vs_epoll
-
-cp -f $DMM_SCRIPT_DIR/prep_app_test.sh $DMM_SCRIPT_DIR/prep_app_test_csit.sh
-sed -i 's!.*check_hugepage.sh!#skip hugepage check!1' $DMM_SCRIPT_DIR/prep_app_test_csit.sh
-sed -i 's!enp0s8!'$ifname'!1' $DMM_SCRIPT_DIR/prep_app_test_csit.sh
-bash -x $DMM_SCRIPT_DIR/prep_app_test_csit.sh
-
-cd $APP_DIR
-ls -l
-#only for kernal stack
-if [ ${proc_name} -eq 0 ]; then
-sudo LD_LIBRARY_PATH=${LIB_PATH} ./vs_epoll -p 20000 -d ${dut2_if_ip} -a 10000 -s ${dut1_if_ip} -l 200 -t 50000 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1
-else
-sudo LD_LIBRARY_PATH=${LIB_PATH} ./vc_common -p 20000 -d ${dut1_if_ip} -a 10000 -s ${dut2_if_ip} -l 200 -t 50000 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1
-fi
-
-exit 0 \ No newline at end of file
diff --git a/tests/dmm/dmm_scripts/run_dmm_with_lwip.sh b/tests/dmm/dmm_scripts/run_dmm_with_lwip.sh
deleted file mode 100755
index 38b4c20978..0000000000
--- a/tests/dmm/dmm_scripts/run_dmm_with_lwip.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/bash
-
-set -x
-CUR_DIR=`dirname $(readlink -f $0)`
-ROOTDIR=$CUR_DIR/../../../
-APP_DIR=${ROOTDIR}/dmm/stacks/lwip_stack/app_test/
-LIB_PATH=${APP_DIR}/../release/lib64/
-VAG_DIR=${ROOTDIR}/dmm/stacks/lwip_stack/vagrant
-#proc_name => 0 = server, 1= client
-proc_name=$1
-ifname=$2
-dut1_if_ip=$3
-dut2_if_ip=$4
-
-# Try to kill the vs_epoll
-bash $CUR_DIR/kill_given_proc.sh vs_epoll
-cat /proc/meminfo
-
-cp -f $VAG_DIR/start_nstackMain.sh $VAG_DIR/start_nstackMain_csit.sh
-sed -i 's!.*check_hugepage.sh!#skip hugepage check!1' $VAG_DIR/start_nstackMain_csit.sh
-sed -i 's!ifname=.*!ifname='$ifname'!1' $VAG_DIR/start_nstackMain_csit.sh
-sudo LD_LIBRARY_PATH=${LIB_PATH} bash $VAG_DIR/start_nstackMain_csit.sh || exit 1
-
-sleep 5
-
-#after nstackmain
-echo "after nstackmain"
-ip addr
-lspci -nn
-lsmod | grep uio
-cat /proc/meminfo | grep Huge
-/tmp/dpdk/dpdk-18.02/usertools/dpdk-devbind.py --status
-
-cd ${APP_DIR}
-
-if [ ${proc_name} -eq 0 ]; then
-sudo NSTACK_LOG_ON=DBG LD_LIBRARY_PATH=${LIB_PATH} ./vs_epoll -p 20000 -d ${dut2_if_ip} -a 10000 -s ${dut1_if_ip} -l 200 -t 50000 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1
-else
-sudo NSTACK_LOG_ON=DBG LD_LIBRARY_PATH=${LIB_PATH} ./vc_common -p 20000 -d ${dut1_if_ip} -a 10000 -s ${dut2_if_ip} -l 200 -t 50 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1
-fi
-
-cd $APP_DIR/../release/
-sudo ./stop_nstack.sh
-exit 0
diff --git a/tests/dmm/dmm_scripts/setup_hugepage.sh b/tests/dmm/dmm_scripts/setup_hugepage.sh
deleted file mode 100755
index be25709e01..0000000000
--- a/tests/dmm/dmm_scripts/setup_hugepage.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash -x
-
-# check and setup the hugepages
-SYS_HUGEPAGE=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
-hugepageFree=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages)
-
-if [ ${SYS_HUGEPAGE} -lt 1536 ] || [ $hugepageFree -eq 0 ]; then
- MOUNT=$(mount | grep /mnt/nstackhuge)
- count=$(mount | grep /mnt/nstackhuge | wc -l)
-
- while [ "${MOUNT}" != "" ] || [ "${count}" -ne 0 ]
- do
- sudo umount /mnt/nstackhuge
- sleep 1
- MOUNT=$(mount | grep /mnt/nstackhuge)
- count=$[$count -1]
- done
-
- sock_count=$(lscpu | grep 'Socket(s):' | head -1 | awk '{print $2}')
- ls -l /sys/devices/system/node/
-
- while [ "${sock_count}" -ne 0 ]
- do
- sock_count=$[$sock_count - 1]
- echo 1536 | sudo tee /sys/devices/system/node/node"$sock_count"/hugepages/hugepages-2048kB/nr_hugepages
- done
-
- sudo mkdir -p /mnt/nstackhuge
- sudo mount -t hugetlbfs -o pagesize=2M none /mnt/nstackhuge/
- test $? -eq 0 || exit 1
-else
- sudo mkdir -p /mnt/nstackhuge
- sudo mount -t hugetlbfs -o pagesize=2M none /mnt/nstackhuge/
-fi
-
-cat /proc/meminfo
-exit 0
diff --git a/tests/dmm/func/SingleCliSer-func.robot b/tests/dmm/func/SingleCliSer-func.robot
index 4cfa6a0259..939c2c42ad 100644
--- a/tests/dmm/func/SingleCliSer-func.robot
+++ b/tests/dmm/func/SingleCliSer-func.robot
@@ -28,35 +28,19 @@
| ... | here we test the 1. test the vs_epool and vc_epoll
*** Variables ***
-| ${ip4_net1_1}= | 172.28.128.3
-| ${ip4_net2_1}= | 172.28.128.4
-| ${ip4_prefix}= | 24
+| ${dut1_ip}= | 172.28.128.3
+| ${dut2_ip}= | 172.28.128.4
+| ${prefix_len}= | 24
*** Test Cases ***
-| TC01: DMM base vs epoll test case
+| TC01: DMM Single Client Server Test Case
| | Given DMM Basic Test Setup
-| | When Exec the base vs epoll test | ${dut1_node} | ${dut2_node}
-| | ... | ${dut1_to_dut2_if_name} | ${dut2_to_dut1_if_name}
-| | ... | ${ip4_net1_1} | ${ip4_net2_1}
-| | Echo DMM logs | ${dut2_node}
-| | ${no_packet_loss} = | Get the test result | ${dut2_node}
-| | Then Should Not Be Equal As Integers | ${no_packet_loss} | 0
-
-| TC02: DMM LWIP integration test case
-| | Given DMM Basic Test Setup
-| | When Exec the base lwip test | ${dut1_node} | ${dut2_node}
-| | ... | ${dut1_to_dut2_if_name} | ${dut2_to_dut1_if_name}
-| | ... | ${ip4_net1_1} | ${ip4_net2_1}
-| | Echo running log | ${dut1_node} | ${dut2_node}
-| | Echo dpdk log | ${dut1_node} | ${dut2_node}
-| | ${no_packet_loss_lwip} = | Get lwip test result | ${dut2_node}
-| | Then Should Not Be Equal As Integers | ${no_packet_loss_lwip} | 0
+| | ${total_count} | ${pass_count}= | When Run DMM Func Test Cases
+| | ... | ${dut1_node} | ${dut2_node} | ${dut1_to_dut2_if_name}
+| | ... | ${dut2_to_dut1_if_name} | ${dut1_ip} | ${dut2_ip} | ${prefix_len}
+| | Then Should Be Equal As Integers | ${total_count} | ${pass_count}
*** Keywords ***
| DMM Basic Test Setup
| | Path for 2-node testing is set | ${nodes['DUT1']} | ${nodes['DUT2']}
| | Pick out the port used to execute test
-| | Set DMM Interface Address | ${dut1_node} |
-| | ... | ${dut1_to_dut2_if_name} | ${ip4_net1_1} | ${ip4_prefix}
-| | Set DMM Interface Address | ${dut2_node}
-| | ... | ${dut2_to_dut1_if_name} | ${ip4_net2_1} | ${ip4_prefix}