open-obfuscator / o-mvll

:electron: O-MVLL is a LLVM-based obfuscator for native code (Android & iOS)
https://obfuscator.re/omvll
Apache License 2.0
617 stars 66 forks source link

Basic example for execution test on host machine #14

Closed weliveindetail closed 1 year ago

weliveindetail commented 1 year ago

Execution tests can be tricky to run on build bots, but it might be useful to have them in order to check that obfuscations produce valid executables. As a first step, this patch shows how to implement a primitive execution test that runs on the host machine. In the future we probably want to run execution in emulated environments like QEMU. There are a few open TODOs as well, but it should be good enough to see if the basics work and get a better understanding of potential issues.

weliveindetail commented 1 year ago

FYI in order to avoid churn in the upstream repo, I checked that the execution test passes in the GitHub action before merging this: https://github.com/build38/o-mvll/actions/runs/5153519285 And it does:

PASS: O-MVLL Tests :: passes/flattening/basic-native.c (4 of 6)