-
Notifications
You must be signed in to change notification settings - Fork 776
epoll support #1558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
epoll support #1558
Changes from 2 commits
1ee9ccb
18381f4
1f12da5
e208a34
2479b91
f79d179
290f116
c6eee99
033fb4b
fd32154
f2861b7
f99e07a
0022b8d
549673b
74380b2
dbf2138
96674e1
f108127
0c96871
bf83e9c
5a87323
12d3c58
90df05f
265406e
b724f4c
e4242ca
f9497bc
47c3df1
4d0b939
34fcfb5
82de6f9
5ad49c0
ca0d35a
31720cf
e0d8889
92e43a3
fdfec5b
d5b51dd
aefef5f
2ecd1d9
a76b858
4448d4c
3675f55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -217,13 +217,13 @@ def test_elf_linux_x8664_static(self): | |
| 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') | ||
libumem marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| def test_elf_linux_x86(self): | ||
| filename = 'test.qlog' | ||
|
|
||
| ql = Qiling(["../examples/rootfs/x86_linux/bin/x86_hello"], "../examples/rootfs/x86_linux", verbose=QL_VERBOSE.DEBUG, log_devices=[filename]) | ||
| ql.run() | ||
|
|
||
| ql._log_file_fd.handlers[0].close() # prevent FD leak that causes downstream issues | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is very unusual.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When running this test case, there was a dangling FD pointing to So here, I just force a closure to keep the FD list in a consistent state. |
||
| os.remove(filename) | ||
| del ql | ||
|
|
||
|
|
@@ -789,8 +789,7 @@ def test_elf_linux_x8664_epoll_simple(self): | |
| ql.run() | ||
|
|
||
| self.assertIn(b'echo\n', ql.os.stdout.read()) | ||
| del ql | ||
| @unittest.skip("See comment in https://github.com/qilingframework/qiling/pull/1558") | ||
| del ql | ||
libumem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 | ||
|
|
@@ -810,7 +809,6 @@ def hook_newfstatat(ql: Qiling, dirfd: int, pathname: int, statbuf: int, flags: | |
| def client(): | ||
| # give time for the server to listen | ||
| time.sleep(3) | ||
|
|
||
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
| s.connect(("127.0.0.1", 8000)) | ||
| s.send(b"hello world") | ||
|
|
@@ -826,7 +824,6 @@ def client(): | |
|
|
||
| client_thread = threading.Thread(target=client, daemon=True) | ||
| client_thread.start() | ||
|
|
||
| ql.run() | ||
|
|
||
| self.assertIn(b'hello world', ql.os.stdout.read(200)) # 200 is arbitrary--"good enough" for this task | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.