[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Patch] Allow running 'make check' with PyPy.

From: Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>
Date: Wed, 11 Nov 2020 16:14:23 +0900

Hi,

I tried to run 'make check' with PyPy (PyPy3 and PyPy 7.3), but
it failed by "To many open files", even if "ulimit -n" returns
175833. I don't think test processes used descriptor so much and
I couldn't find what makes the limit so smaller.

However I could reduce max number of descriptors simultaneously used,
by looking over the source of the test suite.
(attached source test-suite-care-resources-patch.txt)

commit message:
[[[
Ensure close file descriptors by using context manager in test suite.

Generally, it is true that as file descriptors are closed when their
underlying objects are deleted, we don't need close them explicitly.
However if a Python language implementation that uses other strategy
than reference count model, there is no warranty it will happen
immediately after when those objects lose the last reference. So we
use context manager to ensure close() is called immediately after
those objects to be unnecessary. This helps us to run 'make check'
with PyPy even smaler limit of number of open files, although we
don't recommend use it because it is much slower than CPython for
this purpose.

* build/run_tests.py
  (TestHarness._init_c_tests): Use context manager to write file.
  (TestHarness.Job.execute,
  TestHarness.CollectingThread._count_c_tests,
  Testharness.CollectingThread._count_py_tests,):
    Use context manager for Popen object.

* subversion/tests/cmdline/svntest/actions.py
  (load_repo, load_dumpfile): Use context manager to read file contents.

* subversion/tests/cmdline/svntest/main.py
  (trust_ssl_cert): Use context manager to read file contents.
  
* subversion/tests/cmdline/svntest/sandbox.py
  (Sandbox._ensure_authz get_content): New function.
  (Sandbox._ensure_authz): Use it.

* subversion/tests/cmdline/svntest/tree.py
  (get_text): Use context manager to read file contents.

* subversion/tests/cmdline/svntest/wc.py
  (State.from_wc): Use context manager to read file contents.
]]]

I don't think we support to run tests on PyPy but also I don't think
it is worthless.

Any thoughts?

Cheers,

-- 
Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>

Received on 2020-11-11 08:15:23 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.