Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864951
D8350.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8350.diff
View Options
diff --git a/test/functional/test_framework/netutil.py b/test/functional/test_framework/netutil.py
--- a/test/functional/test_framework/netutil.py
+++ b/test/functional/test_framework/netutil.py
@@ -9,6 +9,7 @@
import array
from binascii import unhexlify
+from errno import ENOENT, EINVAL
import os
import socket
import struct
@@ -34,9 +35,20 @@
base = '/proc/{}/fd'.format(pid)
inodes = []
for item in os.listdir(base):
- target = os.readlink(os.path.join(base, item))
- if target.startswith('socket:'):
- inodes.append(int(target[8:-1]))
+ try:
+ target = os.readlink(os.path.join(base, item))
+ except OSError as err:
+ if err.errno == ENOENT:
+ # The file which is gone in the meantime
+ continue
+ elif err.errno == EINVAL:
+ # Not a link
+ continue
+ else:
+ raise
+ else:
+ if target.startswith('socket:'):
+ inodes.append(int(target[8:-1]))
return inodes
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 23:37 (27 m, 45 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5866162
Default Alt Text
D8350.diff (1 KB)
Attached To
D8350: Fix rpc_bind flakiness
Event Timeline
Log In to Comment