summaryrefslogtreecommitdiff
path: root/tests/format/flat.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/format/flat.py')
-rw-r--r--tests/format/flat.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/format/flat.py b/tests/format/flat.py
index 4ab5aa2..6924e42 100644
--- a/tests/format/flat.py
+++ b/tests/format/flat.py
@@ -8,7 +8,9 @@
from chrysacase import ChrysalideTestCase
from pychrysalide.analysis import LoadedBinary
from pychrysalide.analysis.contents import MemoryContent
+from pychrysalide.arch import vmpa
from pychrysalide.format import FlatFormat
+from pychrysalide.glibext import BinPortion
class TestFlatFormat(ChrysalideTestCase):
@@ -25,6 +27,13 @@ class TestFlatFormat(ChrysalideTestCase):
fmt = FlatFormat(cnt)
fmt.set_machine('armv7')
+ base = vmpa(0, 0)
+
+ p = BinPortion(BinPortion.BPC_CODE, base, cnt.size)
+ p.rights = BinPortion.PAC_READ | BinPortion.PAC_EXEC
+
+ fmt.register_user_portion(p)
+
binary = LoadedBinary(fmt)
binary.analyze_and_wait()