summaryrefslogtreecommitdiff
path: root/automated/linux
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-01-19 19:21:22 +0800
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-01-19 12:18:12 +0000
commita4ae6ae38af27c1a19168d6b07afd0963c54f4f8 (patch)
treea8ac9e364184f62bd03a25c4fab968a83858031d /automated/linux
parentca8cb23bd0137dd8a6ad8dcf0ba0a9157fc78d2f (diff)
downloadtest-definitions-pipe-a4ae6ae38af27c1a19168d6b07afd0963c54f4f8.tar.gz
automated: linux: add rt signaltest
Change-Id: I47c8b55f9ae6f1ab21ba5f7c46532d8784be12ee Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/linux')
-rw-r--r--automated/linux/signaltest/bin/README6
-rwxr-xr-xautomated/linux/signaltest/bin/arm64/signaltestbin0 -> 595848 bytes
-rwxr-xr-xautomated/linux/signaltest/bin/armeabi/signaltestbin0 -> 421500 bytes
-rwxr-xr-xautomated/linux/signaltest/signaltest.sh44
-rw-r--r--automated/linux/signaltest/signaltest.yaml40
5 files changed, 90 insertions, 0 deletions
diff --git a/automated/linux/signaltest/bin/README b/automated/linux/signaltest/bin/README
new file mode 100644
index 0000000..cf96841
--- /dev/null
+++ b/automated/linux/signaltest/bin/README
@@ -0,0 +1,6 @@
+The binaries are provided under the terms of the GNU General Public License,
+Version 2. The source can be viewed here:
+
+https://git.kernel.org/cgit/utils/rt-tests/rt-tests.git/
+
+The binaries were built from branch: stable/v1.0
diff --git a/automated/linux/signaltest/bin/arm64/signaltest b/automated/linux/signaltest/bin/arm64/signaltest
new file mode 100755
index 0000000..8cc6617
--- /dev/null
+++ b/automated/linux/signaltest/bin/arm64/signaltest
Binary files differ
diff --git a/automated/linux/signaltest/bin/armeabi/signaltest b/automated/linux/signaltest/bin/armeabi/signaltest
new file mode 100755
index 0000000..1331ce0
--- /dev/null
+++ b/automated/linux/signaltest/bin/armeabi/signaltest
Binary files differ
diff --git a/automated/linux/signaltest/signaltest.sh b/automated/linux/signaltest/signaltest.sh
new file mode 100755
index 0000000..b3b8b1a
--- /dev/null
+++ b/automated/linux/signaltest/signaltest.sh
@@ -0,0 +1,44 @@
+#!/bin/sh -e
+# signaltest is a RT signal roundtrip test software.
+
+# shellcheck disable=SC1091
+. ../../lib/sh-test-lib
+
+OUTPUT="$(pwd)/output"
+LOGFILE="${OUTPUT}/signaltest.txt"
+RESULT_FILE="${OUTPUT}/result.txt"
+
+PRIORITY="99"
+THREADS="2"
+LOOPS="10000"
+
+usage() {
+ echo "Usage: $0 [-p priority] [-t threads] [-l loops]" 1>&2
+ exit 1
+}
+
+while getopts ":p:t:l:" opt; do
+ case "${opt}" in
+ p) PRIORITY="${OPTARG}" ;;
+ t) THREADS="${OPTARG}" ;;
+ l) LOOPS="${OPTARG}" ;;
+ *) usage ;;
+ esac
+done
+
+! check_root && error_msg "Please run this script as root."
+[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)"
+mkdir -p "${OUTPUT}"
+
+# Run signaltest.
+detect_abi
+# shellcheck disable=SC2154
+./bin/"${abi}"/signaltest -p "${PRIORITY}" -t "${THREADS}" -l "${LOOPS}" \
+ | tee "${LOGFILE}"
+
+# Parse test log.
+tail -n 1 "${LOGFILE}" \
+ | awk '{printf("min-latency pass %s us\n", $(NF-6))};
+ {printf("avg-latency pass %s us\n", $(NF-2))};
+ {printf("max-latency pass %s us\n", $NF)};' \
+ | tee -a "${RESULT_FILE}"
diff --git a/automated/linux/signaltest/signaltest.yaml b/automated/linux/signaltest/signaltest.yaml
new file mode 100644
index 0000000..9569a47
--- /dev/null
+++ b/automated/linux/signaltest/signaltest.yaml
@@ -0,0 +1,40 @@
+metadata:
+ name: signaltest
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "signaltest is a RT signal roundtrip test software."
+
+ maintainer:
+ - chase.qi@linaro.org
+ os:
+ - debian
+ - ubuntu
+ - fedora
+ - centos
+ - openembedded
+ scope:
+ - performance
+ - preempt-rt
+ environment:
+ - lava-test-shell
+ devices:
+ - hi6220-hikey
+ - apq8016-sbc
+ - mustang
+ - moonshot
+ - thunderX
+ - d03
+ - d05
+
+params:
+ # Priority of highest prio thread.
+ PRIORITY: "99"
+ # Number of threads.
+ THREADS: "2"
+ # Number of loops.
+ LOOPS: "100000"
+
+run:
+ steps:
+ - cd ./automated/linux/signaltest
+ - ./signaltest.sh -p "${PRIORITY}" -t "${THREADS}" -l "${LOOPS}"
+ - ../../utils/send-to-lava.sh ./output/result.txt