Skip to content

Commit 3675f55

Browse files
committed
Address @elicn feedback
1 parent 4448d4c commit 3675f55

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

qiling/os/posix/syscall/epoll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def ql_syscall_epoll_ctl(ql: Qiling, epfd: int, op: int, fd: int, event: int):
118118
if op not in (EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD):
119119
return -EINVAL
120120

121-
if epfd == fd or fd == 0xffffffff: # latter condition was seen in testing, but should not happen in the real world
121+
if epfd == fd:
122122
return -EINVAL
123123

124124
if epfd not in range(NR_OPEN):

tests/test_elf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_elf_linux_x8664_static(self):
217217
ql = Qiling(["../examples/rootfs/x8664_linux/bin/x8664_hello_static"], "../examples/rootfs/x8664_linux", verbose=QL_VERBOSE.DEBUG)
218218
ql.run()
219219
del ql
220-
#@unittest.skip('Experiment to avoid FD issue')
220+
221221
def test_elf_linux_x86(self):
222222
filename = 'test.qlog'
223223

@@ -789,7 +789,9 @@ def test_elf_linux_x8664_epoll_simple(self):
789789
ql.run()
790790

791791
self.assertIn(b'echo\n', ql.os.stdout.read())
792+
792793
del ql
794+
793795
def test_elf_linux_x8664_epoll_server(self):
794796
# This tests a simple server that uses epoll to wait for data, then prints it out. It has
795797
# been modified to exit after data has been received; instead of a typical server operation

0 commit comments

Comments
 (0)