Address @elicn feedback

This commit is contained in:
libumem
2025-11-16 18:19:20 +00:00
parent 4448d4c129
commit 3675f557e9
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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