# socket_test.sh -- script to run socket tests.
#
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-vpp_dir="$WS_ROOT/build-root/install-vpp-native/vpp/bin/"
-vpp_debug_dir="$WS_ROOT/build-root/install-vpp_debug-native/vpp/bin/"
+vpp_dir="$WS_ROOT/build-root/build-vpp-native/vpp/bin/"
+vpp_debug_dir="$WS_ROOT/build-root/build-vpp_debug-native/vpp/bin/"
vpp_shm_dir="/dev/shm/"
vpp_run_dir="/run/vpp"
lib_dir="$WS_ROOT/build-root/install-vpp-native/vpp/lib/"
lib_debug_dir="$WS_ROOT/build-root/install-vpp_debug-native/vpp/lib/"
-dpdk_devbind="/usr/share/dpdk/usertools/dpdk-devbind.py"
+dpdk_devbind="$WS_ROOT/extras/vpp_config/scripts/dpdk-devbind.py"
docker_vpp_dir="/vpp/"
docker_app_dir="/vpp/"
docker_lib_dir="/vpp-lib/"
docker_os="ubuntu"
-vcl_ldpreload_lib="libvcl_ldpreload.so.0.0.0"
+vcl_ldpreload_lib="libvcl_ldpreload.so"
user_gid="$(id -g)"
vpp_app="vpp"
sock_srvr_app="sock_test_server"
OPTIONS passed to client/server:
-6 Use IPv6.
-D Use UDP as the transport.
+ -L Use TLS as the transport.
-S <ip address> Server IP address.
-P <server port> Server Port number.
-E <data> Run Echo test.
declare -i bash_after_exit=0
declare -i iperf3=0
declare -i use_ipv6=0
-declare -i transport_udp=0
-while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXD" opt; do
+while getopts ":hitlbcd6fn:m:e:g:p:E:I:N:P:R:S:T:UBVXDL" opt; do
case $opt in
h) usage ;;
l) leave_tmp_files=1
;;
P) sock_srvr_port="$OPTARG"
;;
- D) sock_clnt_options="$sock_clnt_options -$opt"
+ D|L) sock_clnt_options="$sock_clnt_options -$opt"
sock_srvr_options="$sock_srvr_options -$opt"
;;
E|I|N|R|T) sock_clnt_options="$sock_clnt_options -$opt \"$OPTARG\""
"np" | "native-preload")
run_test="native_preload" ;;
"nv" | "native-vcl")
- sock_srvr_app="bin/vcl_test_server"
- sock_clnt_app="bin/vcl_test_client"
+ sock_srvr_app="vcl_test_server"
+ sock_clnt_app="vcl_test_client"
run_test="native_vcl" ;;
"dk" | "docker-kernel")
run_test="docker_kernel" ;;
"dp" | "docker-preload")
run_test="docker_preload" ;;
"dv" | "docker-vcl")
- sock_srvr_app="bin/vcl_test_server"
- sock_clnt_app="bin/vcl_test_client"
+ sock_srvr_app="vcl_test_server"
+ sock_clnt_app="vcl_test_client"
run_test="docker_vcl" ;;
*)
echo "ERROR: Unknown option '$1'!" >&2
exit 1
fi
-if [[ "$(grep bin_PROGRAMS $WS_ROOT/src/vcl.am)" = "" ]] ; then
- $WS_ROOT/extras/vagrant/vcl_test.sh $WS_ROOT $USER
- (cd $WS_ROOT; make build)
+if [ ! -d $vpp_dir ] ; then
+ if [ -z "$title_dbg" ] ; then
+ (cd $WS_ROOT; make build-release)
+ else
+ (cd $WS_ROOT; make build)
+ fi
fi
if [ ! -d $vpp_dir ] ; then
fi
if [ ! -f $vpp_dir$sock_srvr_app ] && [ ! $iperf3 -eq 1 ] ; then
- echo "ERROR: Missing$title_dbg Socket Server Application!" >&2
+ echo "ERROR: Missing SERVER$title_dbg Socket Server Application!" >&2
echo " $vpp_dir$sock_srvr_app" >&2
env_test_failed="true"
fi
if [ ! -f $vpp_dir$sock_clnt_app ] && [ ! $iperf3 -eq 1 ] ; then
- echo "ERROR: Missing$title_dbg Socket Client Application!" >&2
+ echo "ERROR: Missing CLIENT$title_dbg Socket Client Application!" >&2
echo " $vpp_dir$sock_clnt_app" >&2
env_test_failed="true"
fi
if [ -n "$multi_host"] && [ ! -f "$dpdk_devbind" ] ; then
echo "ERROR: Can't find dpdk-devbind.py!"
- echo " Run \"cd \$WS_ROOT; make dpdk-install-dev\" to install it."
+ echo " Run \"cd \$WS_ROOT; make install-ext-deps\" to install it."
echo
env_test_failed="true"
fi
fi
cat <<EOF >> $tmp_vpp_exec_file
+create tap id 0
+set int ip addr tap0 172.17.0.2/24
show version
show version verbose
show cpu