mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
Address @elicn feedback
This commit is contained in:
@@ -118,7 +118,7 @@ def ql_syscall_epoll_ctl(ql: Qiling, epfd: int, op: int, fd: int, event: int):
|
||||
if op not in (EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD):
|
||||
return -EINVAL
|
||||
|
||||
if epfd == fd or fd == 0xffffffff: # latter condition was seen in testing, but should not happen in the real world
|
||||
if epfd == fd:
|
||||
return -EINVAL
|
||||
|
||||
if epfd not in range(NR_OPEN):
|
||||
|
||||
+3
-1
@@ -217,7 +217,7 @@ class ELFTest(unittest.TestCase):
|
||||
ql = Qiling(["../examples/rootfs/x8664_linux/bin/x8664_hello_static"], "../examples/rootfs/x8664_linux", verbose=QL_VERBOSE.DEBUG)
|
||||
ql.run()
|
||||
del ql
|
||||
#@unittest.skip('Experiment to avoid FD issue')
|
||||
|
||||
def test_elf_linux_x86(self):
|
||||
filename = 'test.qlog'
|
||||
|
||||
@@ -789,7 +789,9 @@ class ELFTest(unittest.TestCase):
|
||||
ql.run()
|
||||
|
||||
self.assertIn(b'echo\n', ql.os.stdout.read())
|
||||
|
||||
del ql
|
||||
|
||||
def test_elf_linux_x8664_epoll_server(self):
|
||||
# This tests a simple server that uses epoll to wait for data, then prints it out. It has
|
||||
# been modified to exit after data has been received; instead of a typical server operation
|
||||
|
||||
Reference in New Issue
Block a user