summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Rue <dan.rue@linaro.org>2017-07-11 16:30:30 -0500
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-07-13 14:13:51 +0000
commit58d3a8889363c785a96028447e65d1c68856a840 (patch)
tree975564bac05f13bb3994daf5e09eae6c80761c2e
parent9bce916b02f04983da94c16cbae9cc8470310a50 (diff)
linux: ltp: Fix su01
The su01 test has three problems: - It requires expect (fixed in this patch) - It requires root's password to be set in environment variable PASSWD (fixed in this patch; hard coded to 'root') - It requires a fix to su01 in LTP itself - proposed change at https://github.com/linux-test-project/ltp/pull/183 Change-Id: I1a693a62058f59446b68fe48cc5739e09dc6c70c Signed-off-by: Dan Rue <dan.rue@linaro.org>
-rwxr-xr-xautomated/linux/ltp/ltp.sh10
-rw-r--r--automated/linux/ltp/ltp.yaml4
2 files changed, 9 insertions, 5 deletions
diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh
index 9d899a5..86a551b 100755
--- a/automated/linux/ltp/ltp.sh
+++ b/automated/linux/ltp/ltp.sh
@@ -24,11 +24,12 @@ usage() {
[-S skipfile-lsk-juno]
[-s True|False]
[-v LTP_VERSION]
- [-M Timeout_Multiplier]" 1>&2
+ [-M Timeout_Multiplier]
+ [-R root_password]" 1>&2
exit 0
}
-while getopts "M:T:S:s:v:" arg; do
+while getopts "M:T:S:s:v:R:" arg; do
case "$arg" in
T)
TST_CMDFILES="${OPTARG}"
@@ -53,6 +54,7 @@ while getopts "M:T:S:s:v:" arg; do
v) LTP_VERSION="${OPTARG}";;
# Slow machines need more timeout Default is 5min and multiply * MINUTES
M) export LTP_TIMEOUT_MUL="${OPTARG}";;
+ R) export PASSWD="${OPTARG}";;
esac
done
@@ -108,11 +110,11 @@ else
# shellcheck disable=SC2154
case "${dist}" in
debian|ubuntu)
- pkgs="xz-utils flex bison build-essential wget curl net-tools quota genisoimage sudo libaio-dev"
+ pkgs="xz-utils flex bison build-essential wget curl net-tools quota genisoimage sudo libaio-dev expect"
install_deps "${pkgs}" "${SKIP_INSTALL}"
;;
centos|fedora)
- pkgs="xz flex bison make automake gcc gcc-c++ kernel-devel wget curl net-tools quota genisoimage sudo libaio"
+ pkgs="xz flex bison make automake gcc gcc-c++ kernel-devel wget curl net-tools quota genisoimage sudo libaio expect"
install_deps "${pkgs}" "${SKIP_INSTALL}"
;;
*)
diff --git a/automated/linux/ltp/ltp.yaml b/automated/linux/ltp/ltp.yaml
index c4b8df3..a6da5c3 100644
--- a/automated/linux/ltp/ltp.yaml
+++ b/automated/linux/ltp/ltp.yaml
@@ -31,11 +31,13 @@ params:
SKIP_INSTALL: false
# Slow machines need more timeout Default is 5min and multiply * TIMEOUT_MULTIPLIER
TIMEOUT_MULTIPLIER: 1
+ # root's password. Needed by ltp/su01.
+ ROOT_PASSWD: root
run:
steps:
- cd ./automated/linux/ltp/
- - ./ltp.sh -T "${TST_CMDFILES}" -S "${SKIPFILE}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}"
+ - ./ltp.sh -T "${TST_CMDFILES}" -S "${SKIPFILE}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}"
- ../../utils/send-to-lava.sh ./output/result.txt
parse: