PE tests: cover ImportLibrary::parse short imports and archive errors #1813
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1814"
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?
Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-24T22:57:18Z.
Adds synthetic COFF archive unit tests in
crates/victory-pe/src/implib.rscoveringCode/Data/Constshort imports, named and ordinal exports, sorting/deduplication,other_memberscounting, and invalid archive rejection.AI-assisted; verified with
rustfmt --check,cargo clippy -p victory-pe --all-targets --locked -- -D warnings, andcargo test -p victory-pe --locked(9 passed).Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:05:50Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae).cargo test -p victory-pe --locked → 5 passed, 4 failed — the 4 failures are the PRE-EXISTING macOS image::tests ones (test binary is Mach-O, parsed as PE; same on main), NOT this PR. The PR's own tests pass: implib::tests::parses_short_imports_sorts_dedups_and_counts_other_members + rejects_invalid_archive_header both ok. ImportLibrary::parse coverage for short imports and archive errors is exactly the missing PE coverage.
Imported from Marvisak/VIctory. Originally posted by Melow-code on 2026-11-24T23:07:32Z.
Review: APPROVED
Test-only PR, synthetic COFF archive covers short imports, sorting/dedup, and invalid-archive rejection. Clean.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T23:07:18Z.
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
Imported from Marvisak/VIctory. Originally posted by Headache3318 on 2026-11-25T01:28:28Z.
Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned by
rust-toolchain.toml). PR head32ad8f6applied cleanly onto currentmainccfb029.cargo test -p victory-pe --locked: 2 implib tests passed (the 4imagetests fail on Linux as expected, parsing the test binary as a PE); total 5 passed.cargo clippy -p victory-pe --all-targets --locked -- -D warnings: clean.Not tested: Windows MSVC build, the title itself. AI-assisted.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:36:47Z.
Automated triage for the maintainers.
Proposed close: already covered in main. Update after your reply: thanks for dropping the duplicate helpers. Both of the new tests in
crates/victory-pe/src/implib.rsrepeat cases thatmain'smod testsalready checks:malformed_short_import_counts_as_other_member:members_that_are_not_import_objects_are_countedalready has ashort.lib/member, animport_objecttruncated to 24 bytes, and asserts that it lands inother_members.named_import_normalizes_hint_to_zero:parses_named_code_importsalready buildsExitProcesswith hint 7 and assertshint: 0, with a comment explaining why.A test for a path
ImportLibrary::parsedoes not cover yet would change the verdict. One example is a member whoseArchiveFiledata cannot be read, so the?propagates an error.CI: passing (
check).This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-25T01:45:57Z.
@Marvisak, rebased onto the current main and resolved the conflict in crates/victory-gpu/src/descriptor/host.rs.
Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-25T06:43:17Z.
@Marvisak, updated
test/pe-implib(8e6b116):push_member/short_importhelpers and the tests already covered inmain.main'sarchive/import_objecthelpers for casesImportLibrary::parsedidn't cover yet:malformed_short_import_counts_as_other_member: verifies a truncated short-import header incrementsother_membersinstead of failingImportLibrary::parse.named_import_normalizes_hint_to_zero: verifies named imports normalize a non-zeroordinal_or_hinttohint: 0.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.