add ppc64le dbg tests (#5157)
This commit is contained in:
parent
cad9cc235a
commit
d109dcadb1
6 changed files with 97 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ int rz_test_main(int argc, const char **argv) {
|
|||
char *cwd = NULL;
|
||||
RzTestState state = { 0 };
|
||||
|
||||
eprintf("Running rz-test on %s\n", RZ_TEST_ARCH_OS);
|
||||
|
||||
if (!except_dir) {
|
||||
RZ_LOG_ERROR("Fail to create RzPVector\n");
|
||||
ret = -1;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
#define RZ_TEST_ARCH "arm"
|
||||
#elif __arm64__
|
||||
#define RZ_TEST_ARCH "arm64"
|
||||
#elif __powerpc__ || __powerpc64__
|
||||
#define RZ_TEST_ARCH "ppc"
|
||||
#elif __s390__ || __s390x__
|
||||
#define RZ_TEST_ARCH "sysz"
|
||||
#else
|
||||
#define RZ_TEST_ARCH "unknown"
|
||||
#endif
|
||||
|
|
|
|||
35
test/db/archos/linux-ppc/dbg_mem
Normal file
35
test/db/archos/linux-ppc/dbg_mem
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
NAME=Memory Read and Write
|
||||
FILE=bins/elf/ppc64le/dbg_basic_test
|
||||
BROKEN=1
|
||||
ARGS=-a ppc -d
|
||||
CMDS=<<EOF
|
||||
e io.cache=true
|
||||
db @ 0x100000950
|
||||
dc
|
||||
pxw 16 @ array_data
|
||||
wx 0x1234 @ 0x00020014
|
||||
pxw 16 @ array_data
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
0x0002000c 0x0000000a 0x00000014 0x0000001e 0x00000028 ............(...
|
||||
0x0002000c 0x0000000a 0x00000014 0x00003412 0x00000028 .........4..(...
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=Memory Allocation and memset
|
||||
FILE=bins/elf/ppc64le/dbg_basic_test
|
||||
BROKEN=1
|
||||
ARGS=-a ppc -d
|
||||
CMDS=<<EOF
|
||||
db @ 0x100000858
|
||||
dc
|
||||
ds
|
||||
pxw 16 @ 0x75f812a77040
|
||||
ds
|
||||
pxw 16 @ 0x75f812a77040
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
0x75f812a77040 0xffffffff 0xffffffff 0xffffffff 0xffffffff ................
|
||||
0x75f812a77040 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa ................
|
||||
EOF
|
||||
RUN
|
||||
15
test/db/archos/linux-ppc/dbg_reg
Normal file
15
test/db/archos/linux-ppc/dbg_reg
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
NAME=Read and Write in registers
|
||||
FILE=bins/elf/ppc64le/dbg_basic_test
|
||||
BROKEN=1
|
||||
ARGS=-a ppc -d
|
||||
CMDS=<<EOF
|
||||
db @ 0x100000990
|
||||
dc
|
||||
dr r10
|
||||
dr r10=0x34
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
r10 = 0xc8
|
||||
r10 = 0x34
|
||||
EOF
|
||||
RUN
|
||||
20
test/db/archos/linux-ppc/dbg_sig
Normal file
20
test/db/archos/linux-ppc/dbg_sig
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
NAME=Signal handling ppc64le
|
||||
FILE=bins/elf/ppc64le/dbg_signal_test
|
||||
BROKEN=1
|
||||
ARGS=-a ppc -d
|
||||
CMDS=<<EOF
|
||||
dkl~SIGTERM
|
||||
dko 15 skip
|
||||
dkl~SIGTERM
|
||||
dko 15 reset
|
||||
dkl~SIGTERM
|
||||
dk 15
|
||||
dc
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
15 SIGTERM
|
||||
15 SIGTERM skip
|
||||
15 SIGTERM
|
||||
[+] signal 15 aka SIGTERM received 1
|
||||
EOF
|
||||
RUN
|
||||
21
test/db/archos/linux-ppc/dbg_step
Normal file
21
test/db/archos/linux-ppc/dbg_step
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
NAME=Step instruction
|
||||
FILE=bins/elf/ppc64le/dbg_basic_test
|
||||
BROKEN=1
|
||||
ARGS=-a ppc -d
|
||||
CMDS=<<EOF
|
||||
db @ 0x100000754
|
||||
dr r9
|
||||
dc
|
||||
dr r9
|
||||
2ds
|
||||
dr r10
|
||||
ds
|
||||
dr r9
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
r9 = 0x0
|
||||
r9 = 0xc8
|
||||
r10 = 0x34
|
||||
r9 = 0xfc
|
||||
EOF
|
||||
RUN
|
||||
Loading…
Reference in a new issue