Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Dec 28, 2024
1 parent e65d796 commit 4b15c60
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 6 deletions.
1 change: 1 addition & 0 deletions test/db/analysis/java
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ block 0x100
type JAVA CLASS
arch java
cpu N/A
features N/A
baddr 0x00000000
binsz 0x00000400
bintype class
Expand Down
1 change: 1 addition & 0 deletions test/db/analysis/rl78
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ EXPECT=<<EOF
0x00000785 clrw ax
arch rl78
cpu N/A
features N/A
baddr 0x00000000
binsz 0x00008360
bintype elf
Expand Down
1 change: 1 addition & 0 deletions test/db/analysis/rx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ EXPECT=<<EOF
0xfff4000f mvtc #loc.__vectors, intb, ; crt0.S:41
arch rx
cpu N/A
features N/A
baddr 0xfff40000
binsz 0x0000a623
bintype elf
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/dmp/dmp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CMDS=iI
EXPECT=<<EOF
arch x86
cpu N/A
features N/A
baddr ----------
binsz 0x05455038
bintype dmp64
Expand Down
5 changes: 5 additions & 0 deletions test/db/formats/dyldcache
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ block 0x100
type production
arch arm
cpu N/A
features N/A
baddr 0x180000000
binsz 0x00034000
bintype N/A
Expand Down Expand Up @@ -184,6 +185,7 @@ block 0x100
type production
arch arm
cpu N/A
features N/A
baddr 0x180000000
binsz 0x00034000
bintype N/A
Expand Down Expand Up @@ -346,6 +348,7 @@ block 0x100
type production
arch arm
cpu N/A
features N/A
baddr 0x180000000
binsz 0x00098000
bintype N/A
Expand Down Expand Up @@ -438,6 +441,7 @@ block 0x100
type production
arch arm
cpu N/A
features N/A
baddr 0x180000000
binsz 0x000a8000
bintype N/A
Expand Down Expand Up @@ -620,6 +624,7 @@ block 0x100
type development
arch arm
cpu N/A
features N/A
baddr 0x180000000
binsz 0x00020000
bintype N/A
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/elf/elf-riscv64
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ block 0x100
type EXEC (Executable file)
arch riscv
cpu N/A
features N/A
baddr 0x00010000
binsz 0x0009d024
bintype elf
Expand Down
2 changes: 1 addition & 1 deletion test/db/formats/elf/m68k
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ori.b 0x8a, d0
illegal 0x4afc
link.w a6, 0x0
move.l 0x8015b11c, d0
subi.l 0x8015b119, d0
subi.l 0x15b119, d0
moveq 0x6, d1
cmp.l d0, d1
bcc.b 0x80000df6
Expand Down
22 changes: 18 additions & 4 deletions test/db/formats/elf/mips
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
NAME=ELF: mips.elf
FILE=bins/elf/analysis/mips.elf
ARGS=-A
CMDS=%v entry0
ARGS=
CMDS=<<EOF
%v entry0
iI~cpu
iI~features
EOF
EXPECT=<<EOF
0x400ab0
cpu mips32r2
features noreorder cpic o32 n32
EOF
RUN

Expand All @@ -13,14 +19,16 @@ CMDS=<<EOF
af
e asm.sub.var=false
pif
iI~cpu
iI~features
EOF
EXPECT=<<EOF
lui gp, 0x42
addiu gp, gp, -0x4770
move ra, zero
lui a0, 0x40
addiu a0, a0, 0xec0
lw a1, (sp)
lw a1, 0(sp)
addiu a2, sp, 4
addiu at, zero, -8
and sp, sp, at
Expand All @@ -33,6 +41,8 @@ sw t0, 0x10(sp)
sw v0, 0x14(sp)
jal sym.imp.__uClibc_main
sw sp, 0x18(sp)
cpu mips32
features noreorder cpic o32 n32
EOF
BROKEN=1
RUN
Expand All @@ -44,14 +54,16 @@ CMDS=<<EOF
af
e asm.sub.var=false
pif
iI~cpu
iI~features
EOF
EXPECT=<<EOF
lui gp, 0x48
addiu gp, gp, 0xb40
move ra, zero
lui a0, 0x40
addiu a0, a0, 0x5474
lw a1, (sp)
lw a1, 0(sp)
addiu a2, sp, 4
addiu at, zero, -8
and sp, sp, at
Expand All @@ -64,6 +76,8 @@ sw t0, 0x10(sp)
sw v0, 0x14(sp)
jal sym.imp.__uClibc_main
sw sp, 0x18(sp)
cpu mips32
features noreorder cpic o32 n32
EOF
RUN
BROKEN=1
1 change: 1 addition & 0 deletions test/db/formats/elf/v850
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ block 0x100
type EXEC (Executable file)
arch v850
cpu N/A
features N/A
baddr 0x00100000
binsz 0x000edb6d
bintype elf
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/mdmp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CMDS=iI
EXPECT=<<EOF
arch x86
cpu N/A
features N/A
baddr ----------
binsz 0x00008f74
bintype mdmp
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/n3ds
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMDS=iI ; iS ; ie ; iT
EXPECT=<<EOF
arch arm
cpu N/A
features N/A
baddr ----------
binsz 0x0002d800
bintype N/A
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/ninds
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMDS=iI ; omlt ; iS ; ie
EXPECT=<<EOF
arch arm
cpu N/A
features N/A
baddr 0x02000000
binsz 0x001ce803
bintype N/A
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/pe/arm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ block 0x100
type EXEC (Executable file)
arch arm
cpu N/A
features N/A
baddr 0x00400000
binsz 0x00001e00
bintype pe
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/prg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EOF
EXPECT=<<EOF
arch 6502
cpu N/A
features N/A
baddr 0x00000801
binsz 0x00000026
bintype N/A
Expand Down
1 change: 1 addition & 0 deletions test/db/formats/smd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ block 0x100
type ROM
arch m68k
cpu N/A
features N/A
baddr 0x00000000
binsz 0x000272f8
bintype N/A
Expand Down
1 change: 1 addition & 0 deletions test/db/io/srec
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ EOF
EXPECT=<<EOF
arch arm
cpu N/A
features N/A
baddr 0x00008000
binsz 0x0008b9c8
bintype elf
Expand Down
6 changes: 5 additions & 1 deletion test/db/tools/rz_bin
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ EXPECT=<<EOF
[Info]
arch x86
cpu N/A
features N/A
baddr 0x08048000
binsz 0x00001323
bintype elf
Expand Down Expand Up @@ -668,6 +669,7 @@ EXPECT=<<EOF
[Info]
arch x86
cpu N/A
features N/A
baddr 0x00000000
binsz 0x00001b8b
bintype elf
Expand Down Expand Up @@ -713,6 +715,7 @@ EXPECT=<<EOF
[Info]
arch x86
cpu N/A
features N/A
baddr 0x00400000
binsz 0x001876b7
bintype elf
Expand Down Expand Up @@ -757,7 +760,8 @@ CMDS=!rz-bin -I ${RZ_FILE}
EXPECT=<<EOF
[Info]
arch x86
cpu N/A
cpu x86 64 all
features N/A
baddr 0x100000000
binsz 0x00002664
bintype mach0
Expand Down

0 comments on commit 4b15c60

Please sign in to comment.