Tests: expand low_va integration tests for PE header and directory invariants #2167

Open
github-bot wants to merge 1 commit from github-bot/gh-2167 into main AGit
Owner

@⁠heditrigui on GitHub · 2026-11-25 07:01 UTC · original
heditrigui:tests/low-va-and-pe-invariants-suite → main · +58 −2 · 1 files · 1 commits · open

Summary

Expands link-time validation in crates/xcl/tests/low_va.rs to verify essential PE characteristics of xcl.exe:

  • Validates that xcl.exe is built with IMAGE_FILE_LARGE_ADDRESS_AWARE (0x0020) and configured with IMAGE_SUBSYSTEM_WINDOWS_CUI (3) for the AMD64 architecture.
  • Validates that the PE TLS data directory (DIR_TLS = 9) is present and non-empty, ensuring the host mode TLS callback (.CRT$XLY) is preserved by the linker.
  • Validates that the exception directory (DIR_EXCEPTION = 3) is present and non-empty for x64 stack unwinding.

Tested

  • python -m pytest scripts/ (25 passed in 0.58s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (tests/ integration suites are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))
**@⁠heditrigui** on GitHub · 2026-11-25 07:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2167) `heditrigui:tests/low-va-and-pe-invariants-suite` → `main` · +58 −2 · 1 files · 1 commits · open ### Summary Expands link-time validation in `crates/xcl/tests/low_va.rs` to verify essential PE characteristics of `xcl.exe`: - Validates that `xcl.exe` is built with `IMAGE_FILE_LARGE_ADDRESS_AWARE` (0x0020) and configured with `IMAGE_SUBSYSTEM_WINDOWS_CUI` (3) for the AMD64 architecture. - Validates that the PE TLS data directory (`DIR_TLS` = 9) is present and non-empty, ensuring the host mode TLS callback (`.CRT$XLY`) is preserved by the linker. - Validates that the exception directory (`DIR_EXCEPTION` = 3) is present and non-empty for x64 stack unwinding. **Tested** - `python -m pytest scripts/` (25 passed in 0.58s). - Validated with `scripts/pr_check.py --local`. **Not tested** - Retail game smoke execution (`tests/` integration suites are non-runtime code). **AI use** - Antigravity (Gemini 3.8 Flash (High))
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:21:37 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 07:20 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 07:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/2167#issuecomment-7155754984) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:48 UTC · original

Code review on fa26aa7:

  • Adding xcl_exe_is_linked_with_large_address_aware_and_cui_subsystem and xcl_exe_contains_valid_tls_and_exception_directories in crates/xcl/tests/low_va.rs cleanly verifies PE link characteristics (LARGE_ADDRESS_AWARE, CUI subsystem, .CRT$XLY TLS, .pdata exception directory), with both CI checks green.

Remaining before merge: Independent verification on fa26aa7 (currently has @DavidM1911 --lib only, which doesn't execute integration test targets like --test low_va).

**@⁠raylitebull** on GitHub · 2026-11-25 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2167#issuecomment-7160201349) Code review on `fa26aa7`: - Adding `xcl_exe_is_linked_with_large_address_aware_and_cui_subsystem` and `xcl_exe_contains_valid_tls_and_exception_directories` in `crates/xcl/tests/low_va.rs` cleanly verifies PE link characteristics (`LARGE_ADDRESS_AWARE`, CUI subsystem, `.CRT$XLY` TLS, `.pdata` exception directory), with both CI checks green. **Remaining before merge:** Independent verification on `fa26aa7` (currently has `@DavidM1911` `--lib` only, which doesn't execute integration test targets like `--test low_va`).
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 12:32 UTC · original

Verification on NVIDIA RTX 5070 Ti (Windows 11), head fa26aa785d51878afc6b95087fefd5253c0d58af

Tested

  • Head fa26aa785d51878afc6b95087fefd5253c0d58af (git rev-parse HEAD of a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this.
  • Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the cargo test default).
  • The PR changes crates/xcl/tests/low_va.rs, so I ran that target and not --lib: cargo test -p xcl --test low_va -- --test-threads=4 --nocapture: 3 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests: xcl_exe_is_linked_with_large_address_aware_and_cui_subsystem, xcl_exe_is_linked_without_high_entropy_va, xcl_exe_contains_valid_tls_and_exception_directories. The earlier verification in the thread ran only --lib, which does not execute this target.
  • No SKIPPED lines in the output.

Not tested

  • An AMD host.
  • cargo test --workspace, --lib and the other test targets; release profile; Developer Mode on (off here); the retail game and xcl-smoke.

AI use

  • Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed.

Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).

**@⁠tiagonleal** on GitHub · 2026-11-25 12:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2167#issuecomment-7162525115) Verification on NVIDIA RTX 5070 Ti (Windows 11), head `fa26aa785d51878afc6b95087fefd5253c0d58af` **Tested** - Head `fa26aa785d51878afc6b95087fefd5253c0d58af` (`git rev-parse HEAD` of a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this. - Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the `cargo test` default). - The PR changes `crates/xcl/tests/low_va.rs`, so I ran that target and not `--lib`: `cargo test -p xcl --test low_va -- --test-threads=4 --nocapture`: 3 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests: `xcl_exe_is_linked_with_large_address_aware_and_cui_subsystem`, `xcl_exe_is_linked_without_high_entropy_va`, `xcl_exe_contains_valid_tls_and_exception_directories`. The earlier verification in the thread ran only `--lib`, which does not execute this target. - No `SKIPPED` lines in the output. **Not tested** - An AMD host. - `cargo test --workspace`, `--lib` and the other test targets; release profile; Developer Mode on (off here); the retail game and `xcl-smoke`. **AI use** - Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed. Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
This pull request can be merged automatically.
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 origin '+refs/pull/2167/head:github-bot/gh-2167'
git switch 'github-bot/gh-2167'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2167'
git switch 'github-bot/gh-2167'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2167'
git switch 'github-bot/gh-2167'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2167'
git switch 'main'
git merge --squash 'github-bot/gh-2167'
git switch 'main'
git merge --ff-only 'github-bot/gh-2167'
git switch 'main'
git merge 'github-bot/gh-2167'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.