Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_embed and test_ssl failing on linux 6.12.13 #131579

Open
abhi-jha opened this issue Mar 22, 2025 · 5 comments
Open

test_embed and test_ssl failing on linux 6.12.13 #131579

abhi-jha opened this issue Mar 22, 2025 · 5 comments
Labels
tests Tests in the Lib/test dir topic-SSL type-bug An unexpected behavior, bug, or error

Comments

@abhi-jha
Copy link

OS : Linux kali 6.12.13-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.12.13-1kali1 (2025-02-11) x86_64 GNU/Linux

Build python

./configure  --with-pydebug --with-trace-refs

make

./python -m venv .venv

source .venv/bin/activate

make test #test_ssl and test_embed fails

python -m test -v test_embed #fails

python -m test -v test_ssl #fails

Failure for test_ssl in IDE for comparison.

Image

Is there more to python setup for the tests to succeed? The SSL test seems to be comparing default(7) to actual(8) options hence the mismatch.

I don't know why the test_embed is failing.

Error logs:

0:01:18 load avg: 7.17 [1/2/1] test_ssl failed (1 failure)
Re-running test_ssl in verbose mode (matching: test_options)
test_ssl: testing with 'OpenSSL 3.4.1 11 Feb 2025' (3, 4, 0, 1, 0)
          under 'Linux-6.12.13-amd64-x86_64-with-glibc2.40'
          HAS_SNI = True
          OP_ALL = 0x80000050
          OP_NO_TLSv1_1 = 0x10000000
test_options (test.test_ssl.BasicSocketTests.test_options) ... ok
test_options (test.test_ssl.ContextTests.test_options) ... FAIL
test_options (test.test_ssl.TestEnumerations.test_options) ... ok

======================================================================
FAIL: test_options (test.test_ssl.ContextTests.test_options)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kali/Desktop/GIT/cpython/Lib/test/test_ssl.py", line 970, in test_options
    self.assertEqual(default, ctx.options)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
AssertionError: <Opti[52 chars]CIPHER_SERVER_PREFERENCE|OP_NO_SSLv3|OP_ALL: 2186412112> != <Opti[52 chars]CIPHER_SERVER_PREFERENCE|OP_NO_SSLv3|OP_ALL|262144: 2186674256>

----------------------------------------------------------------------
Ran 3 tests in 0.004s

FAILED (failures=1)
test test_ssl failed
0:01:18 load avg: 7.17 [2/2/2] test_embed failed (1 failure)
Re-running test_embed in verbose mode (matching: test_init_setpythonhome)
test_init_setpythonhome (test.test_embed.InitConfigTests.test_init_setpythonhome) ... FAIL

======================================================================
FAIL: test_init_setpythonhome (test.test_embed.InitConfigTests.test_init_setpythonhome)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/kali/Desktop/GIT/cpython/Lib/test/test_embed.py", line 1456, in test_init_setpythonhome
    self.check_all_configs("test_init_setpythonhome", config,
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                           api=API_COMPAT, env=env)
                           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/Desktop/GIT/cpython/Lib/test/test_embed.py", line 948, in check_all_configs
    self.check_config(configs, expected_config)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/Desktop/GIT/cpython/Lib/test/test_embed.py", line 874, in check_config
    self.assertEqual(config, expected)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
