Scripts: harden pe_exports CLI argument handling, validation, and test coverage #1814
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1814
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@heditrigui on GitHub · 2026-11-24 21:04 UTC · original
heditrigui:scripts/pe-exports-cli-hardening→main· +242 −49 · 2 files · 1 commits · openSummary
Hardens CLI argument handling and validation in
scripts/re/pe_exports.pyand expands unit test coverage inscripts/test_pe_exports.py:-hand--helpCLI option support with usage docstrings and clean exit code 0.error: file not found: '<path>'on stderr and exits code 1) instead of crashing with unhandled Python exceptions.parse_exports(bytes)anddump_pe_exports(path)functions.scripts/test_pe_exports.pyfrom 1 to 8 tests covering CLI argument flags, exit codes, missing files, invalid PE binaries, and direct Python API parsing across both 32-bit (PE32) and 64-bit (PE32+) binaries.Tested
python -m unittest scripts/test_pe_exports.py(8 passed in 0.40s).python -m pytest scripts/(23 passed in 0.78s).scripts/pr_check.py --local.Not tested
scripts/tools are non-runtime code).AI use
@futurepro62 on GitHub · 2026-11-24 21:14 UTC · original
Tested exact head
0180bf4, script tests only, since this PR has no test report yet.Tested
python -m pytest scripts/test_pe_exports.pyat the head: 8 passed, 2 subtests passed.266b845): does not get to run: collection fails withFileNotFoundError: ... '-q', because main'spe_exports.pyreadssys.argv[1:]at import time (which this PR changes).Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.