test(mods): the size table check's fixture gives prompts.c the settings file it reads since #729 #866

Open
zeldaootr wants to merge 1 commit from zeldaootr/Longshot:fix-mods-size-table-check-options-file into main
Contributor

Type: test · Risk: low · Tested on: Linux x86-64, no GPU (game-free check) · Needs: none

Why

tests/test_mods_size_table.py has failed on main on Linux since #729: its fixture no longer links, so the check that a mod's resource size table keeps the button prompts' font (the Switch's icons in every text otherwise) has not run at all. The product is right; the fixture lacks the one function host/prompts.c calls since that merge. The Windows sweep of red checks does not see it, since the check's part that builds prompts.c runs on Linux only. I searched the open pull requests, the issues and the team chat: nothing covers it.

How to reproduce

Seen on: Linux (Ubuntu 24.04), no GPU; gcc 13.3 and clang 23.1.5
Settings and switches: none
Steps: on main aa95d35f, run python -I -B tests/test_mods_size_table.py --cc gcc
Expected: the merge checks, the 6 documented RomFS example checks and the 10 routing cases ok, as at 370cd0e0, the commit before #729
Actual: the fixture fails to link: prompts.c: in function choose_face: undefined reference to hos_options_file, and the check stops with CalledProcessError after the merge checks

What changed

Test-only: the routing fixture defines hos_options_file() as the game answers it when started without --user, the game folder's longshot_options.ini, which is where each case already writes button_prompts=2. host/prompts.c and host/mods.c are still compiled as they are; no product file changes, and no assertion changes.

  • tests: tests/test_mods_size_table.py routing_checks(): the fixture's main.c gains hos_options_file() (beside the game, from TEST_GAME_EXE), as tests/test_walk_key.py and tests/test_bound_keys.py stand it in.

Measurements

Verdict: nothing to measure in the game: a test-only change. The check fails on main aa95d35f and passes on this PR, with gcc and clang, two interleaved rounds.

Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; Python 3.15, gcc 13.3, clang 23.1.5
Scene: no game: the game-free check
Method: the check run alone, round 1 on main then this branch with each compiler, round 2 the same again; whether the fixture links and how many ok lines it prints
How to reproduce: python -I -B tests/test_mods_size_table.py --cc gcc (and --cc clang) on each commit

