Re-enable test with fixes
Previously if enableAdbRoot() failed we would leave the VM running
(because sMicrodroid was still null), leading to a cascade of failures
in subsequent tests.
This doesn't resolve the issue that enableAdbRoot() sometimes seems to
fail on Cuttlefish (probably due to nested virtualization slowdown),
but should mean it is a normal flake rather than a blocker.
Bug: 229823049
Test: atest AuthFsHostTest
Test: Fake adb root failure, observe VM torn down
Change-Id: I3a365a557faa99babdf404b430d5f412f5895378
diff --git a/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java b/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
index b332543..0e660f1 100644
--- a/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
+++ b/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
@@ -49,7 +49,6 @@
import org.junit.After;
import org.junit.AssumptionViolatedException;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -63,7 +62,6 @@
@RootPermissionTest
@RunWith(DeviceJUnit4ClassRunner.class)
-@Ignore("TODO(b/229823049): Make this work")
public final class AuthFsHostTest extends VirtualizationTestCaseBase {
/** Test directory on Android where data are located */
@@ -150,11 +148,12 @@
.addExtraIdsigPath(EXTRA_IDSIG_PATH)
.build((TestDevice) androidDevice);
+ // From this point on, we need to tear down the Microdroid instance
+ sMicrodroid = new CommandRunner(microdroidDevice);
+
// Root because authfs (started from shell in this test) currently require root to open
// /dev/fuse and mount the FUSE.
assertThat(microdroidDevice.enableAdbRoot()).isTrue();
-
- sMicrodroid = new CommandRunner(microdroidDevice);
}
@AfterClassWithInfo