Commit graph

108 commits

Author SHA1 Message Date
Riccardo Schirone
8bc33bae5c
Remove unused rz-bb binary, probably left from r2 times (#3596) 2023-06-21 20:48:21 +08:00
Riccardo Schirone
497c2b2e05
Remove old bash-based rz-pm (#3360) 2023-02-07 18:26:38 +08:00
wargio
aee62e62ab Ensure a name is set in the json output of rz-test 2022-12-06 10:07:38 +08:00
Giovanni
e7e2156eed
Do not load sigdb from system and home when running rz-test (#3222) 2022-12-05 02:51:36 +01:00
Florian Märkl
bdef1913b3
Show test path and name in rz-test -i failures (#3173) 2022-11-08 20:41:46 +01:00
Anton Kochkov
9f6e13f364
Remove rz-agent (#3087) 2022-10-12 10:34:46 +02:00
Giovanni
4063f7d2de
Fix android binaries and missing main callbacks (#3044)
* Rename `rassign2` to `rz-sign`
* Refactor code from rz_main
* Rename struct
* Update main.c
2022-09-23 17:30:17 +08:00
Giovanni
1f952bc7e7
Fix pointless expression due wrong bit check on rz-test (#3038) 2022-09-18 15:38:08 +02:00
Dean
59b38e6efa
Add /*<type>*/ comments everywhere (#2986)
Adds /*<type>*/ comments and a linter check from rz-bindgen to enforce
their existence and consistency

Also includes the following fixes made when adding the annotations:
* removed unused intern_table arguments in pyc_dis.c, pyc_dis.h, asm_pyc.c
* removed unused classes argument from place_nodes in agraph.c
* removed unused recurse and recurse_bb functions in canalysis.c
* removed unused vars field from RzPrint struct
* removed unused RzAnalysisType* structs from rz_analysis.h
* removed unused list field from RzEgg struct
* fixed bug in bp_plugin.c where duplication-checking logic iterates over the wrong list
* removed unused q_regs field from RzDebug struct
* removed unused backtrace field from RzDebugPlugin struct
* removed unused classes_list field from RzBinNXOObj struct
* removed unused methods_list and classes_list fields from RzBinZimgObj struct
2022-09-11 13:04:53 +08:00
Giovanni
f8d15acd8b
Disable rz-pm (script) installation (#3007) 2022-09-05 20:15:46 +02:00
Khairul Azhar Kasmiran
1c9f93f7ef
Move rz_str version funcs into version.c (#2890)
* Move rz_str version funcs into `version.c`
* Move func prototypes into `rz_util/rz_version.h`
* Use `rz_version_` prefix instead of `rz_str_`
2022-08-08 22:30:28 +08:00
Daniel
a29dfce524 docs: replace rahash2 reference 2022-07-22 17:15:46 +02:00
Riccardo Schirone
8939fdbd7d
Use add_global_arguments instead of passing cflags/ldflags all around (#2812)
See also 66a0e22293/docs/TESTING_WITH_SANITIZERS.md (clang)
2022-07-17 21:33:51 +08:00
GustavoLCR
adfaa180e6
rz-test: Avoid PATH search when launching binaries (#2770) 2022-07-03 15:12:15 +02:00
Riccardo Schirone
87d1bc2175
rz-test: do not use rz_vector_insert if there are no tests to add (#2717) 2022-06-21 18:45:23 +02:00
Giovanni
a988941bf2
Refactor thread code and add RzThreadQueue (#2683)
* Kill the thread only if is alive.
* Remove rz_th_lock_guard.
* Use rz_sys_usleep since pthread_yield/sched_yield are not portable.
* Kill threads only on error.
* Avoid killing already-dead threads.
* RzThreadFunction now returns void* and added test_thread_queue.
* Removed pthread_exit
2022-06-19 21:07:13 +08:00
Peiwei Hu
63e736c648
Rz-test: assign the expected successful and failed test (#2693) 2022-06-16 18:14:41 +08:00
Florian Märkl
b06868ee30 Simplify rz-test time and rz_time_now_mono() on ppc Mac OS X
mach_timebase_info() already does some caching internally (can be seen in xnu
source), so the additional check is not necessary.
2022-04-02 12:48:59 +02:00
Peiwei Hu
a0ea1f6f57
rz-test: support exclude directories (#2440) 2022-03-24 16:54:25 +08:00
Khairul Azhar Kasmiran
1407c65c98
run.c: Rename remove_cr to crlf2lf (#2424) 2022-03-18 16:04:23 +01:00
Khairul Azhar Kasmiran
f78043d73a
remove_cr: Use more efficient algorithm (#2422) 2022-03-18 22:00:35 +08:00
Riccardo Schirone
86d20b2d16
RzShell: Remove possibility to switch to oldshell (#2420)
Due to some commands/tests still using the legacy "..." commands, we
can't fully remove oldshell code yet, but with this patch we just hide
it from the end users. Rzshell is now the default and only shell and
rzshell autocompletion is the default and only autocompletion engine.
2022-03-17 14:49:34 +01:00
GustavoLCR
170ab3eb3b
Remove windows.h include from rz_types.h (#2410)
* Create `rz_windows.h`
* Move `RzThread` structure definitions to internal header
* Create and use `rz_th_get_user()` API to avoid exposing `RzThread` layout in external header
* Make `rz_th_self()` an IPI
* Use `_wmkdir()` in `rz_sys_mkdir()` on Windows
* Remove unused `winkd_break_read` function
* Remove `RzIORap` definition from `rz_io.h`
* Remove include of `Windows.h` from `rz_types.h`
* Use `rz_windows.h` when necessary
* Remove `RzCoreRtrHost` definition from `rz_core.h`
* Remove `rz_socket.h` include from `rz_core.h`
2022-03-16 13:54:41 +01:00
Khairul Azhar Kasmiran
934588cfa5
!!: Fix extra \r on Windows (#2401)
* `!!`: Fix extra `\r` on Windows
* Use more efficient algorithm
* "Fix" cmd_pipe test
* "Fix" shared_memory.py
* Move feat_redirect test to archos/not-windows-any
2022-03-14 21:55:12 +08:00
Khairul Azhar Kasmiran
d525579475
Add tests for Rizin prompt (#2377) 2022-03-03 17:24:22 +01:00
Florian Märkl
4185ee34cf
Add asm auto-fix and diff to rz-test (#2196) 2022-01-11 19:41:53 +01:00
Florian Märkl
7e36f4bd38 Add IL lifting testing to rz-test 2022-01-10 19:27:09 +01:00
Riccardo Schirone
6f40dfe493
Move remaining things from shlr/ to meson subprojects (#2126)
* Move binrz meson directives to binrz/ dir

* Move rizin-shell-parser to a subproject

* Move bochs to a meson subproject

* Move rzqnx to meson subproject

* Move winkd to a meson subproject

* Move rzar to a meson subproject

* Move rzw32dbg_wrap to a meson subproject

* Move ptrace-wrap to a meson subproject

* Move rzgdb to a meson subproject

* Rename w32dbg_wrap to rzw32dbg_wrap

* Update CODEOWNERS

* Remove old references to shlr

* Move shlr/heap stuff in core and remove shlr/arm

* Move spp to a meson subproject

* Remove last references to shlr

* Remove use_webui option

* Move include files directives to librz/include/meson.build

* Move librz meson directives into librz/meson.build

* Handle d/ directories inside the specific module meson.build

* Move plugins listing to specific module meson.build

* Move rzheap to its own subproject

* Fix js linter and licenses

* Use meson.override_dependency for all rz_ modules
2021-12-22 09:20:39 +08:00
Florian Märkl
ce262c485b
Remove binrz/preload (#2045)
This is not used at all.
2021-11-29 18:08:23 +01:00
GustavoLCR
53a7694631
Add support for Windows on ARM (#1502)
* Support building for Windows on ARM

* Fix usage of reserved function name on ARM
* Fix architecture dependent `CONTEXT` fields access

* Fixes for debugging on Windows on ARM

* Fix breakpoint behavior on windows on ARM
* Fix register profile when debugging
* Remove `drx` error message if not supported
* Add support for hardware breakpoints
* Disable support for hardware single-stepping

* Fix Windows Message breakpoints on ARM

* Fix software single-stepping on return instruction on ARM

* Consider link register as destination for return instructions

* Fix setting debug bits to 16

* Rename `r12` to `ip` for windows arm register profile

* Remove debug bits hardcoding on windows

* Add 32bit registers to Windows ARM64 register profile

* Fix software step breakpoint alignment when entering thumb mode

* Define `RZ_TEST_ARCH` for `arm` and `arm64`

* Use `StackWalk64` API for backtracing on Windows

* Fix software single-stepping ARM in thumb mode

* Sync `asm.bits` with debugger

* Cleanup windows_debug.c

* Add SPDX for cross-arm64-windows.txt

* Add floating point control register flags

* Fix Windows Arm register profile alignment

* Keep `drx` warning
2021-11-24 20:13:42 +08:00
Khairul Azhar Kasmiran
906ece4211
Add asan build for clang (#1910) 2021-11-17 21:02:02 +08:00
Khairul Azhar Kasmiran
ac496744c8
Fix #1887: Sync test results with testfile (#1906) 2021-10-30 18:25:25 +08:00
Florian Märkl
97c3b81035 Disable codesign on old Mac OS X 2021-10-26 10:50:22 +02:00
Khairul Azhar Kasmiran
db0fdffc4e
archos/: Support <os>-any test categories (#1795) 2021-10-05 17:33:42 +08:00
wargio
3ba03e4940 Fixed GCC 11 warning in rz-test 2021-09-24 01:52:11 +02:00
Khairul Azhar Kasmiran
fe9e1beed9
archos/: Support any arch for not- categories (#1713) 2021-09-18 20:21:19 +08:00
Khairul Azhar Kasmiran
67e323174b
Add not-windows-x64 category to archos/ (#1700) 2021-09-17 00:06:15 +08:00
Rot127
79751e358e
rz-test: check for undeclared keys to fix segfault. (#1689) 2021-09-15 09:32:58 +00:00
ryancaicse
0b993f9771 Fix un released lock
Fix un released lock state.lock in the main before the program exits.

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2021-09-15 10:31:26 +08:00
Giovanni
8ace435328
Fix coverity bugs (#1654)
* CID 316614: Use after free (USE_AFTER_FREE)
* CID 316535: Use after free (USE_AFTER_FREE)
* CID 316652: Use after free (USE_AFTER_FREE)
* CID 316504: Unsigned compared against 0 (NO_EFFECT)
* CID 316439: Resource leak (RESOURCE_LEAK)
* CID 356127: Dereference after null check (name can never be NULL)
* CID 320881: Resource leak (RESOURCE_LEAK)
* CID 320885: Missing break in switch (MISSING_BREAK)
* CID 316679: Resource leak (RESOURCE_LEAK)
* CID 316574: Explicit null dereferenced (FORWARD_NULL)
* CID 356105: Resource leak (RESOURCE_LEAK)
* Fixed uninitialized building issue
2021-09-11 09:30:57 +02:00
Khairul Azhar Kasmiran
eb262e4df9 Use UTC timezone for tests 2021-09-08 23:14:46 +02:00
Giovanni
cacce543b7
Fix rz-test coverity issues (#1593)
* CID 316425: Resource leak (RESOURCE_LEAK)

* CID 316759: Dereference before null check (REVERSE_INULL)

* CID 354049: Dereference after null check (FORWARD_NULL)

* CID 315924: Out-of-bounds access (OVERRUN)
2021-09-04 14:30:41 +02:00
Riccardo Schirone
727ab8ced0
Use FREE_UTF8_ARGV, not UTF8_ARGV_FREE (#1550) 2021-08-30 16:27:44 +08:00
GustavoLCR
d7e7bae79e
Use wide version of Windows APIs (#1531)
* Use wide version of Windows APIs in subprocess functions
* Use `wmain` on Windows to get UTF16 arguments
* Use wide version of APIs in `rz_cons`
* Always try to set console codepage to UTF8

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2021-08-27 15:23:26 +08:00
Riccardo Schirone
6041ae6bb3
rz-test: Make sure to correctly free path_left ht (#1372) 2021-07-29 01:14:25 +08:00
Giovanni
7a7ca18e20
Fix some warnings related casting ut8* to char* (#1371)
* Fix some warnings related casting ut8* to char*
* Fixed runtime casting on aes code ut8 to ut32
2021-07-28 17:33:48 +02:00
Giovanni
8fe4d0b0a5
Convert ! commands to newshell (#1235)
* Updated core_plugin_example.c
* Removed RZ_BYTES and RZ_BLOCK
Co-authored-by: Riccardo Schirone <sirmy15@gmail.com>
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2021-07-28 10:33:33 +02:00
GustavoLCR
1ab628d83d
Fix some clang-cl warnings (#1298) 2021-07-15 12:15:17 +08:00
Riccardo Schirone
3a3e21ce2d Define rizin_exe also when using blob feature
Unit tests need the path of the rizin executable to properly run in some
cases, thus define rizin_exe variable both in regular build and when
rizin is built with -Dblob=true.
2021-07-05 09:26:54 +02:00
Khairul Azhar Kasmiran
417d966fb1
rz-test: Remove broken diffchar option (#1158) 2021-05-21 21:17:26 +08:00