Revert "CTS test for Android Security b/36592202"
This reverts commit be51a47b6d07e0d8d6aef75e6a627e9d923e8d61.
Bug: 36592202
Bug: 72456874
Bug: 116174409
Test: Builds successfully
Change-Id: Ida4198590a259cd0aacd60ee326b1a72088ff53b
Merged-In: I4fbd3283a0abdedb7344b76100964f2130524832
(cherry picked from commit 13721b181cb9e4c7010b0c63eb26a7c185af1389)
diff --git a/tests/tests/security/res/raw/bug_36592202.ogg b/tests/tests/security/res/raw/bug_36592202.ogg
deleted file mode 100755
index 868e630..0000000
--- a/tests/tests/security/res/raw/bug_36592202.ogg
+++ /dev/null
Binary files differ
diff --git a/tests/tests/security/src/android/security/cts/StagefrightTest.java b/tests/tests/security/src/android/security/cts/StagefrightTest.java
index 7f5aa38..a66256a 100755
--- a/tests/tests/security/src/android/security/cts/StagefrightTest.java
+++ b/tests/tests/security/src/android/security/cts/StagefrightTest.java
@@ -50,12 +50,10 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
-import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.InputStream;
import java.net.Socket;
import java.net.ServerSocket;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.UUID;
@@ -606,56 +604,6 @@
}
@SecurityTest
- public void testStagefright_bug_36592202() throws Exception {
- Resources resources = getInstrumentation().getContext().getResources();
- AssetFileDescriptor fd = resources.openRawResourceFd(R.raw.bug_36592202);
- int page_size = 25627;
- byte [] blob = new byte[page_size];
-
- // 127 bytes read and 25500 zeros constitute one Ogg page
- FileInputStream fis = fd.createInputStream();
- int numRead = fis.read(blob);
- fis.close();
-
- // Creating temp file
- final File tempFile = File.createTempFile("poc_tmp", ".ogg", null);
-
- try {
- final FileOutputStream tempFos = new FileOutputStream(tempFile.getAbsolutePath());
- int bytesWritten = 0;
- // Repeat data till size is ~1 GB
- for (int i = 0; i < 50000; i++) {
- tempFos.write(blob);
- bytesWritten += page_size;
- }
- tempFos.close();
-
- final int fileSize = bytesWritten;
- int timeout = (10 * 60 * 1000);
-
- runWithTimeout(new Runnable() {
- @Override
- public void run() {
- try {
- doStagefrightTestMediaCodec(tempFile.getAbsolutePath());
- } catch (Exception | AssertionError e) {
- if (!tempFile.delete()) {
- Log.e(TAG, "Failed to delete temporary PoC file");
- }
- fail("Operation was not successful");
- }
- }
- }, timeout);
- } catch (Exception e) {
- fail("Failed to test b/36592202");
- } finally {
- if (!tempFile.delete()) {
- Log.e(TAG, "Failed to delete temporary PoC file");
- }
- }
- }
-
- @SecurityTest
public void testStagefright_bug_30822755() throws Exception {
doStagefrightTest(R.raw.bug_30822755);
}