Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp Python regression tests suite #2022

Merged
merged 4 commits into from
Oct 13, 2024
Merged

Conversation

elicn
Copy link
Contributor

@elicn elicn commented Oct 6, 2024

Highlights:

  • All Python regression tests are now collectively managed and dispatched by a single centralized module called regress.py
    • Heavily modified most of the Python regression tests to adhere to unittest conventions
    • Added regress.logger to allow emitting logging output by log level
    • Adding new test is done simply by creating a new .py file in the same directory
    • Each test is standalone and may be ran directly
    • New test suite should support Python 2, but this was not tested

Known failures:

  • Modifying x86 EFLAGS will not take effect unless re-writing EIP/RIP (jumping.py)
  • Mapping memory to high addresses will fail on use rather than on map (mem_high_mapping.py)
  • Unicorn will segfault when calling mem_write to write to a location that was mapped only as UC_PROT_READ (hook_readonly_write_local.py)
  • Wrong exceptions raised, root cause is yet to be determined (mips_except.py)

@wtdcode
Copy link
Member

wtdcode commented Oct 13, 2024

Thanks!

@wtdcode wtdcode merged commit 9f57894 into unicorn-engine:dev Oct 13, 2024
33 checks passed
wtdcode pushed a commit that referenced this pull request Oct 13, 2024
* Fix Python regression test suite (partial)

* Fix Python regression test suite

* Add a test for mapping at high addresses

* Add ctl tests
@elicn elicn deleted the fix-regress branch October 13, 2024 07:46
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.

2 participants