Commit graph

85 commits

Author SHA1 Message Date
David CARLIER dd47649a3b Tests, fixes on third platform. (#1168)
MT linkage fix mainly.

Backports commit 72f759838774d1fa23de901c9b236d726e4ad5e4 from unicorn
2020-01-14 09:45:55 -05:00
ζeh Matt c206e37963 Timeout error (#1173)
* Implement timeout state and new error for such case

* Adjust test_i386_loop sample

* Adjust test_i386_loop test

Backports commit 3a3bc0c22de5453335dfb597a95dbda07c9f47a2 from unicorn
2020-01-14 09:42:57 -05:00
Jean-Baptiste Cayrou b1995b4b8a Fix C syntax mistake in test_gdt_idt_x86.c (#867)
Now 'make test' command works
2017-08-07 10:31:10 +08:00
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 206819bd98 cleanup after msvc port 2017-01-22 21:27:17 +08:00
Nguyen Anh Quynh f9f184e719 test: fix missng pthread functions 2017-01-21 22:29:07 +08:00
xorstream 770c5616e2 Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
xorstream 837d3787c0 Fix for read()/write() conflict with unistd.h in test_mem_map.c. 2017-01-21 01:39:49 +11:00
xorstream fac6a66860 platform.h move #3 2017-01-21 00:13:21 +11:00
xorstream 1aeaf5c40d This code should now build the x86_x64-softmmu part 2. 2017-01-19 22:50:28 +11:00
Nguyen Anh Quynh bc569f5a54 rename API uc_mem_free() to uc_free(). see #662 2017-01-10 20:59:14 +08:00
Nguyen Anh Quynh fdbbdc6216 rename uc_context_free() to uc_mem_free(). see #373 2017-01-09 20:52:14 +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
Andrew Dutcher ea54204952 Tweak some names in a few places, encapsulate the uc_context struct to hide it from users for some reason 2016-10-10 14:04:51 -07:00
Andrew Dutcher 1ab2154fe5 Change save/restore API to have explicit alloc/free functions. Python has explicit save/update functions. 2016-10-07 11:39:42 -07:00
Nguyen Anh Quynh 73577cbcd1 rename uc_regstate_restore to uc_context_restore, uc_context_save to uc_context_save 2016-10-07 10:03:19 +08:00
Nguyen Anh Quynh b7cdbe7a88 Merge branch 'feat/reg_save_restore' of https://github.com/rhelmot/unicorn into rhelmot-feat/reg_save_restore 2016-10-07 09:57:07 +08:00
Stephen 0137a66c61 Update test_hang.c 2016-10-05 10:29:16 -07:00
Stephen f2998f14cd Update test_hang.c 2016-10-05 09:20:36 -07:00
Andrew Dutcher e3b0e52013 Rename save/restore functions to match the style of the rest of the API 2016-09-28 21:21:44 -07:00
Andrew Dutcher 3deb9fdcad Fix save/restore to work while emulation is not active 2016-09-08 14:41:34 -07:00
Andrew Dutcher f2af98942b Added (failing?) test for reg save/restore 2016-08-31 20:25:28 -05:00
Nguyen Anh Quynh 40ea64af19 Merge branch 'feat/xmm_regs' of https://github.com/rhelmot/unicorn into rhelmot-feat/xmm_regs 2016-08-23 06:52:45 +08:00
nnn 64e6fbc480 Fixed printf format specifier 2016-08-20 22:34:14 -07:00
nnn d77fd18915 Fixed multiple bugs in test_x86_rip_bug.c
Fixed format warning in test_hang.c
2016-08-20 22:23:51 -07:00
nnn 4a67727f81 Updated Makefile 2016-08-20 18:47:45 -07:00
Neil 06fc5d1ea9 Add files via upload
Unit Test for Issue #534
2016-08-20 21:35:23 -04:00
Andrew Dutcher b1f03a02f2 Add tests for xmm register read/write 2016-08-14 19:26:32 -07:00
samothtronicien 92f97da49f bit of refactoring 2016-07-31 19:45:46 +02:00
samothtronicien f1041a2615 renamed to test_x86_shl_enter_leave.c 2016-07-31 03:23:00 +02: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
samothtronicien c1cd06ec52 ported test to C 2016-07-30 16:41:40 +02:00
samothtronicien 6c3eecb2a3 added unit test for x86
This test highlight the issue with the SHL instruction in the form (SHL r, CL), the flags values retrieved in the code hook are not correct.
2016-07-30 04:18:12 +02:00
Nguyen Anh Quynh 6193be73b7 tests: more flexible .gitignore for tests/unit/ 2016-06-16 09:14:32 +08:00
nuko32 9b46a22cd5 final refactoring for test_hang 2016-06-15 20:52:28 +02:00
nuko32 3bec4b2cf1 refactored test_hang and fixed indentations 2016-06-15 20:44:22 +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
Nguyen Anh Quynh ad6bb8c9f8 unit: fix test_hookcounts.c 2016-03-20 01:54:37 +08:00
Nguyen Anh Quynh 0af4baac31 unit: fix warnings in printing uint64_t in test_hookcounts.c 2016-03-17 17:49:22 +08:00
egberts ac21e74641 Issues #465
Pull Request #466
Added one more test case
Fixed two test case into passing (for a total of 3 passing out of 7)
2016-03-16 11:49:25 -07:00
egberts ab5ed15044 Issue #465 - Enhanced test for more scenarios; fixed some semantic bugs. 2016-03-16 10:54:20 -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
Nicolas PLANEL 1087ba9dea [query] add UC_QUERY_PAGE_SIZE uc_query helper
Return the current page size used by the current arch.
Useful to call uc_mem_map() with memory/size aligned.

Signed-off-by: Nicolas PLANEL <nplanel@redhat.com>
2016-03-04 15:54:24 +11:00
Nguyen Anh Quynh aabcb95f01 unit: remove ^M from test_x86_soft_paging.c 2016-02-22 14:02:28 +08:00