Hi, On 2025/06/05 20:10, Timofei Zhakov wrote: > Hi, > > (For some reason there is no thread to “reply” to about this) > > I did a little research to find a reason why basic_test#73 is failing on > Linux. > > Few lines of background: This is a test that I added to test Unicode > functionality of the cmdline, and in which I create and commit files with > emojis. It’s currently passing on Windows (in utf8-cmdline-prototype), but > fails on Linux due to unsuccessful conversion to urf8 from native encoding. > > Also, it works correctly if svn is run from cmdline instead of a python > script. > > So, I did several testing with other programs (python in my exact case) with > Unicode arguments. And I noticed that it fails due to a similar reason > (funny). But, I remember subprocess.run() was working. > > I concluded that Popen() doesn’t properly work with Unicode args on UNIX. > Should I skip this test on this platform then, since the problem is in python > itself? > > Also I found a similar issue on GitHub: > https://github.com/python/cpython/issues/105312 > > Timofei Zhakov
Root cause of the issue is caused by setting LC_ALL=C in tests/cmdline/svntest/main.py. [[[ diff --git a/subversion/tests/cmdline/svntest/main.py b/subversion/tests/cmdline/svntest/main.py index bea54f101..3f19aa3a6 100644 --- a/subversion/tests/cmdline/svntest/main.py +++ b/subversion/tests/cmdline/svntest/main.py @@ -153,7 +153,7 @@ wc_author2 = 'jconstant' # use the same password as wc_author stack_trace_regexp = r'(?:.*subversion[\\//].*\.c:[0-9]*,$|.*apr_err=.*)' # Set C locale for command line programs -os.environ['LC_ALL'] = 'C' +os.environ['LC_ALL'] = 'C.utf8' # XXX workaround ###################################################################### # Permission constants used with e.g. chmod() and open(). ]]] Before the workaround: [[[ $ make check TESTS=subversion/tests/cmdline/basic_tests.py#73 [1/1] basic_tests.py..............................................................FAILURE At least one test FAILED, checking /home/jun66j5/src/subversion/subversion.git/tests.log FAIL: basic_tests.py 73: test unicode arguments Summary of test results: 1 test FAILED Python version: 3.10.12. SUMMARY: 😱 Some tests failed make: *** [Makefile:553: check] Error 1 }}} After the workaround: [[[ $ make check TESTS=subversion/tests/cmdline/basic_tests.py#73 [1/1] basic_tests.py..............................................................success Summary of test results: 1 test PASSED Python version: 3.10.12. SUMMARY: 🍺 All tests successful ]]] -- Jun Omae <jun6...@gmail.com> (大前 潤)