fix: stop starting a session on the slow proot (#1395)

This commit is contained in:
0x1Nawaf authored and GitHub committed 2026-10-26 11:41:18 -04:00
1 parent 5d945d7784
commit d65912f0c5
14 files changed
+169 -16

No files matched your search

@@ -1,7 +1,9 @@
package com.droiddeck.launcher.runtime
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
import java.io.File
@@ -17,4 +19,12 @@ class ProotFastPathTest {
val binds = (1..ProotFastPath.MAX_BINDS + 1).map { "/host/$it:/guest/$it" }
assertNull(ProotFastPath.key(root, binds))
}
@Test fun fastPathStaysOffForTheRootfsProot() {
assertTrue(ProotFastPath.allows(preference = true, noSeccomp = false, source = LinuxRuntime.PROOT_PACK))
assertFalse(ProotFastPath.allows(preference = true, noSeccomp = false, source = LinuxRuntime.PROOT_ROOTFS))
assertFalse(ProotFastPath.allows(preference = true, noSeccomp = false, source = LinuxRuntime.PROOT_MISSING))
assertFalse(ProotFastPath.allows(preference = false, noSeccomp = false, source = LinuxRuntime.PROOT_PACK))
assertFalse(ProotFastPath.allows(preference = true, noSeccomp = true, source = LinuxRuntime.PROOT_PACK))
}
}