diff options
author | San Mehat <san@google.com> | 2010-02-24 08:54:18 -0800 |
---|---|---|
committer | San Mehat <san@google.com> | 2010-02-24 08:54:18 -0800 |
commit | 85451ee15fdf6cae371dc3005441988c7d426401 (patch) | |
tree | ddf4f750bb3b73759f6268ed975bb385edf3322c /tests | |
parent | 9ff1f96fdf1c88c55c45e0876b10a3a9686dc28a (diff) | |
download | frameworks_base-85451ee15fdf6cae371dc3005441988c7d426401.zip frameworks_base-85451ee15fdf6cae371dc3005441988c7d426401.tar.gz frameworks_base-85451ee15fdf6cae371dc3005441988c7d426401.tar.bz2 |
MountService: Fix bug which would allow apps to try to rename a container whos dst is mounted
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/AndroidTests/src/com/android/unit_tests/AsecTests.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java b/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java index 3bbb447..d5d23266 100755 --- a/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java +++ b/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java @@ -300,7 +300,7 @@ public class AsecTests extends AndroidTestCase { } } - public void testRenameMountedContainer() { + public void testRenameSrcMountedContainer() { try { Assert.assertEquals(StorageResultCode.OperationSucceeded, createContainer("testRenameContainer.1", 4, "none")); @@ -312,12 +312,15 @@ public class AsecTests extends AndroidTestCase { } } - public void testRenameToExistingContainer() { + public void testRenameDstMountedContainer() { try { Assert.assertEquals(StorageResultCode.OperationSucceeded, createContainer("testRenameContainer.1", 4, "none")); Assert.assertEquals(StorageResultCode.OperationSucceeded, + unmountContainer("testRenameContainer.1", false)); + + Assert.assertEquals(StorageResultCode.OperationSucceeded, createContainer("testRenameContainer.2", 4, "none")); Assert.assertEquals(StorageResultCode.OperationFailedStorageMounted, |