WIP: test: the checks mod-api fails only on Windows pass there: their stand-ins follow the branch's host code #2826
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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!2826
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:fix/mod-api-win-checks"
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?
Summary
For #2822 (into
mod-api). Seven game-free checks fail onmod-apion Windows and pass onmainat the merge base. Their stand-ins and fixtures don't yet follow what the branch changed in the host code, or they assume POSIX. Tests only, no product code:mod-api, Windowstest_audio_output_devicesld.lld: error: undefined symbol: game_setting_line(options_path.h'shos_options_linenow asks the game)game_setting_linethat reads the test'slongshot_options.iniline, as the file didtest_audio_source_load'sandbox_win_plan.h' file not found(romfs_index.c's Windows side)sandbox_win_plan.handsandbox_plan.hcopied in with the other host filestest_windows_stopimplicit declaration of function 'hos_sandbox_in_container'test_present_sitescall to undeclared function 'unsetenv'_putenv("NAME=")on Windows, in the fixturetest_dev_packspacks: through the builder beside it, when it has one(the fixture writeslongshot-builder, which Windows'BUILDER_NAMESnever matches)BUILDER_NAMES(longshot-builder.exeon Windows)test_longshot_ctlKeyError: 'game_path';shot_stagereturnsNoneShotStaging's two staging tests skipped on Windows, asshot_stagedocuments (a named pipe has no folder: nothing is staged); its third runs there and checks the client takes nothing the game names; the session's shot is checked without the staged path theretest_menu_hooksthe dlss lock by key is not lock_dlss: the same line at two addressesTesting
Tested: Windows 11 (llvm-mingw clang, MSYS2's tools),
mise run test -- <check>for each of the seven: each fails onmod-api@eaf4a48bas the table says, and passes here. They also pass on Linux (WSL Ubuntu 24.04,tests/run_all.py --strict).mise run lintpasses.Two sandbox checks added since.
windows_stop's confined case fails with the rule's line taken out ofhost/hos_relaunch.cand passes with it in.ShotStaging's staging tests are Windows-less and its third runs on Windows, where the player's file the game names elsewhere is neither read nor removed. Both pass on Windows and Linux.Still to test: None.
Measurements
Nothing to measure: tests only.
Risks
The sandbox: tests only, and the sandbox's checks come out stronger.
windows_stopnow checks the AppContainer's rule that a confined game the builder didn't restart only exits (it starts no process); with that rule's line taken out ofhost/hos_relaunch.c, the check fails.longshot_ctl's shot check runs on Windows too, for what holds there: the dev tool reads, moves and removes nothing the game names. Theaudio_source_loadfixture copies the sandbox's plan header as it is.None for players: only
tests/changes, and no check is weakened. Each still checks what it checked on Linux, and on Windows what it can. A revert is enough.Checklist
Ready for review
mod-api(#2822's head); the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (These seven pass.test_sampler_admission's concurrent cases also fail onmainon this PC, as a flake. Other failures onmod-apialso fail onmain, or need an MSVC host build, which is not fixed here.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Each failed on Windows (mise run test, llvm-mingw clang, Windows 11) and passed on main at the merge base; each passes here on Windows and on Linux: - audio_output_devices: options_path.h's hos_options_line now asks the game's game_setting_line: a stand-in that reads the test's longshot_options.ini line, as the file did (was: ld.lld undefined symbol game_setting_line); - audio_source_load: romfs_index.c's Windows side includes sandbox_win_plan.h (and sandbox_plan.h): both copied in (was: 'sandbox_win_plan.h' file not found); - windows_stop: hos_window_closed_exit's Windows side asks hos_sandbox_in_container: a stand-in, not confined (was: implicit declaration of hos_sandbox_in_container); - present_sites: the fixture's unsetenv, which Windows' C runtime lacks, is _putenv("NAME=") there (was: call to undeclared function 'unsetenv'); - dev_packs: the builder beside an older runtime is named as BUILDER_NAMES names it, longshot-builder.exe on Windows (was: "packs: through the builder beside it, when it has one"); - longshot_ctl: ShotStaging skipped on Windows, where a named pipe has no folder and nothing is staged (shot_stage is None there by design), and the session's shot checked without the staged path there (was: KeyError 'game_path', shot_stage None); - menu_hooks: the dlss lock's line compared as text: it is made again at each call, and Windows' heap gives the new one another address than the first (was: "the dlss lock by key is not lock_dlss", same text at two addresses). Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 <[email protected]>501c6cab0d5642e46e59Rebased onto mod-api's new squash
eaf4a48b(the same tree as9e6b9c57, which this branch was on): the diff is this PR's own commits again. The checks and runs above hold as they are (the tree under them is unchanged); the description's commits are the new ones.acc20f25ee8c26aa677cPushed two sandbox checks: windows_stop now checks the AppContainer's rule that a confined game the builder did not restart only exits (it starts no process); the check fails with that rule's line taken out of host/hos_relaunch.c. ShotStaging's two staging tests alone are skipped on Windows; its third runs there and checks the client reads, moves and removes nothing the game names. Both pass on Windows and Linux. Risks says how this stands with the sandbox.
8c26aa677c24a7b4cd6aRebased onto mod-api's newest (
4cc50ca1: main's newest merged in), with no conflict; this PR's own checks were run again on the rebased head and pass as before. The merge touched none of this PR's files (#2827: only a comment in host/hos_main.c, far from its change), so the measurements and runs above hold; the After commit is the rebased head.24a7b4cd6a71f97aeb7fRebased onto
mod-api@816d2354(#2837, headless shots of the mods' UI), now71f97aeb. No conflict, and the diff is the same as before (samegit patch-id). #2837 touches none of this PR's files. #2837 changesvk_menu,vk_replayand two checks near this PR's, so on the rebased head I rantest_menu_hooks,test_audio_output_devices,test_present_sites,test_fps_overlay_orderandtest_ui_rendereron Windows: 5 passed.71f97aeb7ff4cd59630df4cd59630de68510ff9fRebased onto
mod-api@c5e5b676: it was re-squashed onto main @46291934(#2833) twice today (cdbb8551, thenc5e5b676), which made this PR show main's and the whole mod API's diff. Nowe68510ff, the same diff as before (samegit patch-id), no conflict. The changes underneath touch none of this PR's files, so its checks still hold.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.