+else
+ options="${options} -r"
+fi
+
+# select tests to run
+if [[ -z "${LINUX_TEST_RUN}" ]]; then
+ LINUX_TEST_RUN="${LINUX_TEST}"
+fi
+
+# perform selected tests
+if [[ ${run4} -eq 1 || ${run6} -eq 1 ]] ; then
+
+ for i in ${LINUX_TEST_RUN}; do
+
+ echo "starting ${desc} test ${i}"
+
+ st4=0
+ st4m=0
+ if [[ ${run4} -ne 0 ]]; then
+ /bin/bash ${DIR}/load_env.sh ${options} ipv4-ipv4 ${i}
+ st4=$?
+ echo "${desc} test IPv4 ${i} finished with status \
+${st4}"
+ if [[ ${mixed} -ne 0 ]] && [[ "${i}" == tun* ]]; then
+ /bin/bash ${DIR}/load_env.sh ${options} \
+ ipv4-ipv6 ${i}
+ st4m=$?
+ echo "${desc} test IPv4-IPv6 ${i} finished with\
+ status ${st4m}"
+ fi
+ fi
+
+ st6=0
+ st6m=0
+ if [[ ${run6} -ne 0 ]]; then
+ /bin/bash ${DIR}/load_env.sh ${options} ipv6-ipv6 ${i}
+ st6=$?
+ echo "${desc} test IPv6 ${i} finished with status \
+${st6}"
+ if [[ ${mixed} -ne 0 ]] && [[ "${i}" == tun* ]]; then
+ /bin/bash ${DIR}/load_env.sh ${options} \
+ ipv6-ipv4 ${i}
+ st6m=$?
+ echo "${desc} test IPv6-IPv4 ${i} finished with\
+ status ${st6m}"
+ fi
+ fi
+
+ let "st = st4 + st6 + st4m + st6m"
+ if [[ $st -ne 0 ]]; then
+ echo "ERROR ${desc} test ${i} FAILED"
+ exit $st
+ fi
+ done
+fi
+
+echo "All tests have ended successfully"