summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2014-09-24 15:25:07 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2014-09-24 15:25:07 +0800
commit51560e211b3d452efad496a25271a67ec783a599 (patch)
tree985d2ead66aced7cf8a9d49278d3afc7b3032660
parent6c2e5aeafe36950972bc039e3b3bd67be7cb7369 (diff)
downloadlinaro-android-kernel-test-51560e211b3d452efad496a25271a67ec783a599.tar.gz
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 <yongqin.liu@linaro.org>
-rwxr-xr-xlinaro-android-kernel-tests.sh13
-rw-r--r--vfat-volid/test.sh7
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