WIP: test(lift): the guest context's two definitions are checked to agree on every PC #1572
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1572
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:test/guest-context"
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?
Type: test · Risk: low · Tested on: Windows 11, Ryzen 9 3900X · Needs: none
TL;DR
The translated game code's register state has a second copy of its layout for the emulator-hosted build, and the check that the two match only ran in that build, which nobody makes any more. This runs that same check on every PC. A field added to one side alone fails it.
Breakdown
nx2/rtgen.pyaddspoll; local registers and the CPU rework plan's contract touch it).nx2/rt/eden_shim.c's static asserts (SAME()per field and the size) compile only in the DLL build (nx2/build.py --dll).tests/test_guest_context.pywrites the generated header withrtgen.write, as the build does, and compiles those asserts, cut from the shim, against it andnx2/rt/mkw_host.h.310e7c9d; an extra field inMkwGuestContextalone fails it.Why
The wiki's CPU rework plan (milestone C2) asks for one definition of the guest context and a check that fails when a side differs. For the standalone game the definition is already one (the host includes the generated header). This covers the other copy.
What changed
tests/test_guest_context.py(new): cutseden_shim.cfrom#define SAME(f)up to its first function (tests/srccut.pybetween), writes the generateda64.hinto a temporary folder, gives the lift's two generated headers empty stand-ins (they are included after the context), and compiles with-fsyntax-only.Measurements
Verdict: nothing to measure: a check only.
Flags and settings
None.
Testing
Tested: on Windows 11 with the Builder's clang: passes on
310e7c9d(16 field asserts and the size). With auint64_t extra;added afterpollinMkwGuestContext: fails (exit status 1); put back: passes.Not tested: Linux.
Must be tested: None.
Risks
What could break: nothing in the game.
Turning it off: revert the commit.
Compatibility: nothing changes.
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main. On310e7c9d.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). This check passes; the full suite not run yet.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.