commit | 20e74aa201b4a81178e12a27f197f6d29e9b4e44 | [log] [tgz] |
---|---|---|
author | Sahana Rao <sahanas@google.com> | Fri Jul 17 18:37:57 2020 +0100 |
committer | Sahana Rao <sahanas@google.com> | Tue Jul 21 17:10:33 2020 +0000 |
tree | ac59373a03d5c4db8034aab7af02983d306925d4 | |
parent | 1e7b720e2c2a581125da04a2f51d09386c182946 [diff] |
Assert no-write access for Android/<data|obb> directories 'Android/<data|obb>' directories may not be executable, depending on the mount/volume. However, these directories should never be writable, hence we can always test no-write access for these directories. Changed testAllWalkingUpTreeReadOnly to assertDirNoWriteAccess for Android/<data|obb> path instead of assertDirReadOnlyAccess Bug: 160211885 Test: atest ExternalStorageHostTest#testExternalStorageRead29 Merged-In: I6140f79f3cc5f23397607c6e220aee20894d7948 Change-Id: I6140f79f3cc5f23397607c6e220aee20894d7948
diff --git a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java index 14df3cf..a43bbe7 100644 --- a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java +++ b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/ReadExternalStorageTest.java
@@ -60,6 +60,12 @@ path = path.getParentFile(); } + // Path is 'Android/<data|obb>'. These directories may not be executable, depending on + // the mount. However, these directories should never be writable, hence we only test + // for no-write access here. + assertDirNoWriteAccess(path); + path = path.getParentFile(); + // Keep walking up until we leave device while (path != null) { if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState(path))) {