Commit Graph

25 Commits

Author SHA1 Message Date
Stephen
da21bd0589 Start moving examples in S files (#851)
* Move assembly to S files

* more assembly files

* osx compilation change

* makefile mistake

* add objcopy from crosstool

* use gobjcopy on osx

* start cmocka install cleanup

* move wget to directory option

* move back to cd

* fix copy

* First cut

* free allocated memory

* bad idea

too much switching between python and c

* add debug

* cleanup bad size
2017-06-25 10:14:22 +08:00
Stephen
7f116846c0 MSYS test (#852)
* MSYS test

using new cmocka msys package

* Update .appveyor.yml

* temp package install

before real ones get uploaded to db

* Update .appveyor.yml

* Update .appveyor.yml

* Update .appveyor.yml

* Update Makefile

* Update test_x86_shl_enter_leave.c

* Update Makefile

* Update threaded_emu_start.c

* Update .appveyor.yml

* remove unused install
2017-06-25 10:11:35 +08:00
Nguyen Anh Quynh
f9f184e719 test: fix missng pthread functions 2017-01-21 22:29:07 +08:00
me
87e8532e67 regress: link on Linux with -lrt 2016-12-26 14:16:56 +08:00
Stephen
75d90aff52 Make cleanup (#666)
* make cleanup

* Update .travis.yml
Update eflags_nosync.c
Update sigill2.c
Update ro_mem_test.c
Update ro_mem_test.c
Update nr_mem_test.c
Update mem_fuzz.c
Update mem_double_unmap.c
Update emu_stop_in_hook_overrun.c
Update eflags_nosync.c
remove unused
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update mem_64_c.c
Update mem_64_c.c
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update Makefile
Update .travis.yml
try android ndk build
Update unicorn.py
Update unicorn.py
Update Makefile
Update unicorn.py
Update unicorn.py
remove an untrue comment

if a dll/so/dylib gets loaded at runtime is dependent on many different factors, primarily the LD/DYLD paths. Those do not always include the current working directory
Update Makefile
Update .appveyor.yml
Update .travis.yml
Update Makefile
Update .appveyor.yml
Fix bad sample

* Update Makefile

* Update Makefile

* Update install-cmocka-linux.sh

* remove verbose option from tar

* add upgrade to pacman for cmake

* pacman double update, needed to get new packages

* enable cmocka unit testing

* rejigger commands to fail on any step

should get fails in msys builds for cmocka

* fix quote

* make cmocka in cygwin only

* add msys cache
2016-11-19 17:17:48 +08:00
Stephen
bc08bfda67 Unit testing in CI (#651)
- in appveyor, install clang and cmake in cygwin, enable package upgrades, and build cmocka and enable testing for gcc only
- in `gitignore`, ignore generated cmocka folder
- in travis, use brew in osx to install cmocka, and enable testing for gcc and clang on os x and linux
- in `Makefile`, change to use `uname -s` to determine os type
- make `install-cmocka-linux.sh`, a simple shell script to download and install cmocka on linux
- in `bindings/Makefile`, enable `make -c` to call subdirectory makefiles instead of `cd [dir] && make` and include environment variables for runtime access to generated libraries
- in `samples/Makefile`, change to use `uname -s` to determine os type, remove `clean_bins` from `all` command, and include `Werror` for compile strictness
- in `tests/unit/Makefile`, add `cflags` for compile time access to cmocka headers and library, include execute vars for runtime access to cmocka and unicorn libs
- in `tests/unit/test_tb_x86.c`, comment out assert that would not compile
2016-10-22 00:21:10 +08:00
nnn
4a67727f81 Updated Makefile 2016-08-20 18:47:45 -07:00
samothtronicien
ae8e34173a added tests with enter/leave 2016-07-31 03:19:52 +02:00
samothtronicien
1ecc5abdbc fixed typo: test_x86_shl_pf -> test_x86_shl 2016-07-30 16:44:54 +02:00
samothtronicien
8120b7732e added test_x86_shl_pf to makefile 2016-07-30 16:42:51 +02:00
jndok
c6db9febe7 added ARM64 hang test 2016-06-15 19:18:51 +02:00
Zach Riggle
93063d089b Add ASAN build target with UNICORN_ASAN or via './make.sh asan' 2016-04-20 16:16:06 -07:00
egberts
347d863365 Issue #465 hook_count_cb doesn't stop at n instructions; unit test file 2015-10-03 22:52:15 -07:00
Ramirez57
2ab2b229ce test case: x86 guest paging
Test case for x86 paging using virtual addresses mapped by Unicorn, as well as unmapped.

Attempting to read/write from virtual address ranges unmapped by Unicorn wrongly causes protection faults, even when the virtual address points to read/write regions of Unicorn memory.
2016-02-22 00:03:14 -05:00
Nguyen Anh Quynh
5a04bcb115 allow to change PC during callback. this solves issue #210 2016-01-28 14:06:17 +08:00
Ryan Hileman
33180b5afa add test for multiple basic block hooks 2016-01-22 18:42:14 -08:00
steve
f0dac63b69 In response to issue #364, a unit test case has been created
for exercising proper flushing of the instruction translation cache.
2016-01-16 18:05:32 -05:00
Nguyen Anh Quynh
6e534417f1 unit: change clang -> CC 2015-12-30 08:50:58 +08:00
coco
fa2da819b6 added test for unmap of doubly mapped region 2015-12-28 22:02:31 +01:00
Nguyen Anh Quynh
ed319bda0b x86: identity map guest address to host address. this fixes issue #300 2015-12-24 09:51:17 +08:00
Nguyen Anh Quynh
771f9f7c3b fix conflicts when merging map-ptr branch to master branch 2015-12-17 08:12:02 +08:00
coco
e4fe6b58b4 added test for memory quirks 2015-12-08 18:23:06 +01:00
Ryan Hileman
6d21ebabea implement host-controlled memory mapping for #261 2015-11-27 23:30:36 -08:00
Nguyen Anh Quynh
90eb8f2e72 This commit continues the PR #111
- Allow to register handler separately for invalid memory access
- Add new memory events for hooking:
   - UC_MEM_READ_INVALID, UC_MEM_WRITE_INVALID, UC_MEM_FETCH_INVALID
   - UC_HOOK_MEM_READ_PROT, UC_HOOK_MEM_WRITE_PROT, UC_HOOK_MEM_FETCH_PROT
- Rename UC_ERR_EXEC_PROT to UC_ERR_FETCH_PROT
- Change API uc_hook_add() so event type @type can be combined from hooking types
2015-09-24 14:18:02 +08:00
danghvu
3c1d65ea66 Reorganize test directories 2015-09-21 20:47:45 -05:00