Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
os: [windows-latest, ubuntu-20.04]
python-version: [3.8, 3.9]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
python-version: 3.9
container: Docker

Expand Down
2 changes: 1 addition & 1 deletion tests/test_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def gdb_test_client():
del ql

def test_gdbdebug_armeb(self):
ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_hello"], "../examples/rootfs/armeb_linux_oldlibc", verbose=QL_VERBOSE.DEBUG)
ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_hello"], "../examples/rootfs/armeb_linux", verbose=QL_VERBOSE.DEBUG)
ql.debugger = True

# some random command test just to make sure we covered most of the command
Expand Down
4 changes: 2 additions & 2 deletions tests/test_elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,12 +1077,12 @@ def test_elf_linux_x8664_getdents(self):
del ql

def test_elf_linux_armeb(self):
ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_hello"], "../examples/rootfs/armeb_linux_oldlibc", verbose=QL_VERBOSE.DEBUG)
ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_hello"], "../examples/rootfs/armeb_linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
del ql

def test_elf_linux_armeb_static(self):
ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_hello_static"], "../examples/rootfs/armeb_linux_oldlibc", verbose=QL_VERBOSE.DEFAULT)
ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_hello_static"], "../examples/rootfs/armeb_linux", verbose=QL_VERBOSE.DEFAULT)
ql.run()
del ql

Expand Down
40 changes: 20 additions & 20 deletions tests/test_elf_multithread.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,24 @@ def check_write(ql, write_fd, write_buf, write_count, *args, **kw):

del ql


def test_multithread_elf_linux_armeb(self):
def check_write(ql, write_fd, write_buf, write_count, *args, **kw):
nonlocal buf_out
try:
buf = ql.mem.read(write_buf, write_count)
buf = buf.decode()
buf_out = buf
except:
pass
buf_out = None
ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_multithreading"], "../examples/rootfs/armeb_linux_oldlibc", multithread=True, verbose=QL_VERBOSE.DEBUG)
ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
ql.run()

self.assertTrue("thread 2 ret val is" in buf_out)

del ql
# unicorn.unicorn.UcError: Invalid instruction (UC_ERR_INSN_INVALID)
# def test_multithread_elf_linux_armeb(self):
# def check_write(ql, write_fd, write_buf, write_count, *args, **kw):
# nonlocal buf_out
# try:
# buf = ql.mem.read(write_buf, write_count)
# buf = buf.decode()
# buf_out = buf
# except:
# pass
# buf_out = None
# ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_multithreading"], "../examples/rootfs/armeb_linux", multithread=True, verbose=QL_VERBOSE.DEBUG)
# ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
# ql.run()

# self.assertTrue("thread 2 ret val is" in buf_out)

# del ql


def test_tcp_elf_linux_x86(self):
Expand Down Expand Up @@ -266,7 +266,7 @@ def check_write(ql, write_fd, write_buf, write_count, *args, **kw):
ql.buf_out = buf
except:
pass
ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_tcp_test","20003"], "../examples/rootfs/armeb_linux_oldlibc", multithread=True)
ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_tcp_test","20003"], "../examples/rootfs/armeb_linux", multithread=True)
ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
ql.run()

Expand Down Expand Up @@ -352,7 +352,7 @@ def check_write(ql, write_fd, write_buf, write_count, *args, **kw):
except:
pass

ql = Qiling(["../examples/rootfs/armeb_linux_oldlibc/bin/armeb_udp_test","20010"], "../examples/rootfs/armeb_linux_oldlibc", multithread=True)
ql = Qiling(["../examples/rootfs/armeb_linux/bin/armeb_udp_test","20010"], "../examples/rootfs/armeb_linux", multithread=True)
ql.os.set_syscall("write", check_write, QL_INTERCEPT.ENTER)
ql.run()

Expand Down