about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/core/locationdb.py5
-rwxr-xr-xtest/test_all.py13
2 files changed, 18 insertions, 0 deletions
diff --git a/test/core/locationdb.py b/test/core/locationdb.py
index b9a5f707..61bc4563 100644
--- a/test/core/locationdb.py
+++ b/test/core/locationdb.py
@@ -92,6 +92,11 @@ loc_key5_bis = loc_db.get_or_create_name_location(name3)
 assert loc_db.get_name_location(name3) == loc_key5_bis
 loc_db.consistency_check()
 
+# Name and offset manipulation
+assert loc_db.get_name_offset(name2) is None
+assert loc_db.get_name_offset("unk_name") is None
+assert loc_db.get_name_offset("first_name") == 0x5678
+
 # Merge
 loc_db2 = LocationDB()
 loc_db2.add_location(offset=0x3344)
diff --git a/test/test_all.py b/test/test_all.py
index 3fb0a5b7..9bf54608 100755
--- a/test/test_all.py
+++ b/test/test_all.py
@@ -1,6 +1,7 @@
 #! /usr/bin/env python2
 
 import argparse
+from distutils.spawn import find_executable
 import time
 import os
 import tempfile
@@ -686,6 +687,18 @@ for jitter in ExampleJitter.jitter_engines:
                              ["--jitter", jitter],
                              products=[Example.get_sample("box_upx_exe_unupx.bin")],
                              tags=tags.get(jitter, []))
+    if jitter != "python":
+        tags = tags.get(jitter, []) + [TAGS["long"]]
+        ls_path = find_executable("ls")
+        file_path = find_executable("file")
+        # Launch simulation of "file /bin/ls", with access to libs and ld info
+        testset += ExampleJitter(["run_with_linuxenv.py", "-v", "-p",
+                                  '/(.*lib.*\.so(\.\d+)?)|(/etc/ld.so.*)|(.*magic.*)|(%s)' % ls_path,
+                                  ] + ["--jitter", jitter] + [
+                                      file_path, ls_path,
+                                  ],
+                                 tags=tags)
+
 
 for script, dep in [(["x86_32.py", Example.get_sample("x86_32_sc.bin")], []),
                     (["arm.py", Example.get_sample("md5_arm"), "--mimic-env"],