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

Problems running testsuite on Windows with Python 3

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Thu, 16 Apr 2020 22:53:50 +0200

While testing 1.14.0-rc2 I ran into multiple problems when trying to
run the testsuite with Python 3 (3.8.2 in my case, but I tried 3.7.7
too with identical results). In the end I bailed, and ran the
testsuite (successfully) with Python 2.7.

First of all: the testsuite simply doesn't run with Py3.8 when the
output is redirected to a logfile, because of this problem:

https://stackoverflow.coma/questions/52373180/python-on-windows-handle-invalid-when-redirecting-stdout-writing-to-file

Adding --log-to-stdout allows it to continue, as does defining the
PYTHONLEGACYWINDOWSSTDIO environment variable (as is explained in the
above SO article). Or running with Py 3.5 or lower (the problem
happens since Python 3.6, as explained in the SO).

So it seems the technique of redirecting stdout to a file by using
os.dup2() simply doesn't work well anymore. If you add a print
statement below line 852 in run_tests.py (just below the first
os.dup2()) you get this error output:

[[[
Testing Release configuration on local repository.
[1/1] authz_tests.pyTraceback (most recent call last):
  File "win-tests.py", line 1126, in <module>
    failed = th.run(tests_to_run)
  File "C:\research\svn\dev\subversion-1.14.0-rc2\build\run_tests.py",
line 590, in run
    failed = self._run_local_schedulers(testlist)
  File "C:\research\svn\dev\subversion-1.14.0-rc2\build\run_tests.py",
line 536, in _run_local_schedulers
    failed = self._run_test(testcase, count, testcount) or failed
  File "C:\research\svn\dev\subversion-1.14.0-rc2\build\run_tests.py",
line 947, in _run_test
    failed = testcase(progabs, progdir, progbase, test_nums, dots_needed)
  File "C:\research\svn\dev\subversion-1.14.0-rc2\build\run_tests.py",
line 853, in _run_py_test
    print("PING")
OSError: [WinError 6] The handle is invalid
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w'
encoding='utf-8'>
OSError: [WinError 6] The handle is invalid
]]]

Running the testsuite with Py 3.8.2 with PYTHONLEGACYWINDOWSSTDIO
defined in the environment allows it to complete. It results in 68
FAILS (for ra_local x fsfs). See attached fails.log.

I hope some Python-experienced people can look at this a bit closer
(sorry, I've run out of time for now to dig further -- though I can
probably still make some time to try out different patches if there
are suggestions).

Thanks,

-- 
Johan

  • application/octet-stream attachment: fails.log
Received on 2020-04-16 22:54:13 CEST

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.