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

+12
View File
@@ -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)