rizin/test/db/cmd/cmd_pd_bytes
Aswin C d42cde8ca5
Disable asm.bytes by default ##cons (#155)
* Disable `asm.bytes` by default

* Fix tests by adding `e asm.bytes=true` (1/n)

* Fix tests by adding  (2/n)

* Fix tests by adding `e asm.bytes=true` (3/n)

* Fix tests by adding `asm.bytes=true` (4/n)

* Fix test by adding `asm.bytes=true` (5/n)

* Fix mostly all broken tests

* Attemp to fix the rzpipe test

* Attempt to fix the tests in `db/cmd/cmd_pipe`

* Fix tests again

* Fix cmd_pipe test

* Add a test where `asm.bytes` is false

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2020-12-15 12:47:33 +01:00

84 lines
1.8 KiB
Text

NAME=pD -10 @ 10
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 0xa
EOF
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
0x00000005 4839ca cmp rdx, rcx
,=< 0x00000008 7f00 jg 0xa
EOF
RUN
NAME=pD -10 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 10
EOF
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
0x00000005 4839ca cmp rdx, rcx
,=< 0x00000008 7f00 jg 0xa
EOF
RUN
NAME=pD 5 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bytes=true
e asm.bits=64
e analysis.hasnext=0
wx b8010000004839ca7f00
pD 5
EOF
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
EOF
RUN
NAME=pDj 5 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e analysis.hasnext=0
wx b8010000004839ca7f00
pDj 5 @ 0
EOF
EXPECT=<<EOF
[{"offset":0,"val":1,"esil":"1,rax,=","refptr":false,"fcn_addr":0,"fcn_last":0,"size":5,"opcode":"mov eax, 1","disasm":"mov eax, 1","bytes":"b801000000","family":"cpu","type":"mov","reloc":false,"type_num":9,"type2_num":0}]
EOF
RUN
NAME=pD -10
FILE=malloc://1024
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
wx 90909090909090909090 ; s 10 ; pD -10
EOF
EXPECT=<<EOF
0x00000000 90 nop
0x00000001 90 nop
0x00000002 90 nop
0x00000003 90 nop
0x00000004 90 nop
0x00000005 90 nop
0x00000006 90 nop
0x00000007 90 nop
0x00000008 90 nop
0x00000009 90 nop
EOF
RUN