diff options
author | Ravineet Singh <ravineet.singh@linaro.org> | 2016-12-02 15:49:08 +0100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-01-13 16:10:00 +0000 |
commit | 54b2e3a1d945e04852d1182c450a19814a60b057 (patch) | |
tree | 6caa8e248901f4bcd6309f295755a9e40350e932 /automated | |
parent | 270ba9bb592c8ed2a086875de9f495cb6967f480 (diff) |
Add isolation test, verifies that an appl. is isolated.
Verify that an application is isolated and that the kernel configuraion
is sane for the applcation to be run without interference from user/kernel
space tasks.
Change-Id: Ie1c267b6d50026a080f6a0d6d25d518f2ad6f4ab
Signed-off-by: Ravineet Singh <ravineet.singh@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-x | automated/linux/isolate-task/isolate-task-verify.sh | 44 | ||||
-rw-r--r-- | automated/linux/isolate-task/isolate-task.yaml | 29 |
2 files changed, 73 insertions, 0 deletions
diff --git a/automated/linux/isolate-task/isolate-task-verify.sh b/automated/linux/isolate-task/isolate-task-verify.sh new file mode 100755 index 0000000..91e4619 --- /dev/null +++ b/automated/linux/isolate-task/isolate-task-verify.sh @@ -0,0 +1,44 @@ +#!/bin/sh -e + +usage() { + echo "Usage: $0 <-c cpus> <-s [true|false]>" 1>&2 + echo " -c CPU's to isolate and verify" + echo " -s Skip dependenciy installs" + echo " -t Git tag to use" + echo " example:" + echo " $0 -c 1,2 -s false -t v0.2" + exit 1 +} + +while getopts "c:s:t:" o; do + case "$o" in + c) CPUS="${OPTARG}" ;; + s) SKIP_INSTALL="${OPTARG}" ;; + t) GIT_TAG="${OPTARG}" ;; + *) usage ;; + esac +done + +[ -z "${CPUS}" ] && usage +[ -z "${SKIP_INSTALL}" ] && usage +[ -z "${GIT_TAG}" ] && usage + +. ../../lib/sh-test-lib + +OUTPUT="$(pwd)/output" +RESULT_FILE="${OUTPUT}/result.txt" +TEST_LOG="${OUTPUT}/isolation-test-output.txt" + +[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)" +mkdir -p "${OUTPUT}" + +if [ "${SKIP_INSTALL}" = "false" ] || [ "${SKIP_INSTALL}" = "False" ]; then + install_deps "git stress cpuset gzip" + git clone git://git.linaro.org/lng/task-isolation.git +fi + +cd task-isolation +git checkout tags/"${GIT_TAG}" -b "${GIT_TAG}" +./isolate-task.sh -v -c "${CPUS}" sleep "10" 2>&1 | tee "${TEST_LOG}" + +grep TEST_ISOLATION_CORE_ "${TEST_LOG}" > "${RESULT_FILE}" diff --git a/automated/linux/isolate-task/isolate-task.yaml b/automated/linux/isolate-task/isolate-task.yaml new file mode 100644 index 0000000..2b428e0 --- /dev/null +++ b/automated/linux/isolate-task/isolate-task.yaml @@ -0,0 +1,29 @@ +metadata: + name: verify_isolation + version: "1.0" + format: "Lava-Test-Shell Test Definition 1.0" + description: "Verify kernel configuration. Isolate application and verify + that kernel tick/resch interrups do not occur more than 1/sec." + maintainer: + - ravineet.singh@linaro.org + os: + - debian + - ubuntu + devices: + - juno + - arndale + - x86 + scope: + - functional + environment: + - lava-test-shell + +params: + ISOL_CORES: "2,3" + SKIP_INSTALL: "False" + GIT_TAG: "v0.2" +run: + steps: + - cd automated/linux/isolate-task + - ./isolate-task-verify.sh -c "${ISOL_CORES}" -s "${SKIP_INSTALL}" -t "${GIT_TAG}" + - ../../utils/send-to-lava.sh ./output/result.txt |