aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/test
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/test')
-rw-r--r--platform/linux-generic/test/Makefile.am34
-rw-r--r--platform/linux-generic/test/example/Makefile.am2
-rw-r--r--platform/linux-generic/test/example/ipsec_api/Makefile.am23
-rw-r--r--platform/linux-generic/test/example/ipsec_api/pktio_env66
-rw-r--r--platform/linux-generic/test/example/ipsec_crypto/Makefile.am23
-rw-r--r--platform/linux-generic/test/example/ipsec_crypto/pktio_env72
-rw-r--r--platform/linux-generic/test/inline-timer.conf2
-rwxr-xr-xplatform/linux-generic/test/ipsec/ipsec_api_example.sh32
-rwxr-xr-xplatform/linux-generic/test/ipsec/ipsec_crypto_example.sh32
-rw-r--r--platform/linux-generic/test/packet_align.conf2
-rw-r--r--platform/linux-generic/test/process-mode.conf2
-rw-r--r--platform/linux-generic/test/sched-basic.conf2
12 files changed, 190 insertions, 102 deletions
diff --git a/platform/linux-generic/test/Makefile.am b/platform/linux-generic/test/Makefile.am
index 1f7ae611e..049ce2187 100644
--- a/platform/linux-generic/test/Makefile.am
+++ b/platform/linux-generic/test/Makefile.am
@@ -8,25 +8,13 @@ TESTS_ENVIRONMENT += WITH_OPENSSL=0
endif
SUBDIRS =
-
-if WITH_EXAMPLES
-TESTS = ipsec/ipsec_api_example.sh \
- ipsec/ipsec_crypto_example.sh
-
-dist_check_SCRIPTS = ipsec/ipsec_api_example.sh \
- ipsec/ipsec_crypto_example.sh
-else
TESTS =
-dist_check_SCRIPTS =
-endif
if test_vald
TESTS += validation/api/pktio/pktio_run.sh \
validation/api/pktio/pktio_run_tap.sh \
validation/api/shmem/shmem_linux$(EXEEXT)
-test_SCRIPTS = $(dist_check_SCRIPTS)
-
SUBDIRS += validation/api/pktio\
validation/api/shmem\
pktio_ipc \
@@ -69,25 +57,3 @@ if test_installdir
installcheck-local:
$(DESTDIR)/$(testdir)/run-test.sh $(TESTNAME)
endif
-
-# If building out-of-tree, make check will not copy the scripts and data to the
-# $(builddir) assuming that all commands are run locally. However this prevents
-# running tests on a remote target using LOG_COMPILER.
-# So copy all script and data files explicitly here.
-all-local:
- if [ "x$(srcdir)" != "x$(builddir)" ]; then \
- for f in $(dist_check_SCRIPTS); do \
- if [ -e $(srcdir)/$$f ]; then \
- mkdir -p $(builddir)/$$(dirname $$f); \
- cp -f $(srcdir)/$$f $(builddir)/$$f; \
- fi \
- done \
- fi
-clean-local:
- if [ "x$(srcdir)" != "x$(builddir)" ]; then \
- for f in $(dist_check_SCRIPTS); do \
- rm -f $(builddir)/$$f; \
- done \
- fi
-
-.NOTPARALLEL:
diff --git a/platform/linux-generic/test/example/Makefile.am b/platform/linux-generic/test/example/Makefile.am
index 22b254cd7..947647cd4 100644
--- a/platform/linux-generic/test/example/Makefile.am
+++ b/platform/linux-generic/test/example/Makefile.am
@@ -1,6 +1,8 @@
SUBDIRS = \
classifier \
generator \
+ ipsec_api \
+ ipsec_crypto \
l2fwd_simple \
l3fwd \
packet \
diff --git a/platform/linux-generic/test/example/ipsec_api/Makefile.am b/platform/linux-generic/test/example/ipsec_api/Makefile.am
new file mode 100644
index 000000000..101c97cdf
--- /dev/null
+++ b/platform/linux-generic/test/example/ipsec_api/Makefile.am
@@ -0,0 +1,23 @@
+EXTRA_DIST = pktio_env
+
+# If building out-of-tree, make check will not copy the scripts and data to the
+# $(builddir) assuming that all commands are run locally. However this prevents
+# running tests on a remote target using LOG_COMPILER.
+# So copy all script and data files explicitly here.
+all-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ if [ -e $(srcdir)/$$f ]; then \
+ mkdir -p $(builddir)/$$(dirname $$f); \
+ cp -f $(srcdir)/$$f $(builddir)/$$f; \
+ fi \
+ done \
+ fi
+clean-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ rm -f $(builddir)/$$f; \
+ done \
+ fi
+
+.NOTPARALLEL:
diff --git a/platform/linux-generic/test/example/ipsec_api/pktio_env b/platform/linux-generic/test/example/ipsec_api/pktio_env
new file mode 100644
index 000000000..a16002326
--- /dev/null
+++ b/platform/linux-generic/test/example/ipsec_api/pktio_env
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+# Copyright (C) 2021, Marvell
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Script to setup interfaces used for running application on linux-generic.
+#
+# ipsec_api application uses two loop devices loop0 and loop1.
+#
+
+if [ "$0" == "$BASH_SOURCE" ]; then
+ echo "Error: Platform specific env file has to be sourced."
+ exit 1
+fi
+
+# Absolute path to the .env file.
+LINUX_ENV_PATH=$PWD/../../platform/linux-generic/test
+
+TESTENV="tests-linux-generic.env"
+
+if [ -f $LINUX_ENV_PATH/$TESTENV ]; then
+ source $LINUX_ENV_PATH/$TESTENV
+else
+ echo "BUG: unable to find $TESTENV!"
+ echo "$TESTENV has to be in following directory: "
+ echo " $LINUX_ENV_PATH"
+ exit 1
+fi
+
+# Skip IPsec example tests when there's no OpenSSL.
+if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then
+ echo "Crypto not supported. Skipping."
+ exit 77
+fi
+
+IF0=p7p1
+IF1=p8p1
+
+NEXT_HOP_MAC0=08:00:27:76:B5:E0
+NEXT_HOP_MAC1=08:00:27:F5:8B:DB
+
+LIF0=loop1
+LIF1=loop2
+
+IF_LIST=$LIF0,$LIF1
+ROUTE_IF_INB=$LIF0
+ROUTE_IF_OUTB=$LIF1
+OUT_IF=$LIF1
+IN_IF=$LIF0
+
+validate_result()
+{
+ return 0
+}
+
+setup_interfaces()
+{
+ return 0
+}
+
+cleanup_interfaces()
+{
+ return 0
+}
diff --git a/platform/linux-generic/test/example/ipsec_crypto/Makefile.am b/platform/linux-generic/test/example/ipsec_crypto/Makefile.am
new file mode 100644
index 000000000..101c97cdf
--- /dev/null
+++ b/platform/linux-generic/test/example/ipsec_crypto/Makefile.am
@@ -0,0 +1,23 @@
+EXTRA_DIST = pktio_env
+
+# If building out-of-tree, make check will not copy the scripts and data to the
+# $(builddir) assuming that all commands are run locally. However this prevents
+# running tests on a remote target using LOG_COMPILER.
+# So copy all script and data files explicitly here.
+all-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ if [ -e $(srcdir)/$$f ]; then \
+ mkdir -p $(builddir)/$$(dirname $$f); \
+ cp -f $(srcdir)/$$f $(builddir)/$$f; \
+ fi \
+ done \
+ fi
+clean-local:
+ if [ "x$(srcdir)" != "x$(builddir)" ]; then \
+ for f in $(EXTRA_DIST); do \
+ rm -f $(builddir)/$$f; \
+ done \
+ fi
+
+.NOTPARALLEL:
diff --git a/platform/linux-generic/test/example/ipsec_crypto/pktio_env b/platform/linux-generic/test/example/ipsec_crypto/pktio_env
new file mode 100644
index 000000000..99a1ac42b
--- /dev/null
+++ b/platform/linux-generic/test/example/ipsec_crypto/pktio_env
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# Copyright (C) 2021, Marvell
+# All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Script to setup interfaces used for running application on linux-generic.
+#
+# ipsec_api application uses two loop devices loop0 and loop1.
+#
+
+if [ "$0" == "$BASH_SOURCE" ]; then
+ echo "Error: Platform specific env file has to be sourced."
+ exit 1
+fi
+
+# Absolute path to the .env file.
+LINUX_ENV_PATH=$PWD/../../platform/linux-generic/test
+
+TESTENV="tests-linux-generic.env"
+
+if [ -f $LINUX_ENV_PATH/$TESTENV ]; then
+ source $LINUX_ENV_PATH/$TESTENV
+else
+ echo "BUG: unable to find $TESTENV!"
+ echo "$TESTENV has to be in following directory: "
+ echo " $LINUX_ENV_PATH"
+ exit 1
+fi
+
+# Skip IPsec example tests when there's no OpenSSL.
+if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then
+ echo "Crypto not supported. Skipping."
+ exit 77
+fi
+
+# Skip live and router mode tests.
+if [ ${IPSEC_APP_MODE} -eq 1 ] || [ ${IPSEC_APP_MODE} -eq 2 ]; then
+ echo "Live / Router mode test. Skipping."
+ exit 77
+fi
+
+IF0=p7p1
+IF1=p8p1
+
+NEXT_HOP_MAC0=08:00:27:76:B5:E0
+NEXT_HOP_MAC1=08:00:27:F5:8B:DB
+
+LIF0=loop1
+LIF1=loop2
+
+IF_LIST=$LIF0,$LIF1
+ROUTE_IF_INB=$LIF0
+ROUTE_IF_OUTB=$LIF1
+OUT_IF=$LIF1
+IN_IF=$LIF0
+
+validate_result()
+{
+ return 0
+}
+
+setup_interfaces()
+{
+ return 0
+}
+
+cleanup_interfaces()
+{
+ return 0
+}
diff --git a/platform/linux-generic/test/inline-timer.conf b/platform/linux-generic/test/inline-timer.conf
index e4d4af307..93195f5a8 100644
--- a/platform/linux-generic/test/inline-timer.conf
+++ b/platform/linux-generic/test/inline-timer.conf
@@ -1,6 +1,6 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.15"
+config_file_version = "0.1.16"
timer: {
# Enable inline timer implementation
diff --git a/platform/linux-generic/test/ipsec/ipsec_api_example.sh b/platform/linux-generic/test/ipsec/ipsec_api_example.sh
deleted file mode 100755
index 82fd193d9..000000000
--- a/platform/linux-generic/test/ipsec/ipsec_api_example.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2019, Nokia
-# All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
-# Skip IPsec example tests when there's no OpenSSL.
-if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then
-echo "Crypto not supported. Skipping."
-exit 77
-fi
-
-# Absolute path to the example binary. This is needed during distcheck, which
-# keeps scripts and binaries in different directories (scripts are not copied
-# into the distribution directory).
-export IPSEC_EXAMPLE_PATH=$(pwd)/../../../example/ipsec_api
-
-declare -i RESULT=0
-
-pushd $(dirname $0)/../../../../example/ipsec_api
-
-./odp_ipsec_api_run_simple.sh
-RESULT+=$?
-
-./odp_ipsec_api_run_esp_out.sh
-RESULT+=$?
-
-popd
-
-exit ${RESULT}
diff --git a/platform/linux-generic/test/ipsec/ipsec_crypto_example.sh b/platform/linux-generic/test/ipsec/ipsec_crypto_example.sh
deleted file mode 100755
index d99fc3bd2..000000000
--- a/platform/linux-generic/test/ipsec/ipsec_crypto_example.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2019, Nokia
-# All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
-# Skip IPsec example tests when there's no OpenSSL.
-if [ -n "$WITH_OPENSSL" ] && [ ${WITH_OPENSSL} -eq 0 ]; then
-echo "Crypto not supported. Skipping."
-exit 77
-fi
-
-# Absolute path to the example binary. This is needed during distcheck, which
-# keeps scripts and binaries in different directories (scripts are not copied
-# into the distribution directory).
-export IPSEC_EXAMPLE_PATH=$(pwd)/../../../example/ipsec_crypto
-
-declare -i RESULT=0
-
-pushd $(dirname $0)/../../../../example/ipsec_crypto
-
-./odp_ipsec_crypto_run_simple.sh
-RESULT+=$?
-
-./odp_ipsec_crypto_run_esp_out.sh
-RESULT+=$?
-
-popd
-
-exit ${RESULT}
diff --git a/platform/linux-generic/test/packet_align.conf b/platform/linux-generic/test/packet_align.conf
index 9b37752ba..58a73f2df 100644
--- a/platform/linux-generic/test/packet_align.conf
+++ b/platform/linux-generic/test/packet_align.conf
@@ -1,6 +1,6 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.15"
+config_file_version = "0.1.16"
pool: {
pkt: {
diff --git a/platform/linux-generic/test/process-mode.conf b/platform/linux-generic/test/process-mode.conf
index 5354cae2f..a6e6080d2 100644
--- a/platform/linux-generic/test/process-mode.conf
+++ b/platform/linux-generic/test/process-mode.conf
@@ -1,6 +1,6 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.15"
+config_file_version = "0.1.16"
# Shared memory options
shm: {
diff --git a/platform/linux-generic/test/sched-basic.conf b/platform/linux-generic/test/sched-basic.conf
index 57a8a772c..79537b454 100644
--- a/platform/linux-generic/test/sched-basic.conf
+++ b/platform/linux-generic/test/sched-basic.conf
@@ -1,6 +1,6 @@
# Mandatory fields
odp_implementation = "linux-generic"
-config_file_version = "0.1.15"
+config_file_version = "0.1.16"
sched_basic: {
# Test scheduler with an odd spread value