From 51560e211b3d452efad496a25271a67ec783a599 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Wed, 24 Sep 2014 15:25:07 +0800 Subject: ashmemtest and vfat-volid: change to use temporary under /data/local/tmp when selinux enabled, it's not possible to create or access directory under /data/ or root (/), so change to use deirectory under /data/local/tmp Change-Id: I5e41f18c53c85a0d4d49d91eb119d8a5ab3f2843 Signed-off-by: Yongqin Liu --- linaro-android-kernel-tests.sh | 13 ++++++++----- vfat-volid/test.sh | 7 +++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/linaro-android-kernel-tests.sh b/linaro-android-kernel-tests.sh index d35cb90..5431f1c 100755 --- a/linaro-android-kernel-tests.sh +++ b/linaro-android-kernel-tests.sh @@ -42,6 +42,9 @@ run_ashmemtest_expanded() { echo "Running expanded ashmemtest." DIR=/data/linaro-android-kernel-test/ashmemtest-expanded + OUT_DIR=/data/local/tmp/linaro-android-kernel-test/ + mkdir $OUT_DIR + FILES=$DIR/*.txt for f in $FILES @@ -50,17 +53,17 @@ run_ashmemtest_expanded() TESTNAME="${BASENAME%.*}" echo "running $TESTNAME" - ashmemtest-expanded $f &> $DIR/tmp.out + ashmemtest-expanded $f &> $OUT_DIR/tmp.out - diff $DIR/tmp.out $DIR/$TESTNAME.out > /dev/null + diff $OUT_DIR/tmp.out $DIR/$TESTNAME.out > /dev/null if [ $? -eq 0 ]; then - cat $DIR/tmp.out + cat $OUT_DIR/tmp.out echo "[ashmem_expanded_$TESTNAME]: test passed" else - cat $DIR/tmp.out + cat $OUT_DIR/tmp.out echo "[ashmem_expanded_$TESTNAME]: test failed" fi - rm $DIR/tmp.out + rm $OUT_DIR/tmp.out done } diff --git a/vfat-volid/test.sh b/vfat-volid/test.sh index 49490bb..67b115b 100644 --- a/vfat-volid/test.sh +++ b/vfat-volid/test.sh @@ -6,8 +6,8 @@ function do_test() { # parameters: sizeK vfat_arg id - UUT=/tmp/$$.disk - MPT=/tmp/$$ + UUT=/data/local/tmp/vfat-volid/$$.disk + MPT=/data/local/tmp/vfat-volid/$$ DEV=/dev/block/loop7 step=0 @@ -84,8 +84,7 @@ function do_test() { } echo "Starting" -mount -o rw,remount / -mkdir /tmp +mkdir /data/local/tmp/vfat-volid LOG=/dev/null if [ $# -ge 1 ]; then -- cgit v1.2.3