Skip to content

Commit 8f99ebd

Browse files
committed
tests: hide memory-mapped files from lsof output
Seems to be no saner way to do this.
1 parent f4cf67f commit 8f99ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/testlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def _teardown_check_threads(self):
338338
def _teardown_check_fds(self):
339339
mitogen.core.Latch._on_fork()
340340
if get_fd_count() != self._fd_count_before:
341-
import os; os.system('lsof +E -w -p %s' % (os.getpid(),))
341+
import os; os.system('lsof +E -w -p %s | grep -vw mem' % (os.getpid(),))
342342
assert 0, "%s leaked FDs. Count before: %s, after: %s" % (
343343
self, self._fd_count_before, get_fd_count(),
344344
)

0 commit comments

Comments
 (0)