Commit graph

121 commits

Author SHA1 Message Date
Alok Kumar Mishra
470b1b1eb7
rz-ar: add archive extraction utility (#6036) 2026-03-18 03:51:18 +08:00
Giovanni
70fdd67278
Allow rizin tools to run as standalone binaries (#6011)
* Implement TOOL/ENVS/EXIT_STATUS for rz-test

* update readme
2026-03-11 16:24:23 +00:00
Khairul Azhar Kasmiran
93ace74a55
Remove ASAN debug test fail->broken conversion (#5923) 2026-02-15 15:42:15 +08:00
Khairul Azhar Kasmiran
f4f27fb59e
rz-test: Actually revert to cwd if db/ dir not found (#5852) 2026-01-31 07:26:34 +08:00
Khairul Azhar Kasmiran
7c01de49d3
Set analysis.nopskip to false for fuzz tests (#5776) 2026-01-11 16:10:55 +08:00
Khairul Azhar Kasmiran
b96202ad48
Rename rz_list_first() / rz_list_last() to rz_list_first_val() / rz_list_last_val() (#5654) 2025-12-20 17:08:59 +08:00
Giovanni
0b33d19d60
Optimize tests to recover some CI runtime (#5601)
* Optimize cmd_print tests
* Fix nullderef in bfile_string.c and optimize cmd_i
* Disable esil runs on appveyor
* Fix obviously wrong time scale in rz-test
* Add more info about -e option when in log mode or verbose
2025-12-11 13:46:31 +08:00
Giovanni
b5f52298fc
Improve output of rz-test to provide more details on execution time (#5604)
* Show total elapsed in -L mode and show more info.
* Add -N to disable diffing (unless a fail happens)
2025-12-11 00:29:29 +08:00
Khairul Azhar Kasmiran
6cba0f4a63
Remove brackets from args in rz-test -h (#5454) 2025-10-13 11:02:47 +08:00
Khairul Azhar Kasmiran
ff79a14c04
-h: Refactor out colored help printing code (#5421) 2025-10-01 06:02:15 +08:00
Khairul Azhar Kasmiran
3a4134280f
-h: Refactor out column width code (#5420) 2025-09-30 17:46:45 +08:00
Khairul Azhar Kasmiran
697bfa8b70
Update -h handling code to be consistent with latest (#5419)
* Rename `totalFlagAndArgLength` to `flagAndArgLength`
* Rename `maxOptionAndArgLength` to `maxFlagAndArgLength`
* Rename `optionLength` to `flagLength`
* Rename `totalLength` to `flagAndArgLength`
* Replace `sizeof(options) / sizeof(options[0])` with `RZ_ARRAY_SIZE(options)`
2025-09-28 22:36:07 +08:00
well-mannered-goat
438ab0cfd3
Add Linux ARM64 debug tests (#5232) 2025-07-03 02:31:25 +08:00
well-mannered-goat
48c53b0296
Add openBSD debug tests and fix errors (#5226) 2025-06-27 22:10:35 +08:00
well-mannered-goat
7117ba75ea
librz/debug: add NetBSD debug tests and fix errors (#5208)
* Fix netbsd-x86_64 register profile
* Fix native_wait in netbsd.c
* Fix netbsd attach to show error
* Add netbsd-x64 debug tests
2025-06-20 00:22:33 +08:00
Ahmed Kamal
93d914bd81
Remove Global/Static variables in path.c to make it thread safe (#5148) 2025-06-13 21:34:33 +08:00
well-mannered-goat
b25a0d0a55
Add tests for PPC64LE debugger support (#5184) 2025-06-03 11:36:19 +05:30
Rot127
51f9509d61
Enable rz-test asm tests to test for multiple instructions in a single test. (#5166)
This allows to test for assembly characteristics which are only valid in a certain context.
Here we also fix a bug in rz-asm, which didn't incremented the address before disassembly.
2025-05-26 14:05:19 +00:00
Rot127
275a12a3da
Revert "add ppc64le dbg tests (#5157)" (#5163)
This reverts commit d109dcadb1.
2025-05-23 10:11:16 +08:00
well-mannered-goat
d109dcadb1
add ppc64le dbg tests (#5157) 2025-05-22 19:22:11 +08:00
Rot127
42dc673fa5 String/Hex-Search 6/9: Add core implementation of new search (by deroad).
Adds the core implementation of the new search.

The rough architecture is the following:

A search for a certain type of information (strings, bytes, keys etc.)
creates a collections of items to search for (byte patterns, regular expressions etc.).

Then specifies some settings how the search (number of threads, maxum hits...)
and the finding is performed (string length, inverse match etc.).

It also defines a search space, which is currently only the IO buffer.
But can be anything in the future, like a graphs or the knowledge base.

The search splits up the search space into windows (for IO: address ranges)
and dispatches each search window into a 'find()' thread.

The 'find()' handler (provided by a specific search implementation)
checks the given window and produces search hits matching the elements in the search collection.

The main search handler collects the hits of the dispatched workers
and returns them to the user.

Note: The byte and string search implementations are added in the next two commits.

Part 6/9. Likely won't build in between parts.

Co-authored-by: wargio <deroad@kumo.xn--q9jyb4c>
2025-02-22 04:12:49 +08:00
Rot127
708e30dc2e
Fix leaks in rz-test (#4824)
* Fix leaks in rz-test.c

* Fix leak of regex
2025-01-09 16:09:05 +00:00
billow
1330aa74c4
rz-test: add -y option to accept all (#4772)
* Add rz-test '-y' option to accept all
* Add '-y' into the help text
2024-12-22 17:20:57 +08:00
Khairul Azhar Kasmiran
c0e58b1124
Clean up rz_test_cmp_cmd_output() (#4777) 2024-12-18 21:34:56 +08:00
Khairul Azhar Kasmiran
5331f84980
Set return type of rz_strbuf_length() to size_t (#4775) 2024-12-17 20:38:16 +08:00
Khairul Azhar Kasmiran
e7b919f001
rz-test: Fix no XX if expected output truncated when REGEXP_FILTER_OUT is set (#4770)
* rz-test: Fix no XX if expected output truncated when REGEXP_FILTER_OUT is set
* Fix archos/darwin-x64/dbg tests
2024-12-16 21:37:41 +08:00
Khairul Azhar Kasmiran
325dfdad7d
rz-test: Assume -C . if db/ dir not found (#4768) 2024-12-15 18:23:58 +08:00
Khairul Azhar Kasmiran
7fa052d3af
Remove rz_test_chdir() (#4766) 2024-12-14 18:44:14 +08:00
Khairul Azhar Kasmiran
925e2e9d34
rz-test: Fix last line of diff when REGEXP_FILTER_OUT/_ERR is set (#4763) 2024-12-14 14:31:47 +08:00
Khairul Azhar Kasmiran
19ff7720d3
rz-test: Refactor call to rz_regex_full_match_str() (#4761) 2024-12-10 23:36:42 +08:00
Khairul Azhar Kasmiran
3fae9c0f1e
Fix rz-test -i fixing when REGEXP_FILTER_OUT/_ERR is set (#4760) 2024-12-09 23:01:18 +08:00
Khairul Azhar Kasmiran
82d5596b05
Revert "rz-test: Set default test dir to '.' (#4741)" (#4759)
* Revert "rz-test: Set default test dir to '.' (#4741)"
This reverts commit 9051d00b25.
* Add comment for rz_test_chdir()
* Add comment for rz_test_chdir_fromtest()
2024-12-09 18:33:14 +08:00
Khairul Azhar Kasmiran
9051d00b25
rz-test: Set default test dir to '.' (#4741) 2024-11-25 21:10:20 +08:00
wargio
5896b15354 Add elapsed time when errored or verbose 2024-09-23 14:24:41 +08:00
Khairul Azhar Kasmiran
f6d763c858
Print stderr for failing asm tests (#4646) 2024-09-22 13:33:57 +08:00
Khairul Azhar Kasmiran
9c6d50d46a
Print asm test exit status for failing asm tests (#4640) 2024-09-18 20:20:43 +08:00
Khairul Azhar Kasmiran
7b91fb69c2
Revert #4506 (#4519) 2024-05-27 21:50:58 +08:00
Giovanni
d19fc9d0d8
Add N_THREAD_LIMIT to limit the max number of threads (upper limit). (#4510) 2024-05-24 16:12:08 +08:00
wargio
bce7bd76c1 Refactoring rz-test to use thread safe functions. 2024-05-22 22:27:41 +08:00
Khairul Azhar Kasmiran
524119c017
rizin: Remove -Q flag (#4468) 2024-05-11 22:48:05 +08:00
pelijah
f2d8e0db3d
Add HtSP, HtSS, HtSU, SetS (#4415)
- All `ht_*_new0()` are removed
- `freefn` field of HT options was renamed to `finiKV`
- `finiKV_user` fields was added to HT options
- Added `ht_*_new_opt_size` API
- `HtSP` and `HtUP` are created with `ValueFree` callback  that allows to reduce extra LOC and prevent bugs
- `SetP` replaced with `SetS` (based on `HtSP`)
- `rz_th_ht_*_new0()` and `rz_th_ht_*_new_opt()` are replaced with `rz_th_ht_*_new(HtXX *)`
2024-04-16 20:27:48 +08:00
Rot127
5afc51f0e2
Replace current regex engine with PCRE2 (#4185)
* Replace OpenBSD regex library with PCRE2.

PCRE2 has way better performance than the OpenBSD
library (something around 20 times faster).

The following flags are enabled for every pattern:

- PCRE2_UTF
- PCRE2_MATCH_INVALID_UTF
- PCRE2_NO_UTF_CHECK

All the others are optional.

Changes made:

- Adds PCRE2 as subproject.
- Changes the API away from POSIX to PCRE2.
- Edits many regex patterns because:
 - ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now.
 - '.' doesn't match newlines by default.
- Changes the API so matches and their groups are bundled into PVectors.
- Moves the regex component to rz_util.

* Fix cross build - add copy of PCRE2 dependecy

Meson currently doesn't support subprojects to be native and non-native at the same time.
See: https://github.com/mesonbuild/meson/issues/10947
Unfortunately, sdb depends on rz_util which in turn depends on PCRE2.
Excluding PCRE2 from the native build makes linking of rz_util not possible anymore.
Adding it, will make Meson complain that the dependencies cannot be mixed.

Hence, we compile a copy of PCRE2 for the native build if required.
2024-02-05 12:51:16 +08:00
byteninjaa0
8cfd11b104
Update tools help and man pages (#4145)
* Update man pages
* Update help messages
2024-02-01 00:24:38 +08:00
byteninjaa0
5a341348d7
rz-test: colorize help (#4105) 2024-01-15 07:49:34 +08:00
Peiwei Hu
a666628bf4
Show how many pending failure cases are there in rz-test -i (#4079) 2024-01-10 19:19:56 +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
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