aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_dma_perf_run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/performance/odp_dma_perf_run.sh')
-rwxr-xr-xtest/performance/odp_dma_perf_run.sh73
1 files changed, 73 insertions, 0 deletions
diff --git a/test/performance/odp_dma_perf_run.sh b/test/performance/odp_dma_perf_run.sh
new file mode 100755
index 000000000..fb7b2bb34
--- /dev/null
+++ b/test/performance/odp_dma_perf_run.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2022-2023 Nokia
+#
+
+TEST_DIR="${TEST_DIR:-$(dirname $0)}"
+BIN_NAME=odp_dma_perf
+SEGC=0
+SEGS=1024
+INFL=1
+TIME=0.1
+TESTS_RUN=0
+
+check_result()
+{
+ if [ $1 -eq 0 ]; then
+ TESTS_RUN=`expr $TESTS_RUN + 1`
+ elif [ $1 -eq 1 ]; then
+ echo "Test FAILED, exiting"
+ exit 1
+ else
+ echo "Test SKIPPED"
+ fi
+}
+
+echo "odp_dma_perf: synchronous DMA transfer 1"
+echo "===================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 0 -i $SEGC -o $SEGC -s $SEGS -S 0 -f $INFL -T $TIME -v
+
+check_result $?
+
+echo "odp_dma_perf: synchronous DMA transfer 2"
+echo "===================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 0 -i $SEGC -o $SEGC -s $SEGS -S 1 -f $INFL -T $TIME -v
+
+check_result $?
+
+echo "odp_dma_perf: asynchronous DMA transfer 1"
+echo "====================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 1 -i $SEGC -o $SEGC -s $SEGS -S 2 -m 0 -f $INFL -T $TIME -v
+
+check_result $?
+
+echo "odp_dma_perf: asynchronous DMA transfer 2"
+echo "====================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 1 -i $SEGC -o $SEGC -s $SEGS -S 3 -m 1 -f $INFL -T $TIME -v
+
+check_result $?
+
+echo "odp_dma_perf: SW transfer 1"
+echo "====================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 2 -i $SEGC -o $SEGC -s $SEGS -S 0 -f $INFL -T $TIME -v
+
+check_result $?
+
+echo "odp_dma_perf: SW transfer 2"
+echo "====================================="
+
+${TEST_DIR}/${BIN_NAME}${EXEEXT} -t 2 -i $SEGC -o $SEGC -s $SEGS -S 2 -f $INFL -T $TIME -v
+
+check_result $?
+
+if [ $TESTS_RUN -eq 0 ]; then
+ exit 77
+fi
+
+exit 0