test: test_vcore_fs_open and test_vcore_video_acquire build again with env_on #2380

Merged
mooki000 merged 1 commit from test/vcore-video-acquire-env-on into main 2026-11-11 17:05:38 +00:00
mooki000 commented 2026-11-11 16:44:15 +00:00 (Migrated from github.com)

What this is for: main's game-free checks pass again. Since #2042 met #2301 and #2322 on main today, tests/test_vcore_fs_open.py and tests/test_vcore_video_acquire.py no longer compile, so tests/run_all.py fails on main (#1929). What is measured: the two tests with g++ and clang++ on this branch and on main without it, each test against the source from before the fix it guards, and the whole of tests/run_all.py on Arch Linux. Not measured: the Windows runners (llvm-mingw clang++, MSVC).

Problem

  • #2042 (merged 16:33 UTC) made env_on() in gpu/vk/compat/hookshot_env.h the rule for on/off switches. Among others it changed OpenFile's HOS_NO_MOVIES read in host/nn_fs.c and dec_acquire's HOS_VIDEO_NO_CATCHUP read in host/nn_video.c from getenv() to env_on(). It also gave every test that cuts code out of the sources the header, with -include.
  • #2301 (merged 16:35 UTC) and #2322 (16:36 UTC) each added a test that cuts one of those two functions out of its source file and compiles it in a fixture. Both pull requests were based on 49f75dc8, before #2042, where those lines still used getenv. Neither pull request's head had #2042 in it, and only the title check ran on either of them. #2042's own run could not have caught it either: neither test existed yet.
  • On main, the code the tests cut out calls env_on, and neither fixture declares it:
/tmp/vcore-video-.../fixture.cpp:159:28: error: use of undeclared identifier 'env_on'
/tmp/vcore-fs-open-.../fixture.cpp:77:24: error: use of undeclared identifier 'env_on'

(g++: error: 'env_on' was not declared in this scope, at the same lines.)

What changed

  • tests/test_vcore_fs_open.py, tests/test_vcore_video_acquire.py: ENV_ON_H and "-include", ENV_ON_H in the compile command. These are the same two lines #2042 added to the other tests that cut code out of the sources (tests/test_multiwait_wake.py, tests/test_guest_copies.py and others). Nothing else changed, and no source file.

How it was tested

