From d65912f0c52a642b2c76be28145a700cf5d183eb Mon Sep 17 00:00:00 2001 From: 0x1Nawaf <73679429+0x1Nawaf@users.noreply.github.com> Date: Mon, 26 Oct 2026 18:41:18 +0300 Subject: [PATCH] fix: stop starting a session on the slow proot (#1395) --- .github/workflows/build.yml | 10 +++++ app/build.gradle | 8 ++++ .../com/droiddeck/launcher/SessionActivity.kt | 8 +++- .../droiddeck/launcher/core/DeviceReport.kt | 2 + .../launcher/runtime/LinuxRuntime.java | 40 +++++++++++++++++-- .../runtime/LinuxRuntimeInstaller.java | 5 ++- .../launcher/runtime/ProotFastPath.kt | 22 ++++++++-- .../launcher/session/SessionPrefs.kt | 10 +++++ .../launcher/session/SessionService.kt | 38 +++++++++++++++--- app/src/main/res/values/strings.xml | 2 + .../launcher/runtime/ProotFastPathTest.kt | 10 +++++ tools/device-smoke.sh | 12 +++++- tools/packs/proot/release.env | 6 +++ tools/tests/test_device_smoke.py | 12 ++++++ 14 files changed, 169 insertions(+), 16 deletions(-) create mode 100644 tools/packs/proot/release.env diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 146e7fe3bf..1d39651c0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -494,6 +494,16 @@ jobs: - name: Build the add-on packs run: bash tools/packs/build.sh app/build/packs + - name: Note when the proot pack pin is behind this build + run: | + set -euo pipefail + # shellcheck disable=SC1091 + source tools/packs/proot/release.env + sha=$(sha256sum app/build/packs/proot.tar.zst | cut -d' ' -f1) + if [ "$sha" != "$PROOT_PACK_SHA256" ]; then + echo "::warning::built proot pack $sha does not match tools/packs/proot/release.env ($PROOT_PACK_SHA256). This build publishes the pack it just built. Source builds keep downloading the pinned pack until release.env is updated." + fi + - name: Build id: build env: diff --git a/app/build.gradle b/app/build.gradle index 6fdfe9c4b9..1c9b9bad8d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -87,10 +87,18 @@ def desktopKde = rootProject.file('tools/desktop-kde/release.env').readLines() def trackingPack = rootProject.file('tools/packs/tracking/release.env').readLines() .findAll { it.contains('=') && !it.startsWith('#') } .collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] } +def prootPackPin = rootProject.file('tools/packs/proot/release.env').readLines() + .findAll { it.contains('=') && !it.startsWith('#') } + .collectEntries { def kv = it.split('=', 2); [(kv[0].trim()): kv[1].trim()] } def addonPacks = ['proot', 'directaudio', 'tracking', 'xbox', 'comet'].collectEntries { name -> def pack = file("build/packs/${name}.tar.zst") if (!pack.isFile()) { if (ciBuild) throw new GradleException("Add-on pack ${pack} is missing: run tools/packs/build.sh app/build/packs") + // A source build that did not compile proot still pins a published pack, so the app + // downloads the patched binary instead of falling back to the rootfs copy. + if (name == 'proot' && prootPackPin.PROOT_PACK_SHA256) { + return [(name): [sha256: prootPackPin.PROOT_PACK_SHA256, size: (prootPackPin.PROOT_PACK_SIZE ?: '0') as long]] + } return [(name): [sha256: '', size: 0L]] } def digest = java.security.MessageDigest.getInstance('SHA-256') diff --git a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt index 2f9bcf190a..9a762212d1 100644 --- a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt @@ -2073,7 +2073,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return } Thread({ - val hint = runtimeDamageHint() ?: sessionEndHint(SessionState.logFile) + val hint = runtimeDamageHint() ?: sessionEndHint(SessionState.logFile) ?: prootFailureHint() runOnUiThread { if (isFinishing || isDestroyed) return@runOnUiThread showEnded(status, hint) @@ -2136,6 +2136,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { return EndHint(resources.getQuantityString(R.plurals.session_end_runtime_damaged, broken.size, broken.size, broken.first()), repair = true) } + private fun prootFailureHint(): EndHint? { + if (SessionState.failureCode != "PROOT_MISSING") return null + val message = SessionState.failureMessage ?: return null + return EndHint(message) + } + private fun sessionEndHint(log: File?): EndHint? { if (log == null || !log.isFile) return null return try { diff --git a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt index 9d62261667..d587ecb7cc 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt @@ -261,6 +261,8 @@ object DeviceReport { k("VRAM cap", SessionPrefs.vramCapMb(context).let { if (it > 0) "$it MB" else "driver default" }) k("proot without seccomp", SessionPrefs.prootNoSeccomp(context)) k("proot fast path", SessionPrefs.prootFastPath(context)) + k("proot binary", LinuxRuntime.prootSource(context) + " " + LinuxRuntime.prootBinary(context).path) + k("proot fast path (eligible)", com.droiddeck.launcher.runtime.ProotFastPath.enabled(context)) k("Guest host name", SessionPrefs.guestHostname(context)) k("DirectAudio for games", SessionPrefs.directAudio(context)) k("Stretch 16:9 to panel", SessionPrefs.stretch16x9(context)) diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java index 6d17f2d75a..6473197549 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntime.java @@ -63,15 +63,48 @@ public final class LinuxRuntime { } private static final String HOST_DIR = "opt/android-host"; + /** The downloaded add-on pack. The APK does not ship this binary. */ + public static final String PROOT_PACK = "add-on pack"; + /** Termux's unpatched proot inside the rootfs. Developer switch only. */ + public static final String PROOT_ROOTFS = "rootfs fallback"; + public static final String PROOT_MISSING = "missing"; + + private static File rootfsProot(Context context) { + return new File(rootDir(context), HOST_DIR + "/proot"); + } + + private static File rootfsLoader(Context context) { + return new File(rootDir(context), HOST_DIR + "/loader"); + } + + private static boolean rootfsProotReady(Context context) { + return rootfsProot(context).isFile() && rootfsLoader(context).isFile(); + } + + /** Patched proot is the add-on pack. The rootfs copy is not that binary. */ + public static boolean patchedProot(Context context) { + return AddonPack.PROOT.installed(context); + } public static File prootBinary(Context context) { if (AddonPack.PROOT.installed(context)) return AddonPack.PROOT.file(context, "libproot.so"); - return new File(rootDir(context), HOST_DIR + "/proot"); + if (SessionPrefs.allowStockProot(context)) return rootfsProot(context); + return AddonPack.PROOT.file(context, "libproot.so"); } public static File prootLoader(Context context) { if (AddonPack.PROOT.installed(context)) return AddonPack.PROOT.file(context, "libproot-loader.so"); - return new File(rootDir(context), HOST_DIR + "/loader"); + if (SessionPrefs.allowStockProot(context)) return rootfsLoader(context); + return AddonPack.PROOT.file(context, "libproot-loader.so"); + } + + /** Where {@link #prootBinary} came from: {@link #PROOT_PACK}, {@link #PROOT_ROOTFS} or {@link #PROOT_MISSING}. */ + public static String prootSource(Context context) { + File bin = prootBinary(context); + if (!bin.isFile()) return PROOT_MISSING; + if (AddonPack.PROOT.installed(context) + && bin.getPath().equals(AddonPack.PROOT.file(context, "libproot.so").getPath())) return PROOT_PACK; + return PROOT_ROOTFS; } public static String prootLibraryPath(Context context) { @@ -85,8 +118,7 @@ public final class LinuxRuntime { return new File(root, "usr/bin/gamescope").isFile() && (new File(root, SESSION_SCRIPT.substring(1)).isFile() || new File(root, LegacyNames.SESSION_SCRIPT.substring(1)).isFile()) - && prootBinary(context).isFile() - && prootLoader(context).isFile(); + && (patchedProot(context) || rootfsProotReady(context)); } public static File vulkanIcd(Context context) { diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java index cd8c6c44d4..5975f6501a 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java +++ b/app/src/main/java/com/droiddeck/launcher/runtime/LinuxRuntimeInstaller.java @@ -6,6 +6,7 @@ import android.util.Log; import com.droiddeck.launcher.R; +import com.droiddeck.launcher.session.SessionPrefs; import com.droiddeck.launcher.core.ArchivePaths; import com.droiddeck.launcher.core.Downloader; import com.droiddeck.launcher.core.Hashes; @@ -262,7 +263,9 @@ public final class LinuxRuntimeInstaller { emptyTrash(LinuxRuntime.rootDir(context).getParentFile()); String downloading = context.getString(R.string.rtinst_downloading); if (listener != null) listener.onProgress(Step.DOWNLOADING, downloading, 0); - if (!AddonPack.PROOT.await(context)) throw new IOException("Cannot download proot"); + if (!LinuxRuntime.patchedProot(context) && !AddonPack.PROOT.await(context) + && !SessionPrefs.allowStockProot(context)) + throw new IOException("Cannot download proot"); if (!AddonPack.DIRECTAUDIO.await(context)) throw new IOException("Cannot download DirectAudio"); boolean ok = Downloader.downloadFile(release.url, archive, true, release.sha256, (fraction) -> { if (listener != null) { diff --git a/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt b/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt index 94508e3729..485d7178a0 100644 --- a/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt +++ b/app/src/main/java/com/droiddeck/launcher/runtime/ProotFastPath.kt @@ -1,18 +1,32 @@ package com.droiddeck.launcher.runtime import android.content.Context -import com.droiddeck.launcher.core.AddonPack +import android.util.Log import com.droiddeck.launcher.session.SessionPrefs import java.io.File import java.security.MessageDigest object ProotFastPath { + private const val TAG = "ProotFastPath" const val LIBRARY = "/usr/local/lib/libblfastpath.so" const val MAX_BINDS = 256 - fun enabled(context: Context): Boolean = - SessionPrefs.prootFastPath(context) && !SessionPrefs.prootNoSeccomp(context) && - LinuxRuntime.prootBinary(context).parentFile == AddonPack.PROOT.dir(context) + /** + * The fast path's trampoline is let through only by the proot built with patches/0014. + * The rootfs copy (Termux's stock proot) is not that binary, so the library stays out. + */ + fun allows(preference: Boolean, noSeccomp: Boolean, source: String): Boolean = + preference && !noSeccomp && source == LinuxRuntime.PROOT_PACK + + fun enabled(context: Context): Boolean { + val preference = SessionPrefs.prootFastPath(context) + val noSeccomp = SessionPrefs.prootNoSeccomp(context) + val source = LinuxRuntime.prootSource(context) + val on = allows(preference, noSeccomp, source) + if (preference && !noSeccomp && !on) + Log.i(TAG, "proot: fast path off - binary is $source, not the patched proot") + return on + } fun key(root: File, binds: List): String? { if (binds.size > MAX_BINDS || binds.any { it.contains('|') } || root.path.contains('|')) return null diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt index 95e867f8a1..75f6e54bef 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt @@ -9,6 +9,7 @@ import com.droiddeck.launcher.core.TextureFiltering import com.droiddeck.launcher.gpu.Cardboard import com.droiddeck.launcher.gpu.ScreenEffects import org.json.JSONObject +import java.io.File object SessionPrefs { data class GameTextureFiltering(val anisotropy: Int? = null, val lodBias: String? = null) @@ -527,6 +528,15 @@ object SessionPrefs { prefs(context).edit().putBoolean("cursorComposite", on).apply() } + /** + * The rootfs ships Termux's unpatched proot. A session uses it only when this file exists, + * so a missing add-on pack cannot silently fall back to it. + * Path: Android/data/<package>/files/droiddeck-stock-proot + */ + @JvmStatic + fun allowStockProot(context: Context): Boolean = + context.getExternalFilesDir(null)?.let { File(it, "droiddeck-stock-proot").isFile } == true + const val DEFAULT_GUEST_HOSTNAME = "DroidDeck" @JvmStatic diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt index 0b7f32db10..dd844b71c1 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt @@ -25,6 +25,7 @@ import android.os.PowerManager import android.hardware.display.DisplayManager import android.view.Display import android.util.Log +import android.widget.Toast import com.droiddeck.launcher.R import com.droiddeck.launcher.SessionActivity import com.droiddeck.launcher.audio.DirectAudioRelayComponent @@ -430,8 +431,30 @@ class SessionService : Service() { val sessionRoot = LinuxRuntime.sessionRoot(this).apply { mkdirs() } val runtimeDir = File(filesDir, ".wayland-rt").apply { mkdirs() } killStragglers() - for (pack in listOf(AddonPack.PROOT, AddonPack.DIRECTAUDIO)) - if (!pack.await(this, { gen == sessionGen && SessionState.running })) Log.w(TAG, "${pack.name} pack unavailable") + val stillStarting = { gen == sessionGen && SessionState.running } + val prootPack = LinuxRuntime.patchedProot(this) || AddonPack.PROOT.await(this, stillStarting) + val directAudioPack = AddonPack.DIRECTAUDIO.await(this, stillStarting) + if (!stillStarting()) { + Log.i(TAG, "session stopped while add-on packs were downloading") + return + } + if (!directAudioPack) { + Log.w(TAG, "directaudio pack unavailable; game audio drivers will not be staged") + mainHandler.post { + Toast.makeText(this, R.string.session_directaudio_missing, Toast.LENGTH_LONG).show() + } + } + if (!LinuxRuntime.patchedProot(this)) { + if (SessionPrefs.allowStockProot(this)) { + Log.w(TAG, "proot: patched proot missing; droiddeck-stock-proot allows the rootfs copy") + } else { + val message = getString(R.string.session_proot_missing) + Log.e(TAG, "$message (pack ready=$prootPack)") + SessionEvents.fail("PROOT_MISSING", message, -1) + stopSession(-1) + return + } + } val agentEnvironment = runCatching { com.droiddeck.launcher.agent.AgentEnv.beginSession(this) } .onFailure { Log.w(TAG, "agent environment skipped", it) } .getOrDefault(emptyList()) @@ -446,6 +469,10 @@ class SessionService : Service() { val sessionDir = openSessionFolder() val sessionLog = File(sessionDir, "session.log") + val prootLine = "== proot: ${LinuxRuntime.prootBinary(this).path} (${LinuxRuntime.prootSource(this)})" + Log.i(TAG, prootLine) + runCatching { sessionLog.appendText(prootLine + "\n") } + .onFailure { Log.w(TAG, "could not write the proot line to ${sessionLog.path}", it) } Log.i(TAG, GpuClockPin.start(this)) Log.i(TAG, GameThreadHints.start(this)) @@ -462,7 +489,7 @@ class SessionService : Service() { if (steamHere) guest.add("BL_EPIC_APP_ID=" + com.droiddeck.launcher.stores.epic.EpicClient.shortcutAppId) val fastPathAt = guest.size - val pulse = startAudio(guest, sessionDir) + val pulse = startAudio(guest, sessionDir, directAudioPack) if (steamHere) { val encoder = VideoEncodeBridge(File(filesDir, "venc/venc.sock")) encoder.attach(this) @@ -781,8 +808,9 @@ class SessionService : Service() { private fun noSteamGame(): Boolean = SessionState.mode == MODE_RUN && SessionState.program in setOf(NoSteamLaunch.PROTON_RUN, NoSteamLaunch.EPIC, NoSteamLaunch.BATTLENET) - private fun startAudio(guest: MutableList, sessionDir: File): PulseAudioComponent { - val wantsDirectAudio = (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP || noSteamGame()) && + private fun startAudio(guest: MutableList, sessionDir: File, directAudioPack: Boolean): PulseAudioComponent { + val wantsDirectAudio = directAudioPack && + (SessionState.mode == MODE_STEAM || SessionState.mode == MODE_DESKTOP || noSteamGame()) && SessionPrefs.directAudio(this) val wantsMic = SessionPrefs.micEnabled(this) && checkSelfPermission(android.Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f546a543a7..81d0ad94d2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -184,6 +184,8 @@ FEX runs x86 Linux programs on this ARM64 device. Auto uses it when the program is built for x86. %1$s through FEX This program is built for %1$s PCs and runs through FEX, which is not set up yet. Open Steam once while signed in: DroidDeck has it download FEX and the Steam Linux Runtime it needs, then this opens. + DroidDeck\'s proot could not be downloaded. Check the connection and try again. The session was not started, because the fallback proot is too slow to play on. + DirectAudio could not be downloaded, so game audio uses the slower path this session. This program Couldn\'t download the Steam client. Your network or VPN may be blocking Steam\'s servers; check the connection and try again. Couldn\'t set up the Steam client. Check your connection and free storage, then try again. diff --git a/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt b/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt index 5d4eb1d8ee..9b97bd4181 100644 --- a/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/runtime/ProotFastPathTest.kt @@ -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)) + } } diff --git a/tools/device-smoke.sh b/tools/device-smoke.sh index bec8fed81b..80a8838050 100755 --- a/tools/device-smoke.sh +++ b/tools/device-smoke.sh @@ -10,7 +10,7 @@ # 5. on a foldable cycles the device state (half-opened, and with --closed also closed) through # `cmd device_state`, then puts the original state back; # 6. reads the newest session folder of a debug build: first frame, last frame rate, the -# memory page size and the last process exits. +# memory page size, the proot that session ran, and the last process exits. # # Usage: tools/device-smoke.sh [--serial SERIAL] [--apk FILE] [--pkg PACKAGE] # [--no-density] [--no-size] [--no-fold] [--closed] @@ -279,6 +279,16 @@ else ev=$(sh_ run-as "$pkg" cat "files/logs/$dir/events.jsonl" 2>/dev/null) echo "$ev" | grep -q '"frame.first"' && ok "first frame was drawn" || note "no frame.first in $dir" echo "$ev" | grep -q '"session.failed"' && bad "session.failed: $(echo "$ev" | grep '"session.failed"' | tail -1 | cut -c1-160)" + report=$(sh_ run-as "$pkg" cat "files/logs/$dir/device.txt" 2>/dev/null) + proot_line=$(echo "$report" | grep 'proot binary' | head -1) + case $proot_line in + *"rootfs fallback"*|*"missing"*) bad "session proot is not the patched binary ($proot_line)" ;; + *"apk"*|*"add-on pack"*) ok "patched proot ($proot_line)" ;; + *) note "device report has no proot binary line (build from before the check)" ;; + esac + app_log=$(sh_ run-as "$pkg" cat "files/logs/$dir/app.log" 2>/dev/null) + echo "$app_log" | grep -Fq 'proot: fast path on (' && ok "proot fast path was on" \ + || note "proot fast path activation was not recorded ($(echo "$report" | grep 'proot fast path' | tr '\n' '; '))" fps=$(sh_ run-as "$pkg" cat "files/logs/$dir/app.log" 2>/dev/null | grep 'last 10 s:' | tail -1 | sed 's/.*last 10 s: //' | cut -c1-70) [ -n "$fps" ] && echo " last stats $fps" sh_ run-as "$pkg" cat "files/logs/$dir/device.txt" 2>/dev/null | grep -E 'Memory page size|^Kernel' | sed 's/^/ report /' diff --git a/tools/packs/proot/release.env b/tools/packs/proot/release.env new file mode 100644 index 0000000000..7a23b27997 --- /dev/null +++ b/tools/packs/proot/release.env @@ -0,0 +1,6 @@ +# Published proot pack for a build that did not compile libproot.so into the APK. +# CI builds embed the binary and publish their own pack; this pin is what a source +# build downloads. Tag on DroidDeck-Components: pack-proot-. +# Update both lines when source builds should pick up a newer proot. +PROOT_PACK_SHA256=5a2b7284e6357f88a14a790abd54e61effbe5f202c63b6aaba9b974c559649c3 +PROOT_PACK_SIZE=96643 diff --git a/tools/tests/test_device_smoke.py b/tools/tests/test_device_smoke.py index 9afeb919f9..25478e0ab5 100644 --- a/tools/tests/test_device_smoke.py +++ b/tools/tests/test_device_smoke.py @@ -47,6 +47,8 @@ elif a[:1] == ["shell"]: s.setdefault("log_commands", []).append(a) p.write_text(json.dumps(s)) if "ls" in a: print(s["session"]) + elif a[-1].endswith("/device.txt"): print(s.get("report", "")) + elif a[-1].endswith("/app.log"): print(s.get("app_log", "")) else: print("package not debuggable") ''' @@ -112,6 +114,16 @@ class DeviceSmokeTest(unittest.TestCase): self.assertEqual(1, result.returncode, result.stdout) self.assertIn("could not launch", result.stdout) + def test_fast_path_requires_a_session_activation_log(self): + for active in (False, True): + with self.subTest(active=active): + result, _ = self.run_smoke( + session="session", report="proot fast path (eligible) true", + app_log="proot: fast path on (66 binds)" if active else "proot: fast path off - too many binds", + ) + self.assertEqual(0, result.returncode, result.stdout + result.stderr) + self.assertEqual(active, "PASS proot fast path was on" in result.stdout) + def test_session_name_remains_one_remote_argument(self): session = "x';id;#" result, state = self.run_smoke(session=session)