[PR #1098] [CLOSED] tests: check the startup argv snapshot on Wine (TEST-CRT-ARGV-WINE) #1134

Closed
opened 2026-11-26 20:20:12 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1098
Author: @Moriz82
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: split/test-crt-argv-wine


📝 Commits (1)

  • 8bfdb66 tests: check the startup argv snapshot on Wine (TEST-CRT-ARGV-WINE)

📊 Changes

1 file changed (+19 additions, -3 deletions)

View changed files

📝 runtime/test/fixtures/tiny_startup_cmdline.cpp (+19 -3)

📄 Description

Claimed in the coordination issue as: TEST-CRT-ARGV-WINE (claim).

Part of the split of #984 into small pull requests.

Depends on: none
Overlaps: #984 (integration source). No separate open or merged change to this fixture was found.

What and why

The direct reference executable fails before the loader runs. Wine's UCRT can populate both argument vectors before the process-attach callback. The fixture now accepts that state on Wine only when the count, argument widths and each argument match at entry. Both command-line strings still have to match. Native Windows keeps the existing checks for an unconfigured UCRT at attach.

Tested

Cross-built the runtime, fixture DLL and fixture executable with clang-cl 23 and the xwin SDK. The same Proton Experimental prefix and Microsoft Visual C++ 2022 redistributable were used for the red and green runs. The loader used the redistributable's C++ DLLs from its application directory; the fixture still used Proton's UCRT.

export WINEPATH="$VC_RUNTIME_DIR"   # Windows path to the x64 redistributable DLLs
export WINEDLLOVERRIDES="msvcp140,msvcp140_1,msvcp140_2,msvcp140_atomic_wait,msvcp140_codecvt_ids,vcruntime140,vcruntime140_1=n,b"
cmake --build runtime/build/boot --target gta6rt tiny_startup_cmdline tiny_startup_cmdline_dll -j6
ctest --test-dir runtime/build/boot -j1 -R '^run_startup_cmdline$' --output-on-failure
python3 -I scripts/check_no_game_data.py runtime/test/fixtures/tiny_startup_cmdline.cpp
git diff --check
  • Base 94daa515f passed 0/1 tests. The direct executable returned 1 in the argument case and printed tiny_startup_cmdline: FAIL.
  • Child passed 1/1 tests. Five process invocations cover direct and loaded execution with arguments, both without arguments, and a rejected DLL attach. The negative control checks the error message, import report, exit code and that the entry point was never called.
  • Under stock Proton the four positive invocations passed with the change. The failed-attach control received the generic C++ exception message Unknown exception. Using the application-local Microsoft C++ runtime preserves the original diagnostic. The negative assertion was retained.
  • Tested on CachyOS, Linux 7.3, Ryzen 5 5600X and 16 GB RAM. Native Windows, AMD GPU and Intel GPU runs were not performed.

GPUs tested: none. This is a CPU fixture.
AI-assisted: yes

Checklist

  • Based on current upstream main at the cut. Merge check passed against the subsequently fetched main.
  • One test fixture and one topic.
  • Content guard and whitespace check passed.
  • No translator rule changed.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1098 **Author:** [@Moriz82](https://github.com/Moriz82) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `split/test-crt-argv-wine` --- ### 📝 Commits (1) - [`8bfdb66`](https://github.com/ubiquitarianism/leonida/commit/8bfdb666253e7e7a5cdc9e91d0e8b9a161c0d046) tests: check the startup argv snapshot on Wine (TEST-CRT-ARGV-WINE) ### 📊 Changes **1 file changed** (+19 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/fixtures/tiny_startup_cmdline.cpp` (+19 -3) </details> ### 📄 Description Claimed in the coordination issue as: TEST-CRT-ARGV-WINE ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140533204)). Part of the split of #984 into small pull requests. Depends on: none Overlaps: #984 (integration source). No separate open or merged change to this fixture was found. ### What and why The direct reference executable fails before the loader runs. Wine's UCRT can populate both argument vectors before the process-attach callback. The fixture now accepts that state on Wine only when the count, argument widths and each argument match at entry. Both command-line strings still have to match. Native Windows keeps the existing checks for an unconfigured UCRT at attach. ### Tested Cross-built the runtime, fixture DLL and fixture executable with clang-cl 23 and the xwin SDK. The same Proton Experimental prefix and Microsoft Visual C++ 2022 redistributable were used for the red and green runs. The loader used the redistributable's C++ DLLs from its application directory; the fixture still used Proton's UCRT. ```sh export WINEPATH="$VC_RUNTIME_DIR" # Windows path to the x64 redistributable DLLs export WINEDLLOVERRIDES="msvcp140,msvcp140_1,msvcp140_2,msvcp140_atomic_wait,msvcp140_codecvt_ids,vcruntime140,vcruntime140_1=n,b" cmake --build runtime/build/boot --target gta6rt tiny_startup_cmdline tiny_startup_cmdline_dll -j6 ctest --test-dir runtime/build/boot -j1 -R '^run_startup_cmdline$' --output-on-failure python3 -I scripts/check_no_game_data.py runtime/test/fixtures/tiny_startup_cmdline.cpp git diff --check ``` - Base `94daa515f` passed 0/1 tests. The direct executable returned 1 in the argument case and printed `tiny_startup_cmdline: FAIL`. - Child passed 1/1 tests. Five process invocations cover direct and loaded execution with arguments, both without arguments, and a rejected DLL attach. The negative control checks the error message, import report, exit code and that the entry point was never called. - Under stock Proton the four positive invocations passed with the change. The failed-attach control received the generic C++ exception message `Unknown exception`. Using the application-local Microsoft C++ runtime preserves the original diagnostic. The negative assertion was retained. - Tested on CachyOS, Linux 7.3, Ryzen 5 5600X and 16 GB RAM. Native Windows, AMD GPU and Intel GPU runs were not performed. GPUs tested: none. This is a CPU fixture. AI-assisted: yes ### Checklist - [x] Based on current upstream main at the cut. Merge check passed against the subsequently fetched main. - [x] One test fixture and one topic. - [x] Content guard and whitespace check passed. - [x] No translator rule changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:12 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
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
starred/leonida#1134
No description provided.