Before: main @ aa95d35f After: this PR @ 462cb072
gcc, round 1 / round 2 link fails (1 of 8 ok) / link fails 8 of 8 ok / 8 of 8 ok
clang, round 1 / round 2 link fails (1 of 8 ok) / link fails 8 of 8 ok / 8 of 8 ok
main@aa95d35f:   prompts.c:(.text+0x8eb): undefined reference to `hos_options_file' / collect2: error: ld returned 1 exit status / ok: merge_restbl: ... / subprocess.CalledProcessError (exit 1)
main@9e6f231d (#729): the same undefined reference (exit 1); main@370cd0e0, the commit before: 8 ok (exit 0)
this PR@462cb072: ok: merge_restbl: the larger entry of each file, entries of one side kept, sorted; 7 unmergeable tables refused / 6 x ok: documented RomFS example: ... / ok: 10 cases served as they should: ... (no zstandard: compressed frames not tried) (exit 0)

Flags and settings

None

Testing

Tested: Linux x86-64, the check alone on main aa95d35f and on this branch, two interleaved rounds, with gcc 13.3 and clang 23.1.5: it fails to link on main and passes here. It passes at 370cd0e0 and fails at 9e6f231d (#729), which is what turned it red.

Not tested: Windows and macOS: there the check runs only its merge part, which never built choose_face(), and skips the routing part, so nothing changes for them. The zstandard cases (compressed size tables): the package isn't installed here, so the check skips them, on main as on this branch. The full python -I -B tests/run_all.py on this branch (see the checklist).

Must be tested: None

Risks

What could break: only this check.

Turning it off: revert the commit

Compatibility: Nothing changes

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). 529 passed, 14 failed, 50 skipped on Linux with g++. All 14 also fail on main on this PC: test_appimage_player_build, test_bake_portability, test_cpm_discovery, test_crash_dialog, test_env_on, test_lift_cache, test_lift_cleanup_error, test_make_game_cache, test_options_budget_once, test_pipeline_tour, test_readback_late, test_vk_pgo, test_walk_key, nx2/test_texture_init_barrier. test_mods_size_table, red on main, passes here.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
**Type:** test · **Risk:** low · **Tested on:** Linux x86-64, no GPU (game-free check) · **Needs:** none ## Why `tests/test_mods_size_table.py` has failed on `main` on Linux since https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/729: its fixture no longer links, so the check that a mod's resource size table keeps the button prompts' font (the Switch's icons in every text otherwise) has not run at all. The product is right; the fixture lacks the one function `host/prompts.c` calls since that merge. The Windows sweep of red checks does not see it, since the check's part that builds `prompts.c` runs on Linux only. I searched the open pull requests, the issues and the team chat: nothing covers it. ## How to reproduce **Seen on:** Linux (Ubuntu 24.04), no GPU; gcc 13.3 and clang 23.1.5 **Settings and switches:** none **Steps:** on `main` aa95d35f, run `python -I -B tests/test_mods_size_table.py --cc gcc` **Expected:** the merge checks, the 6 documented RomFS example checks and the 10 routing cases `ok`, as at 370cd0e0, the commit before #729 **Actual:** the fixture fails to link: `prompts.c: in function choose_face: undefined reference to hos_options_file`, and the check stops with `CalledProcessError` after the merge checks ## What changed Test-only: the routing fixture defines `hos_options_file()` as the game answers it when started without `--user`, the game folder's `longshot_options.ini`, which is where each case already writes `button_prompts=2`. `host/prompts.c` and `host/mods.c` are still compiled as they are; no product file changes, and no assertion changes. - tests: `tests/test_mods_size_table.py` `routing_checks()`: the fixture's `main.c` gains `hos_options_file()` (beside the game, from `TEST_GAME_EXE`), as `tests/test_walk_key.py` and `tests/test_bound_keys.py` stand it in. ## Measurements **Verdict:** nothing to measure in the game: a test-only change. The check fails on `main` aa95d35f and passes on this PR, with gcc and clang, two interleaved rounds. Hardware: Linux (Ubuntu 24.04, kernel 6.8), x86-64, no GPU used; Python 3.15, gcc 13.3, clang 23.1.5 Scene: no game: the game-free check Method: the check run alone, round 1 on main then this branch with each compiler, round 2 the same again; whether the fixture links and how many `ok` lines it prints How to reproduce: `python -I -B tests/test_mods_size_table.py --cc gcc` (and `--cc clang`) on each commit | | Before: main @ aa95d35f | After: this PR @ 462cb072 | |---|---|---| | gcc, round 1 / round 2 | link fails (1 of 8 `ok`) / link fails | 8 of 8 `ok` / 8 of 8 `ok` | | clang, round 1 / round 2 | link fails (1 of 8 `ok`) / link fails | 8 of 8 `ok` / 8 of 8 `ok` | ``` main@aa95d35f: prompts.c:(.text+0x8eb): undefined reference to `hos_options_file' / collect2: error: ld returned 1 exit status / ok: merge_restbl: ... / subprocess.CalledProcessError (exit 1) main@9e6f231d (#729): the same undefined reference (exit 1); main@370cd0e0, the commit before: 8 ok (exit 0) this PR@462cb072: ok: merge_restbl: the larger entry of each file, entries of one side kept, sorted; 7 unmergeable tables refused / 6 x ok: documented RomFS example: ... / ok: 10 cases served as they should: ... (no zstandard: compressed frames not tried) (exit 0) ``` ### Flags and settings None ## Testing **Tested:** Linux x86-64, the check alone on `main` aa95d35f and on this branch, two interleaved rounds, with gcc 13.3 and clang 23.1.5: it fails to link on `main` and passes here. It passes at 370cd0e0 and fails at 9e6f231d (#729), which is what turned it red. **Not tested:** Windows and macOS: there the check runs only its merge part, which never built `choose_face()`, and skips the routing part, so nothing changes for them. The `zstandard` cases (compressed size tables): the package isn't installed here, so the check skips them, on `main` as on this branch. The full `python -I -B tests/run_all.py` on this branch (see the checklist). **Must be tested:** None ## Risks **What could break:** only this check. **Turning it off:** revert the commit **Compatibility:** Nothing changes ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). 529 passed, 14 failed, 50 skipped on Linux with g++. All 14 also fail on `main` on this PC: `test_appimage_player_build`, `test_bake_portability`, `test_cpm_discovery`, `test_crash_dialog`, `test_env_on`, `test_lift_cache`, `test_lift_cleanup_error`, `test_make_game_cache`, `test_options_budget_once`, `test_pipeline_tour`, `test_readback_late`, `test_vk_pgo`, `test_walk_key`, `nx2/test_texture_init_barrier`. `test_mods_size_table`, red on `main`, passes here. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
test(mods): the size table fixture gives prompts.c the settings file it reads since #729
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
380d42a92b
`host/prompts.c` opens `hos_options_file()` (`host/options_path.c`) for `button_prompts=` since 9e6f231d (#729), and the routing fixture had no such function, so it failed to link and the check went red on main. The fixture now answers as the game does without `--user`: the game folder's `longshot_options.ini`, where each case writes it.

Assisted-by: Claude
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix-mods-size-table-check-options-file:zeldaootr-fix-mods-size-table-check-options-file'
git switch 'zeldaootr-fix-mods-size-table-check-options-file'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!866
No description provided.