summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2018-08-24 09:37:01 +0800
committerChase Qi <chase.qi@linaro.org>2018-08-24 13:04:20 +0800
commitfe4cdc1344ecb170b84e97d13a14b11df1bb0fac (patch)
tree5acb1813c984797c90d818eb78036f38059dc2f8
parent922033ebb7a393be664f9c0b8f4d9fb9480fbfb2 (diff)
linux/dockrized-tests: launch container with --privileged and --init flags
--privileged flag is required by tests need to modify system/kernel parameters. --init flag is required by ltp syscalls so that tests spawned and exit correctly. Change-Id: Ic903adb8c943206247f406d094b63e24dec4083e Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/linux/dockerized-tests/over-ssh.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/automated/linux/dockerized-tests/over-ssh.sh b/automated/linux/dockerized-tests/over-ssh.sh
index f7f187f..49c0cfe 100755
--- a/automated/linux/dockerized-tests/over-ssh.sh
+++ b/automated/linux/dockerized-tests/over-ssh.sh
@@ -3,6 +3,7 @@
# shellcheck disable=SC2154
# shellcheck disable=SC2034
# shellcheck disable=SC2016
+# shellcheck disable=SC2181
TEST_DIR=$(dirname "$(realpath "$0")")
OUTPUT="${TEST_DIR}/output"
@@ -54,9 +55,9 @@ echo "${SSH_PASSWD}" | eval "${ssh_cmd}" sudo -S date +%Y%m%d -s "${client_date}
# Trigger test run.
if [ -z "${TESTDEF_PARAMS}" ]; then
- cmd1='eval "${ssh_cmd}" docker run "${DOCKER_IMG}" test-runner -d "${TEST}"'
+ cmd1='eval "${ssh_cmd}" docker run --privileged --init "${DOCKER_IMG}" test-runner -d "${TEST}"'
else
- cmd1='eval "${ssh_cmd}" docker run "${DOCKER_IMG}" test-runner -d "${TEST}" -r "${TESTDEF_PARAMS}"'
+ cmd1='eval "${ssh_cmd}" docker run --privileged --init "${DOCKER_IMG}" test-runner -d "${TEST}" -r "${TESTDEF_PARAMS}"'
fi
pipe0_status "${cmd1}" 'tee -a "${LOGFILE}"'
if [ "$?" != 0 ]; then