Skip to content

Commit

Permalink
Fix regex of dbg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Feb 1, 2024
1 parent 46b24ff commit 084d3e4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion binrz/rz-test/rz-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ static void print_diff(const char *actual, const char *expected, const char *reg
const char *output = actual;

if (regexp) {
RzStrBuf *match_str = rz_regex_full_match_str(regexp, actual, RZ_REGEX_ZERO_TERMINATED, RZ_REGEX_EXTENDED, RZ_REGEX_DEFAULT, "\0");
RzStrBuf *match_str = rz_regex_full_match_str(regexp, actual, RZ_REGEX_ZERO_TERMINATED, RZ_REGEX_EXTENDED, RZ_REGEX_DEFAULT, "\n");
output = rz_strbuf_drain(match_str);
}

Expand Down
15 changes: 9 additions & 6 deletions test/db/archos/darwin-x64/dbg
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@ ARGS=-d
CMDS=<<EOF
dm~hello
EOF
REGEXP_FILTER_OUT=(0x00000001.+objc_osx.[r_x]+)
REGEXP_FILTER_OUT=((0x00000001[^\/]+)|(hello_objc_osx.[r_x]+))
EXPECT=<<EOF
0x0000000100000000 - 0x0000000100001000 - usr 4K u r-x hello-objc-osx hello-objc-osx hello_objc_osx.r_x
0x0000000100001000 - 0x0000000100002000 - usr 4K u rw- hello-objc-osx hello-objc-osx hello_objc_osx.rw
0x0000000100002000 - 0x0000000100003000 - usr 4K u r-- hello-objc-osx hello-objc-osx hello_objc_osx.r
0x0000000100000000 - 0x0000000100001000 - usr 4K u r-x hello-objc-osx hello-objc-osx
hello_objc_osx.r_x
0x0000000100001000 - 0x0000000100002000 - usr 4K u rw- hello-objc-osx hello-objc-osx
hello_objc_osx.rw
0x0000000100002000 - 0x0000000100003000 - usr 4K u r-- hello-objc-osx hello-objc-osx
hello_objc_osx.r
EOF
EXPECT_ERR=
RUN
Expand Down Expand Up @@ -139,7 +142,7 @@ dc
dr rip
dr rax
EOF
REGEXP_FILTER_OUT=((r[ia][px] = (0x00000000000000)?[a-f0-9]+)|(--))\s+
REGEXP_FILTER_OUT=((r[ia][px]\s=\s[a-fx0-9]+)|(--))
EXPECT=<<EOF
rip = f20
--
Expand Down Expand Up @@ -175,7 +178,7 @@ dc
dr rip
dr rax
EOF
REGEXP_FILTER_OUT=((r[ia][px] = (0x00000000000000)?[a-f0-9]+)|(--))\s+
REGEXP_FILTER_OUT=((r[ia][px]\s=\s[a-fx0-9]+)|(--))
EXPECT=<<EOF
rip = ea0
--
Expand Down
2 changes: 1 addition & 1 deletion test/db/archos/linux-x64/dbg_oo
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ARGS=-e log.level=4
CMDS=<<EOF
ood
EOF
REGEXP_FILTER_ERR=([a-zA-Z-]+\s+)
REGEXP_FILTER_ERR=([a-zA-Z-]+)
EXPECT_ERR=<<EOF
Process with PID File -helloworld-gcc reopened in read-write mode
EOF
Expand Down
2 changes: 1 addition & 1 deletion test/db/archos/linux-x64/dbg_trace
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ echo ----
dsui call; ds
dbt~[6-] # dbtt here would be nice
EOF
REGEXP_FILTER_OUT=((loc\.[^_]\S*.)|(main\s?\S*.)|(entry0\+\d+\s+)|(-+))
REGEXP_FILTER_OUT=((loc\.[^_]\S*)|(main\s?\S*)|(entry0\+\d+)|(-+))
EXPECT=<<EOF
main loc.func_6+6
entry0+41
Expand Down

0 comments on commit 084d3e4

Please sign in to comment.