summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-16 10:18:38 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-16 10:18:38 -0700
commitbc0ae701a10a2be0a3fa66ea3ad2abebbbbe98f7 (patch)
tree51e84d1b51df693b33d23b7829891e159b88a7eb
parent54a1d1ef3af6de6fec4fa9991f0bfdf2d92182ea (diff)
parent7082788e24208a19007f237ae4c4622a8bd6bc6e (diff)
downloadextras-bc0ae701a10a2be0a3fa66ea3ad2abebbbbe98f7.tar.gz
am 7082788e: Merge change 6868 into donut
Merge commit '7082788e24208a19007f237ae4c4622a8bd6bc6e' * commit '7082788e24208a19007f237ae4c4622a8bd6bc6e': Test to ensure that /sdcard is mounted with security-critical options.
-rwxr-xr-xtests/fstest/mounts-test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fstest/mounts-test.sh b/tests/fstest/mounts-test.sh
new file mode 100755
index 00000000..80a2416a
--- /dev/null
+++ b/tests/fstest/mounts-test.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+rtrn=0
+
+adb shell mount | grep -q /sdcard
+if [ 0 -ne $? ]
+then
+ echo FAILURE: /sdcard is not mounted
+ exit 1
+fi
+
+for i in nosuid noexec
+do
+ adb shell mount | grep /sdcard | grep -q $i
+ if [ 0 -ne $? ]
+ then
+ echo FAILURE: /sdcard is not mounted $i
+ rtrn=$(expr $rtrn + 1)
+ fi
+done
+
+exit $rtrn
+