pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) ( #18077 )
2020-12-21 01:10:22 +01:00
Lazula
243bc871c3
Multiple refactors in io and util ##io ##util ##refactor
...
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
GustavoLCR
94b2d83004
Add option to log r2r test results and publish it in the CI ( #17964 ) ##test
2020-11-24 03:43:41 +01:00
Khairul Azhar Kasmiran
9c66a31a97
Add 6 minutes to cmd_aae timeout and skip aaa for swift_read fuzz test ( #17805 )
...
* Add 6 minutes to the cmd_aae test
* Skip aaa when doing swift_read fuzz test on asan
* Bump linux-meson-gcc-newshell-tests timeout to 60 minutes
2020-10-27 18:19:01 +08:00
Riccardo Schirone
af337b1439
Prevent multiple threads from opening new files at the same time ##r2r ( #17736 )
...
This should fix a nasty issue with r2r, where tests never terminated.
That was caused by the jq process waiting indefinitely for input from
fd0, because the other end of the pipe was never closed.
Indeed r2r_subprocess_start forks and closes known unnecessary opened fd
in the child process, however it does not consider also all the other
file descriptors that could have been created by other threads
simultaneously. As fd are per-process and not per-thread, file
descriptors created by other threads while doing e.g. pipe to spawn a
separate jq process will clutter other threads (and following jq
processes) as well. If two jq processes happen to keep a fd to the other
end of the pipe for the fd0 of the other jq process, none of them
terminates, thus they never close those spurious file descriptors,
causing tests to hang.
This tries to fix the issue by making sure only one thread at a time can
start a subprocess. In this way no other FDs can be created while a
thread is in the middle of r2r_subprocess_start.
2020-09-30 10:40:23 +02:00
Khairul Azhar Kasmiran
0e1fa7c341
Do partial =h test on Windows (without /cmd and using curl) ( #17729 )
...
* Properly default http.root on Windows
* Do partial =h test on Windows (without /cmd and using curl)
2020-09-29 21:23:26 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local ( #17639 )
2020-09-15 09:16:14 +02:00
Khairul Azhar Kasmiran
fe5b80d615
Fix asan r2pipe test by updating libasan and using LD_PRELOAD ( #17594 )
...
* Set LD_PRELOAD for unit tests
* Declare failed debug tests as broken if no assertion or Sanitizer in output
* Check for ASAN=1 in cmd_pipe test
* Set asan: true in the GitHubCI matrix
* Fix ttyname-related runtime error
* Upgrade asan build to Ubuntu 20.04
* Quick fix for reg/arena.c runtime error
2020-09-11 18:47:27 +08:00
Riccardo Schirone
3f4079c4ca
Add support for TIMEOUT key for cmd tests ( #17582 ) ##r2r
2020-09-04 15:17:17 +02:00
Khairul Azhar Kasmiran
7066f58d8c
r2r: Set cmd test to NULL on load failure ( #17512 )
2020-08-25 18:21:38 +08:00
Khairul Azhar Kasmiran
52668c02d2
r2r: Check whether test has EXPECT or EXPECT_ERR ( #17508 )
2020-08-24 18:29:37 +08:00
pancake
8efd721dba
Fix Cydia/iOS packaging and compilation issues ##build ( #17342 )
2020-08-14 13:17:32 +08:00
Florian Märkl
68a1db448d
Merge everything time-related in r_time.h ( #17445 )
2020-08-12 18:54:49 +02:00
Florian Märkl
8c94f34e90
Add r_sys_now_mono() and use in r2r ##util ( #17276 )
2020-08-11 20:26:06 +02:00
Riccardo Schirone
48c30dfd99
Support compilation with meson on old systems like CentOS6/DebianWheezy ##build ( #17345 )
...
* Compile tree-sitter and newshell parser with gnu99 if possible ##meson
* Make sure to use `-lrt` when needed to use clock_gettime ##meson
2020-07-27 12:25:06 +08:00
Khairul Azhar Kasmiran
d970c64292
Move r2r diffchar code into r_util ( #17316 )
2020-07-20 00:44:27 +08:00
Khairul Azhar Kasmiran
47c774ad0e
r2r: Use Needleman-Wunsch to diffchar ( #17248 )
2020-07-17 20:58:06 +08:00
Khairul Azhar Kasmiran
0ff69a5973
Use diff-so-fancy colors in r2r diffs ( #17211 )
...
* Use diff-so-fancy colors in r2r diffs
* Define insert/delete colors at top of file
2020-07-06 15:34:03 +08:00
GustavoLCR
25a043e802
Fix r2r crash on Windows if test doesn't have CMDS ##tests ( #17181 )
...
* Fix r2r crash on Windows if test doesn't have CMDS
* Throw error on load if test it doesn't have CMDS
2020-07-06 13:50:18 +08:00
Zi Fan
a952636164
Fix non-working json tests in r2r ##test ( #17083 )
2020-06-21 21:23:37 +02:00
Khairul Azhar Kasmiran
12d12a5ed4
r2r: For diffchar, use --word-diff=porcelain instead ( #17087 )
2020-06-18 18:12:34 +08:00
Khairul Azhar Kasmiran
ca49982a63
r2r: Support char diffing ( #17066 )
2020-06-15 18:55:03 +02:00
pancake
bd9a604a87
Check for return values in about ~50 method calls ( #17025 )
2020-06-15 11:24:43 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures ( #17026 ) ##refactoring
...
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
pancake
84ecf9fff2
Fix all the coverities detected last month ( #17060 )
...
* Fix all the coverities detected last month
* Fix one more cov
* Fix build
* refix build
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-14 13:21:57 +02:00
Khairul Azhar Kasmiran
ddeb513374
r2r: Don't trim diff lines ( #17059 )
2020-06-14 13:06:58 +08:00
Khairul Azhar Kasmiran
fcedd4d21e
r2r: Remove diff header and colorize @@ line ( #17041 )
2020-06-11 13:03:48 +08:00
Khairul Azhar Kasmiran
54950e39fa
r2r: Use git diff on Windows ( #17024 ) ##windows
2020-06-09 23:10:56 +08:00
Khairul Azhar Kasmiran
1fef151d37
r_cons: Save and restore the active code page on Windows ( #16998 )
...
* r_cons: Save and restore the active code page on Windows
* Use r_sys_cmdf() instead
2020-06-03 18:54:55 +08:00
Francesco Tamagni
c946d9c0f5
Fix memleak in r2r
2020-05-17 21:05:37 +02:00
Khairul Azhar Kasmiran
7efe61e423
r2r.c: Replace \x## emoji seqs with #defines ( #16818 )
...
* r2r.c: Replace \x## emoji seqs with actual emoji
* #define emojis instead
2020-05-16 12:05:53 +08:00
Florian Märkl
45be547b15
Fix r2r -i when fixing multiple tests ( #16817 )
2020-05-14 15:10:03 +02:00
Khairul Azhar Kasmiran
9f2a98b314
Windows r2r: Actually display emojis (on consoles that support them) ( #16807 )
2020-05-12 13:21:57 +08:00
Khairul Azhar Kasmiran
a391b398d6
Reduce flicker when doing r2r -V (for some consoles)
2020-05-10 14:49:24 +02:00
Florian Märkl
d586793bf5
Fix r2r -i fix for single-line EXPECT=
2020-05-02 17:44:18 +02:00
Riccardo Schirone
a29f0ccce5
Add CI job for CentOS 6 build ( #16712 )
...
* Fix re-definition of RAnalBlockCb and RAnalAddrCb
* Small compilation fixes for gcc-4
* Check PTRACE_GETREGSET before using it
* Add GH workflow to run on centos:6 for prerelease branches
* Fix configure.acr
2020-04-29 19:02:02 +08:00
pancake
62809d9ad3
Fix autodetection dbdir in r2r @unit ##tests ( #16644 )
2020-04-27 16:52:23 +02:00
Khairul Azhar Kasmiran
f8a8691522
r2r: Enable ANSI esc seqs on Windows ( #16714 )
2020-04-26 04:43:40 +08:00
Ian Huang
b90d469383
Fix #16613 - Some covs (resource leaks, null ptr deref) ( #16670 )
...
* Mostly a bunch of calls to free()
* Make sure columnName isn't dereferenced if null
2020-04-22 01:27:25 +02:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests ( #16511 )
2020-04-13 19:49:23 +02:00
Florian Märkl
cda24be601
Add interactive mode to r2r ( #16466 ) ##test
2020-04-08 18:34:05 +02:00
pancake
57c68c752c
Fix #16389 - r2r -qv and r2 -v to show version and quiet versions ( #16472 ) ##tools
2020-04-08 13:56:52 +02:00
Florian Märkl
6d633a96a9
Run Fuzz Tests with r2r ( #16456 )
2020-04-07 13:27:19 +02:00
Florian Märkl
5c31876093
R2R for Windows ( #16410 ) ##test
2020-04-06 17:40:46 +02:00
Florian Märkl
0ab6296238
Add Timeout to R2R.c ( #16371 ) ##test
2020-04-02 19:16:49 +02:00
Florian Märkl
73983b3759
Fix a leak in r2r ( #16402 )
2020-04-02 12:35:02 +02:00
Anton Kochkov
80690c3b57
Remove wrongly committed r2r binary
2020-04-01 11:43:14 +08:00
radare
6379317f57
Add LZMA-BE magic signatures ##search
2020-03-31 21:17:02 +02:00
pancake
304bc367de
Initial support for test categories and fix the windows build ##test
2020-03-31 15:58:49 +02:00
pancake
2c40d164b5
r2r new flags: -n to not run -v for version, add manpage ##tests
2020-03-31 15:58:49 +02:00