summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-16 10:17:09 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-16 10:17:09 -0700
commit7082788e24208a19007f237ae4c4622a8bd6bc6e (patch)
tree1b64180dee6eaab37a6dd1981c28230fbe342372
parent8987a8e89e733ac313f0a8a1e627bb4845b521e7 (diff)
parentb000782e81f9757ec9f6eb1711135cdaf622f6b0 (diff)
downloadextras-7082788e24208a19007f237ae4c4622a8bd6bc6e.tar.gz
Merge change 6868 into donut
* changes: 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
+