aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2015-08-27 15:50:59 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-08-27 15:50:59 +0300
commit8b077af2c3338166b24839ff42c47ab72f9fd538 (patch)
tree036efab84b8cdf2f12ba578a0078a74c1899ea39 /platform/linux-generic
parent6d8b8abf3b3b4ab25f05612e495f25e6945cb617 (diff)
parentc500935d7a946da32a8c0bf80b05b277dac75b34 (diff)
Merge branch 'master' into api-next
Diffstat (limited to 'platform/linux-generic')
-rw-r--r--platform/linux-generic/Makefile.am3
-rwxr-xr-xplatform/linux-generic/test/pktio/pktio_run25
2 files changed, 19 insertions, 9 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 0763c30..f2c081a 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -1,3 +1,6 @@
+# Uncomment this if you need to change the CUSTOM_STR string
+#export CUSTOM_STR=https://git.linaro.org/lng/odp.git
+
include $(top_srcdir)/platform/Makefile.inc
AM_CFLAGS += -I$(srcdir)/include
diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run
index 76a8419..4860455 100755
--- a/platform/linux-generic/test/pktio/pktio_run
+++ b/platform/linux-generic/test/pktio/pktio_run
@@ -46,9 +46,8 @@ run_test()
{
local ret=0
- # the linux-generic implementation uses environment variables to
- # control which socket method is used, so try each combination to
- # ensure decent coverage.
+ # environment variables are used to control which socket method is
+ # used, so try each combination to ensure decent coverage.
for distype in MMAP MMSG; do
unset ODP_PKTIO_DISABLE_SOCKET_${distype}
done
@@ -67,26 +66,34 @@ run_test()
echo "!!! FAILED !!!"
fi
- exit $ret
+ return $ret
}
run()
{
- #need to be root to set the interface: if not, run with default loopback.
+ echo "pktio: using 'loop' device"
+ pktio_main${EXEEXT}
+ loop_ret=$?
+
+ # need to be root to run tests with real interfaces
if [ "$(id -u)" != "0" ]; then
- echo "pktio: using 'loop' device"
- pktio_main${EXEEXT}
- exit $?
+ exit $ret
fi
if [ "$ODP_PKTIO_IF0" = "" ]; then
- # no interfaces specified on linux-generic, use defaults
+ # no interfaces specified, use default veth interfaces
+ # setup by the pktio_env script
setup_pktio_env clean
export ODP_PKTIO_IF0=$IF0
export ODP_PKTIO_IF1=$IF1
fi
run_test
+ ret=$?
+
+ [ $ret = 0 ] && ret=$loop_ret
+
+ exit $ret
}
case "$1" in