Remove testTombstonesAreBeingForwarded
The adb root command in this test is somehow failing silently, resulting
in flaky test. The functionality is fully tested by
testTombstonesAreGeneratedUponCrash so this test in no more needed
anyway.
Bug: 237978562
Test: atest MicrodroidTestCases/NA
Change-Id: I7a84328d83b40586180b966438db523d84bd9eee
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidTestCase.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidTestCase.java
index 78fb53b..c4ea80a 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidTestCase.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidTestCase.java
@@ -26,7 +26,6 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -393,53 +392,6 @@
}
@Test
- public void testTombstonesAreBeingForwarded() throws Exception {
- // This test requires rooting. Skip on user builds where rooting is impossible.
- final String buildType = getDevice().getProperty("ro.build.type");
- assumeTrue("userdebug".equals(buildType) || "eng".equals(buildType));
-
- // Note this test relies on logcat values being printed by tombstone_transmit on
- // and the reeceiver on host (virtualization_service)
- final String configPath = "assets/vm_config.json"; // path inside the APK
- final String cid =
- startMicrodroid(
- getDevice(),
- getBuild(),
- APK_NAME,
- PACKAGE_NAME,
- configPath,
- /* debug */ true,
- minMemorySize(),
- Optional.of(NUM_VCPUS),
- Optional.of(CPU_AFFINITY));
- adbConnectToMicrodroid(getDevice(), cid);
- waitForBootComplete();
- runOnMicrodroidRetryingOnFailure(
- MICRODROID_COMMAND_TIMEOUT_MILLIS, MICRODROID_ADB_CONNECT_MAX_ATTEMPTS, "true");
- // We need root permission to write to /data/tombstones/
- rootMicrodroid();
- // Write a test tombstone file in /data/tombstones
- runOnMicrodroid("echo -n \'Test tombstone in VM with 34 bytes\'"
- + "> /data/tombstones/transmit.txt");
- // check if the tombstone have been tranferred from VM. This is a bit flaky - increasing
- // timeout to 30s can result in SIGKILL inside microdroid due to logcat memory issue
- CommandRunner android = new CommandRunner(getDevice());
- android.runWithTimeout(
- 15000,
- "grep",
- "-m",
- "1",
- "'tombstone_transmit.microdroid:.*data/tombstones/transmit.txt'",
- LOG_PATH);
-
- // Confirm that tombstone is received (from host logcat)
- assertNotEquals(runOnHost("adb", "-s", getDevice().getSerialNumber(),
- "logcat", "-d", "-e",
- "Received 34 bytes from guest & wrote to tombstone file.*"),
- "");
- }
-
- @Test
public void testMicrodroidBoots() throws Exception {
final String configPath = "assets/vm_config.json"; // path inside the APK
final String cid =