aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dmm/dmm_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dmm/dmm_scripts')
-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
5 files changed, 0 insertions, 176 deletions
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