AssertionError: {'argv': [''], 'base_exec_prefix': '/home/k[2036 chars]None} != {'_config_init': 1, 'isolated': False, 'use[2022 chars]alse}
  {'_config_init': 1,
   '_init_main': True,
   '_install_importlib': True,
   'argv': [''],
   'base_exec_prefix': '/home/kali/Desktop/GIT/cpython',
   'base_executable': '/home/kali/Desktop/GIT/cpython/.venv1/bin/python3',
   'base_prefix': '/home/kali/Desktop/GIT/cpython',
   'buffered_stdio': True,
   'bytes_warning': 0,
   'check_hash_pycs_mode': 'default',
   'code_debug_ranges': True,
   'configure_c_stdio': False,
   'cpu_count': -1,
   'dev_mode': False,
   'dump_refs': False,
   'dump_refs_file': None,
-  'exec_prefix': '/home/kali/Desktop/GIT/cpython/.venv1',
?                                                -------

+  'exec_prefix': '/home/kali/Desktop/GIT/cpython',
   'executable': '/home/kali/Desktop/GIT/cpython/.venv1/bin/python3',
   'faulthandler': False,
   'hash_seed': 0,
   'home': '/home/kali/Desktop/GIT/cpython',
   'import_time': False,
   'inspect': False,
   'install_signal_handlers': True,
   'int_max_str_digits': 4300,
   'interactive': False,
   'isolated': False,
   'malloc_stats': False,
   'module_search_paths': ['/usr/local/lib/python314.zip',
                           '/home/kali/Desktop/GIT/cpython/Lib',
                           '/home/kali/Desktop/GIT/cpython/build/lib.linux-x86_64-3.14',
                           '/home/kali/Desktop/GIT/cpython/lib/python314.zip',
                           '/home/kali/Desktop/GIT/cpython/lib/python3.14',
                           '/home/kali/Desktop/GIT/cpython/lib/python3.14/lib-dynload'],
   'module_search_paths_set': True,
   'optimization_level': 0,
   'orig_argv': [],
   'parse_argv': False,
   'parser_debug': False,
   'pathconfig_warnings': True,
   'perf_profiling': 0,
   'platlibdir': 'lib',
-  'prefix': '/home/kali/Desktop/GIT/cpython/.venv1',
?                                           -------

+  'prefix': '/home/kali/Desktop/GIT/cpython',
   'program_name': 'python3',
   'pycache_prefix': None,
   'pythonpath_env': '/usr/local/lib/python314.zip:/home/kali/Desktop/GIT/cpython/Lib:/home/kali/Desktop/GIT/cpython/build/lib.linux-x86_64-3.14',
   'quiet': False,
   'run_command': None,
   'run_filename': None,
   'run_module': None,
   'safe_path': False,
   'show_ref_count': False,
   'site_import': True,
   'skip_source_first_line': False,
   'stdlib_dir': '/home/kali/Desktop/GIT/cpython/lib/python3.14',
   'sys_path_0': None,
   'tracemalloc': 0,
   'use_environment': True,
   'use_frozen_modules': True,
   'use_hash_seed': False,
   'user_site_directory': True,
   'verbose': 0,
   'warn_default_encoding': False,
   'warnoptions': [],
   'write_bytecode': True,
   'xoptions': {}}

----------------------------------------------------------------------
Ran 1 test in 0.041s

FAILED (failures=1)
test test_embed failed
2 tests failed again:
    test_embed test_ssl

== Tests result: FAILURE then FAILURE ==
@picnixz picnixz added tests Tests in the Lib/test dir topic-SSL type-bug An unexpected behavior, bug, or error labels Mar 22, 2025
@vstinner
Copy link
Member

Which Python version did you try?

@abhi-jha
Copy link
Author

Python version : 3.14

I compiled the source on main, created a venv with it and ran make test inside the virtual environment.

Python 3.14.0a6+ (heads/master:49fb75c676, Mar 23 2025, 07:12:36) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

@vstinner
Copy link
Member

vstinner commented Apr 2, 2025

I cannot reproduce the test_embed failure.

$ git clean -fdx
$ ./configure  --with-pydebug --with-trace-refs && make
$ ./python -m venv .venv
$ source .venv/bin/activate
(.venv) $ python -m test -v test_embed #fails
...
test_init_setpythonhome (test.test_embed.InitConfigTests.test_init_setpythonhome) ...
skipped "'/home/vstinner/python/main/.venv/bin/Programs/_testembed' doesn't exist"
...

@vstinner
Copy link
Member

vstinner commented Apr 2, 2025

test_ssl: testing with 'OpenSSL 3.4.1 11 Feb 2025' (3, 4, 0, 1, 0)

For test_ssl, I suppose that the test fails with the recent OpenSSL 3.4.

I cannot reproduce the test_ssl failure with my OpenSSL 3.2.4 11 Feb 2025.

@vstinner
Copy link
Member

vstinner commented Apr 2, 2025

I don't know why the test_embed is failing.

It's because your run the test in a virtual environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir topic-SSL type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants