tests: the stack reserve need not be the last link option (TEST-BUILD-FALLBACK-STACK-OPTION) #2618
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2618"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-11-29T17:49:14Z.
Rebased replacement for #2573.
ProjectLeonida/mandy@4364a4f.tests/test_build_runtime_fallback.py./STACK:${GTA6RT_STACK}.Mby159/leonida@backup/pr-2573-ae7a0936a6.AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T17:54:04Z.
Independent check of
c76c322bon4364a4fa6. The standalone fallback suite has ten passing cases and one Windows-only skip on Linux, on both unmodified trees. The new regex correctly accepts a valid option after/STACK:${GTA6RT_STACK}. It also accepts source that links a different reserve than the unchanged 8 MiB fallback.I ran the exact Python assertion with five CMake variants, then linked tiny Windows PEs using each variant’s actual
target_link_optionswith clang-cl/xwin and lld-link.llvm-readobjreported these reserves./INCREMENTAL:NO0directly to${GTA6RT_STACK}/STACK:16777216The existing PE check is a minimum check. I confirmed it rejects the 1 MiB case; it also accepts 16 and 80 MiB. Equality with the fallback still needs the static guard. One tested way to preserve it with the current flat CMake flag list is to split the option block and match the exact stack token once:
That passes the two 8 MiB cases, rejects all three mismatches, and passes the full standalone fallback suite with the same Linux skip. AI-assisted with OpenAI Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by Mby159 on 2026-11-29T17:59:04Z.
CI baseline comparison for the current red checks:
4364a4fa61f6bc42eefc94452c3a565fc530dd34already has failingsemantic-tests (ubuntu-latest),translator-tests,stdlib-tests-linux,check, andmacos-pythonjobs.semantic-testsfails intest_interp_computed_ij_fallback;translator-testsfails in sixtests/test_mesh_serial_waves.pycases. Neither file is touched by this PR.no-game-data,change-scope, andviewer-testspass.tests/test_build_runtime_fallback.py; local validation confirmed the old regex rejects a valid/STACKoption followed by another linker option, while the new regex accepts it.AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by Mby159 on 2026-11-29T18:08:02Z.
Updated head
eace3acd, with currentmain(eedd72e3) merged into the branch.The assertion now anchors
target_link_options(gta6rt ...)at line start, strips comments from the captured option list, and requires exactly one/STACK:${GTA6RT_STACK}token. This keeps the original equality check while allowing unrelated trailing linker options.Local validation: two valid variants pass (current flags; appended
/INCREMENTAL:NO), and three invalid variants are rejected (wrong reserve suffix, fully commented-out stack option, second overriding/STACK).AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T18:16:08Z.
Retested
eace3acdoneedd72e30against the same linked PE fixtures. Stock and the extra unrelated option pass at 8 MiB. The numeric suffix (80 MiB), commented-out option (1 MiB), and later CMake override (16 MiB) are now all rejected.One analogous case remains in the PowerShell fallback assertion. Appending
/stack:16777216after/STACK:8388608on the/Fe:gta6rt.exeline passes the Python check. A minimal PE linked with those two flags in that order withlld-linkhasSizeOfStackReserve = 16777216. Checking the complete list of stack options on both sides would close that gap. I tested replacing just the fallback assertion with:This rejects the fallback override and preserves the other six results. Both standalone runs on Linux passed 10 tests with one Windows-only skip. This used tiny synthetic PEs to verify the link flags. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by Mby159 on 2026-11-29T18:21:07Z.
Updated head
c680918.The PowerShell fallback assertion now partitions the
/linkflags and requires exactly one matching stack option, accepting both/STACK:and-STACK:spellings. Local validation passes the current flag, an unrelated trailing option, and-STACK; it rejects a later overriding/stackand a wrong reserve.AI-assisted: yes.
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T18:48:29Z.
Tested
c68091870merged (no commit) with main7c330c76d: Python 3.12.4, Windows 11 10.0.26300, CPU only.tests/test_build_runtime_fallback.py): 11 of 11 pass on the merge, 0 skipped.runtime/CMakeLists.txtstill puts/STACK:last. The change only lets the check accept/STACK:${GTA6RT_STACK}anywhere among thegta6rtlink options, and in the fallback/linkline, instead of last.git merge-treeagainst #2566's head7b5cb2941: no conflict.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:00:59Z.
Merging. Head
c68091870has red/green verdicts from reviewers other than the author (above), merges cleanly withmainb8346588d, does not force a rebase of #2566, and carries a claim ID. Remaining main CI reds (translator-testsmesh,semantic-testsf16) are pre-existing. Merged by MoonEyes.AI-assisted (Claude Code).