Arch Linux, kernel 7.2.15, g++ 16.2.1, clang++ 23.1.3, 2026-11-11. Branch head f7fb1d3a on main b744b1ec.

  • Both tests on this branch, with g++ and clang++: ok.
  • The same tests on main b744b1ec, without this commit, with both compilers: the compile errors above.
  • Each test still catches what it was written for. Run against the source from after #2042 but before its own fix, it still fails, with both compilers. On nn_fs.c of b75f2c1b (before #2301): FAIL: host_path (where a prompt file is built at its first open) runs without the core. On nn_video.c of aab7daf2 (before #2322): FAIL: the decoding runs without the core and seven more.
  • The other tests that cut out the virtual-core code also pass here with both compilers: tests/test_vcore_escape.py (#2302, now on main), tests/test_invalidate_vcore.py and tests/test_multiwait_wake.py. So does #2340's tests/test_import_buffer_binding.py.
  • tests/run_all.py, run on this commit before its rebase onto b744b1ec (it was on f9286c45 then): 373 passed, 2 failed, 10 skipped. The two failures fail on this machine whatever the change: test_updater_asset_digest.py (only the .NET 10 SDK is installed here, and the fixture needs net8.0) and test_wayland_libdecor_hint.py (clang 23's -Wunused-but-set-global under -Werror). After the rebase I ran test_vcore_fs_open.py, test_vcore_video_acquire.py, test_vcore_escape.py and test_invalidate_vcore.py again with both compilers.

Not tested

  • Not run on Windows. The -include of this header is the same one #2042 gave the other tests.

Risks

  • Tests only. No source file and no build changes.

Fixes #2379.

Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 [email protected]

**What this is for:** main's game-free checks pass again. Since #2042 met #2301 and #2322 on main today, `tests/test_vcore_fs_open.py` and `tests/test_vcore_video_acquire.py` no longer compile, so `tests/run_all.py` fails on main (#1929). **What is measured:** the two tests with g++ and clang++ on this branch and on main without it, each test against the source from before the fix it guards, and the whole of `tests/run_all.py` on Arch Linux. **Not measured:** the Windows runners (llvm-mingw clang++, MSVC). ## Problem - #2042 (merged 16:33 UTC) made `env_on()` in `gpu/vk/compat/hookshot_env.h` the rule for on/off switches. Among others it changed OpenFile's `HOS_NO_MOVIES` read in `host/nn_fs.c` and `dec_acquire`'s `HOS_VIDEO_NO_CATCHUP` read in `host/nn_video.c` from `getenv()` to `env_on()`. It also gave every test that cuts code out of the sources the header, with `-include`. - #2301 (merged 16:35 UTC) and #2322 (16:36 UTC) each added a test that cuts one of those two functions out of its source file and compiles it in a fixture. Both pull requests were based on 49f75dc8, before #2042, where those lines still used `getenv`. Neither pull request's head had #2042 in it, and only the title check ran on either of them. #2042's own run could not have caught it either: neither test existed yet. - On main, the code the tests cut out calls `env_on`, and neither fixture declares it: ``` /tmp/vcore-video-.../fixture.cpp:159:28: error: use of undeclared identifier 'env_on' /tmp/vcore-fs-open-.../fixture.cpp:77:24: error: use of undeclared identifier 'env_on' ``` (g++: `error: 'env_on' was not declared in this scope`, at the same lines.) ## What changed - `tests/test_vcore_fs_open.py`, `tests/test_vcore_video_acquire.py`: `ENV_ON_H` and `"-include", ENV_ON_H` in the compile command. These are the same two lines #2042 added to the other tests that cut code out of the sources (`tests/test_multiwait_wake.py`, `tests/test_guest_copies.py` and others). Nothing else changed, and no source file. ## How it was tested Arch Linux, kernel 7.2.15, g++ 16.2.1, clang++ 23.1.3, 2026-11-11. Branch head f7fb1d3a on main b744b1ec. - Both tests on this branch, with g++ and clang++: `ok`. - The same tests on main b744b1ec, without this commit, with both compilers: the compile errors above. - Each test still catches what it was written for. Run against the source from after #2042 but before its own fix, it still fails, with both compilers. On `nn_fs.c` of b75f2c1b (before #2301): `FAIL: host_path (where a prompt file is built at its first open) runs without the core`. On `nn_video.c` of aab7daf2 (before #2322): `FAIL: the decoding runs without the core` and seven more. - The other tests that cut out the virtual-core code also pass here with both compilers: `tests/test_vcore_escape.py` (#2302, now on main), `tests/test_invalidate_vcore.py` and `tests/test_multiwait_wake.py`. So does #2340's `tests/test_import_buffer_binding.py`. - `tests/run_all.py`, run on this commit before its rebase onto b744b1ec (it was on f9286c45 then): 373 passed, 2 failed, 10 skipped. The two failures fail on this machine whatever the change: `test_updater_asset_digest.py` (only the .NET 10 SDK is installed here, and the fixture needs net8.0) and `test_wayland_libdecor_hint.py` (clang 23's `-Wunused-but-set-global` under `-Werror`). After the rebase I ran `test_vcore_fs_open.py`, `test_vcore_video_acquire.py`, `test_vcore_escape.py` and `test_invalidate_vcore.py` again with both compilers. ## Not tested - Not run on Windows. The `-include` of this header is the same one #2042 gave the other tests. ## Risks - Tests only. No source file and no build changes. Fixes #2379. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Arkex-ai commented 2026-11-11 16:46:26 +00:00 (Migrated from github.com)

Tested f7fb1d3a on Windows with llvm-mingw Clang: both fixtures compile and pass. Both also still reject their pre-fix production source (nn_fs.c at b75f2c1b, nn_video.c at aab7daf2) after compiling successfully, so the causal checks remain effective.

I reproduced the missing-env_on errors on clean main too. This covers the gap I was investigating; I'll leave the fix here rather than open another PR. MSVC and game/runtime behavior were not tested.

Tested `f7fb1d3a` on Windows with llvm-mingw Clang: both fixtures compile and pass. Both also still reject their pre-fix production source (`nn_fs.c` at `b75f2c1b`, `nn_video.c` at `aab7daf2`) after compiling successfully, so the causal checks remain effective. I reproduced the missing-`env_on` errors on clean main too. This covers the gap I was investigating; I'll leave the fix here rather than open another PR. MSVC and game/runtime behavior were not tested.
mooki000 commented 2026-11-11 16:48:25 +00:00 (Migrated from github.com)

Thanks @Arkex-ai, that is the Windows run I couldn't do here. MSVC is still untested, as you say.

Thanks @Arkex-ai, that is the Windows run I couldn't do here. MSVC is still untested, as you say.
hckrman101 (Migrated from github.com) approved these changes 2026-11-11 16:49:21 +00:00
hckrman101 (Migrated from github.com) left a comment

Looks good. #2301 and #2322 are both merged, and main (b744b1ec) still has neither -include in these two tests, so the fix is needed on main as it stands.

The diff is just the ENV_ON_H constant and -include ENV_ON_H in the compile line of both tests, the same as #2042 gave the other tests that cut code out of the sources. Path is already imported before the constant. Nothing is weakened: no assertions, fixtures or sources changed, and Arkex-ai's Windows llvm-mingw run (plus the author's causal checks against the pre-fix sources) shows both tests still reject the old code. MSVC remains untested, as noted.

CI: the appimage failure is the runner not resolving archive.ubuntu.com (apt), unrelated to this change. The rest was still pending when I looked.

Looks good. #2301 and #2322 are both merged, and main (b744b1ec) still has neither `-include` in these two tests, so the fix is needed on main as it stands. The diff is just the `ENV_ON_H` constant and `-include ENV_ON_H` in the compile line of both tests, the same as #2042 gave the other tests that cut code out of the sources. `Path` is already imported before the constant. Nothing is weakened: no assertions, fixtures or sources changed, and Arkex-ai's Windows llvm-mingw run (plus the author's causal checks against the pre-fix sources) shows both tests still reject the old code. MSVC remains untested, as noted. CI: the appimage failure is the runner not resolving archive.ubuntu.com (apt), unrelated to this change. The rest was still pending when I looked.
Commenting is not possible because the repository is archived.
No description provided.