From ae7a0936a65a254eab81f05f12156192cb1243aa Mon Sep 17 00:00:00 2001 From: Mby159 <144836394+Mby159@users.noreply.github.com> Date: Sat, 28 Nov 2026 20:49:51 +0800 Subject: [PATCH] tests: the loader's stack reserve need not be the last link option test_the_loader_gets_the_stack_reserve_cmake_gives_it failed on main d48a957bb: its regex asked for /STACK:${GTA6RT_STACK} to be the last option in gta6rt's target_link_options list, but the line now ends with /MAP, which was added later so gta6rt_no_tls_callbacks can read gta6rt.map. The host base assertion one test below never required its option to be last and still passes on the same line. This widens the stack reserve assertion the same way, so the test asks whether gta6rt gets the stack reserve CMake gives it and not whether that reserve is the last option. The reserve itself (GTA6RT_STACK >= 8 MiB), the fallback's own /STACK: and the agreement with run_entry stay exactly as they are checked today. AI-assisted: yes. --- tests/test_build_runtime_fallback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_build_runtime_fallback.py b/tests/test_build_runtime_fallback.py index 3aebc1c230..baf3c83b70 100644 --- a/tests/test_build_runtime_fallback.py +++ b/tests/test_build_runtime_fallback.py @@ -115,7 +115,7 @@ def test_the_loader_gets_the_stack_reserve_cmake_gives_it(self): cmake = (ROOT / "runtime" / "CMakeLists.txt").read_text(encoding="utf-8") reserve = re.search(r"set\(GTA6RT_STACK (\d+)\)", cmake).group(1) self.assertGreaterEqual(int(reserve), 8 * 1024 * 1024) - self.assertRegex(cmake, r"target_link_options\(gta6rt PRIVATE [^)]*/STACK:\$\{GTA6RT_STACK\}\)") + self.assertRegex(cmake, r"target_link_options\(gta6rt PRIVATE [^)]*/STACK:\$\{GTA6RT_STACK\}") lines = [line for line in self.body.splitlines() if "/Fe:gta6rt.exe" in line] self.assertEqual(len(lines), 1) self.assertRegex(lines[0], rf"/Fe:gta6rt\.exe /link (\S+ )*/STACK:{reserve}( |$)")