Skip to content

test(tools): cover audit_dump elf_type, stage and modules_of - #22247

Closed
Gruzzberry wants to merge 1 commit into
boykopovar:mainfrom
Gruzzberry:test/audit-dump-cases
Closed

Gruzzberry wants to merge 1 commit into
boykopovar:mainfrom
Gruzzberry:test/audit-dump-cases

Conversation

@Gruzzberry

Copy link
Copy Markdown
Contributor

What

Adds unit tests for tools/audit_dump.py helpers not yet covered: elf_type (header type, truncated header gives None), stage (plain ELF copied, non-ELF refused without leaving output) and modules_of (suffix match is case-insensitive, magic-detected files included, directories and other files ignored).

Tested

Windows 11, Python 3.13: python3 -m unittest discover -s tools/tests -p test_audit_dump.py ran 53 tests, OK (1 skipped). python3 tools/check_conventions.py --base upstream/main passed. tools/pr_overlap.py --branch did not finish (git fetch of PR heads exited 143 after 399/1669); gh pr list --search "audit_dump in:title" shows only #18448 (ctest timeouts), which does not touch this test file.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant