[issue30212] test_ssl.py is broken in Centos7
STINNER Victor
report at bugs.python.org
Tue May 2 08:52:20 EDT 2017
STINNER Victor added the comment:
> in 3.6.1 the test passes but it's because on sub-test was removed.
The unit tests still exist and were enhanced.
On Python 3.5, the BIO read-write data test used the external server self-signed.pythontest.net. On Python 3.6, the test now uses a server running locally. See issue #25940 and commit 3840b2ac6728d1940a7efc2ecab2c7d9a100c080.
Note: the failing test was renamed to test_bio_read_write_data.
--
David: You can try the following command to run the failing test in verbose mode (and only run this test). You can add --forever option to run the test in a loop until it fails.
In your output, I see "Needed 3 calls to complete do_handshake(). Needed 1 calls to complete write()." but not "Needed 2 calls to complete read(). Needed 1 calls to complete unwrap().".
For Python 3.5:
haypo at selma$ ./python -m test -u all test_ssl -v -m test_read_write_data
== CPython 3.5.3+ (default, May 2 2017, 11:20:59) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
== Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian
== hash algorithm: siphash24 64bit
== /home/haypo/prog/python/3.5/build/test_python_20359
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.2k-fips 26 Jan 2017' (1, 0, 2, 11, 15)
under Linux ('Fedora', '25', 'Twenty Five')
HAS_SNI = True
OP_ALL = 0x800003ff
OP_NO_TLSv1_1 = 0x10000000
test_read_write_data (test.test_ssl.NetworkedBIOTests) ... Needed 3 calls to complete do_handshake().
Needed 1 calls to complete write().
Needed 2 calls to complete read().
Needed 1 calls to complete unwrap().
ok
----------------------------------------------------------------------
Ran 1 test in 0.456s
OK
1 test OK.
For Python 3.6:
haypo at selma$ ./python -m test test_ssl -v -m test_bio_read_write_data
== CPython 3.6.1+ (default, May 2 2017, 10:23:14) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]
== Linux-4.10.11-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian
== hash algorithm: siphash24 64bit
== cwd: /home/haypo/prog/python/3.6/build/test_python_20383
== encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.0.2k-fips 26 Jan 2017' (1, 0, 2, 11, 15)
under Linux ('Fedora', '25', 'Twenty Five')
HAS_SNI = True
OP_ALL = 0x800003ff
OP_NO_TLSv1_1 = 0x10000000
test_bio_read_write_data (test.test_ssl.SimpleBackgroundTests) ... server: new connection from ('127.0.0.1', 42160)
server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1/SSLv3', 256)
server: selected protocol is now None
Needed 3 calls to complete do_handshake().
Needed 1 calls to complete write().
Needed 2 calls to complete read().
Needed 2 calls to complete unwrap().
ok
----------------------------------------------------------------------
Ran 1 test in 0.058s
OK
1 test OK.
Total duration: 413 ms
Tests result: SUCCESS
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30212>
_______________________________________
More information about the Python-bugs-list
mailing list