diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-12 20:32:52 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-12 20:32:52 +0800 |
commit | b72fe4b3caaba081313603ab2d2ee8042c6820dc (patch) | |
tree | 5dab1d5c2d3e8a1bd878ecd25b71c2c4697a80c4 /automated/android | |
parent | e1e0b02eef4119d8e1cdffaf3d2fd261a403c50b (diff) |
linaro-android-kernel-tests: disable selinux for test
since this test is kernel related test,
it might need premissions that not supported by default.
It's not good to add rules for test purpose, which might
affect other tests that, so we set it to permissve mode
before we run this kernel test, and set it back to Enforce
mode if it was before
Change-Id: Ic02eb085bdbaeb37f0fd27339f1dd3939489aaab
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'automated/android')
-rwxr-xr-x | automated/android/linaro-android-kernel-tests/linaro-android-kernel-tests.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/automated/android/linaro-android-kernel-tests/linaro-android-kernel-tests.sh b/automated/android/linaro-android-kernel-tests/linaro-android-kernel-tests.sh index 59fe540..8dd7d97 100755 --- a/automated/android/linaro-android-kernel-tests/linaro-android-kernel-tests.sh +++ b/automated/android/linaro-android-kernel-tests/linaro-android-kernel-tests.sh @@ -17,7 +17,17 @@ create_out_dir "${OUTPUT}" # Run test script. if test -n "$(adb shell "which ${TEST_SCRIPT}")"; then + # disable selinux for kernel test + selinux=$(adb shell getenforce) + if [ "X${selinux}" = "XEnforcing" ]; then + adb shell setenforce 0 + fi adb shell "${TEST_SCRIPT}" | tee "${LOGFILE}" + # enable selinux again after the test + # to avoid affecting next test + if [ "X${selinux}" = "XEnforcing" ]; then + adb shell setenforce 1 + fi else warn_msg "${TEST_SCRIPT} NOT found" report_fail "test-script-existence-check" |