From ab0cf7308e9fb0c5ddeb2e49da75193cd7d50304 Mon Sep 17 00:00:00 2001 From: Ajax Date: Tue, 17 Jul 2018 12:12:25 +0200 Subject: Add an example for LinuxEnvironment & Syscall handling --- test/test_all.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/test_all.py') 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"], -- cgit 1.4.1