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

Hotspot tests: mock process memory reading #81

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

athre0z
Copy link
Member

@athre0z athre0z commented Jul 10, 2024

The TestJavaSymbolExtraction test would previously fail when running under qemu-user: if the application is running under emulation, the pointer addresses don't actually correspond to real memory addresses, so if the applications peeks through the curtains of emulation via process_vm_read, it would read back the wrong values. This PR replaces the real memory read with a mocked one from an array.

(Revived version of #73 that got auto-closed due to #76)

The real deal doesn't work if the test executable is running under
qemu-user emulation.
@athre0z athre0z marked this pull request as ready for review July 10, 2024 14:39
@athre0z athre0z requested a review from rockdaboot July 10, 2024 17:55
@athre0z athre0z merged commit 0e596c3 into main Jul 11, 2024
12 checks passed
@athre0z athre0z deleted the joel/hotspot-test-memory-mocking branch July 11, 2024 11:08
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.

3 participants