From b47b29bdbd8c10c8e5fcac6cc9abe72bea75df49 Mon Sep 17 00:00:00 2001 From: qun wan Date: Wed, 14 Jun 2017 20:44:42 -0400 Subject: Patches for the tldk functional test cases. Change-Id: I0a70339edaff4c0e023c586ff84c8085ae6bc9c0 Signed-off-by: qun wan --- TLDK-tests/tldk_scripts/install_tldk.sh | 25 +++++++++++++++---------- TLDK-tests/tldk_scripts/run_tldk.sh | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) (limited to 'TLDK-tests/tldk_scripts') diff --git a/TLDK-tests/tldk_scripts/install_tldk.sh b/TLDK-tests/tldk_scripts/install_tldk.sh index 8941cfce4b..0cc65f949e 100755 --- a/TLDK-tests/tldk_scripts/install_tldk.sh +++ b/TLDK-tests/tldk_scripts/install_tldk.sh @@ -1,20 +1,23 @@ #!/bin/bash -DPDK_VERSION=dpdk +set -x + +DPDK_VERSION=16.11.1 ROOTDIR=/tmp/TLDK-testing PWDDIR=$(pwd) DPDK_DIR=dpdk +DPDK_PACKAGE=${DPDK_DIR}"-"${DPDK_VERSION}.tar.xz # compile and install the DPDK cd ${ROOTDIR} -tar xvf dpdk-16.11.1.tar.xz -mv dpdk-stable-16.11.1 dpdk +sudo tar xvf ${DPDK_PACKAGE} +sudo mv dpdk-stable-${DPDK_VERSION} dpdk echo $PWD echo ${DPDK_PACKAGE} cd ./${DPDK_DIR} -sed -i 's/^CONFIG_RTE_LIBRTE_PMD_PCAP=n/CONFIG_RTE_LIBRTE_PMD_PCAP=y/g' ./config/common_base -make install T=x86_64-native-linuxapp-gcc +sudo sed -i 's/^CONFIG_RTE_LIBRTE_PMD_PCAP=n/CONFIG_RTE_LIBRTE_PMD_PCAP=y/g' ./config/common_base +sudo make install T=x86_64-native-linuxapp-gcc cd ${PWDDIR} # compile the TLDK @@ -24,11 +27,13 @@ cd ${ROOTDIR}/tldk make all cd ${PWDDIR} -sudo killall -9 udpfwd 2>/dev/null +sudo killall -9 l4fwd 2>/dev/null + +sleep 5 -pid=`pgrep udpfwd` +pid=`pgrep l4fwd` if [ "$pid" != "" ]; then - echo "terminate the udpfwd failed!" + echo "terminate the l4fwd failed!" exit 1 fi @@ -43,8 +48,8 @@ if [ ${SYS_HUGEPAGE} -lt 1024 ]; then MOUNT=$(mount | grep /mnt/huge) done - echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages - echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages + echo 1024 | sudo tee /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages + echo 1024 | sudo tee /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages sudo mkdir -p /mnt/huge sudo mount -t hugetlbfs nodev /mnt/huge/ diff --git a/TLDK-tests/tldk_scripts/run_tldk.sh b/TLDK-tests/tldk_scripts/run_tldk.sh index 747f5498a0..0f56f02dfc 100755 --- a/TLDK-tests/tldk_scripts/run_tldk.sh +++ b/TLDK-tests/tldk_scripts/run_tldk.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + ROOTDIR=/tmp/TLDK-testing PWDDIR=$(pwd) -- cgit 1.2.3-korg