-
Notifications
You must be signed in to change notification settings - Fork 24
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
1.8.0: pytest is failing and deprecacion warnings #65
Comments
Gentle ping .. 😄 |
Gentle ping .. any update? 🤔 |
Here is update pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0
configfile: setup.cfg
testpaths: tests
collected 45 items
tests/test_manhole.py ...FFF..FF.F.F........FF.ss...F.Fs.F [ 80%]
tests/test_manhole_cli.py ......... [100%]
=================================== FAILURES ===================================
_________________________________ test_simple __________________________________
tests/test_manhole.py:85: in test_simple
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389253, is_alive=True)> ************
Manhole[1389253:1702824216.9346]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389253:1702824216.9348]: Manhole UDS path: /tmp/manhole-1389253
Manhole[1389253:1702824216.9348]: Waiting for new connection (in pid:1389253) ...
****************************************************************************************************
______________________ test_connection_handler_exec[str] _______________________
tests/test_manhole.py:97: in test_connection_handler_exec
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389258, is_alive=True)> ************
Manhole[1389258:1702824218.3369]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389258:1702824218.3371]: Manhole UDS path: /tmp/manhole-1389258
Manhole[1389258:1702824218.3372]: Waiting for new connection (in pid:1389258) ...
****************************************************************************************************
______________________ test_connection_handler_exec[func] ______________________
tests/test_manhole.py:97: in test_connection_handler_exec
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389261, is_alive=True)> ************
Manhole[1389261:1702824219.6968]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389261:1702824219.6969]: Manhole UDS path: /tmp/manhole-1389261
Manhole[1389261:1702824219.6969]: Waiting for new connection (in pid:1389261) ...
****************************************************************************************************
____________________________ test_daemon_connection ____________________________
tests/test_manhole.py:143: in test_daemon_connection
pytest.raises((socket.error, OSError), assert_manhole_running, proc, uds_path, extra=terminate_and_read)
tests/test_manhole.py:56: in assert_manhole_running
extra(client)
tests/test_manhole.py:137: in terminate_and_read
wait_for_strings(proc.read, TIMEOUT, 'Died with KeyboardInterrupt', 'DIED.')
/usr/lib/python3.8/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['DIED.', 'Died with KeyboardInterrupt'] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f9189e96a60>> *******
######### ProcessID=1389271, ThreadID=140366300587712 #########
File: "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 238, in run
self.connection_handler(self.client)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 305, in handle_connection_repl
handle_repl(_MANHOLE.locals)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 354, in handle_repl
dump_stacktraces()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 633, in dump_stacktraces
for filename, lineno, name, line in traceback.extract_stack(stack):
######### ProcessID=1389271, ThreadID=140366308980416 #########
File: "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 207, in run
client.join()
File: "/usr/lib64/python3.8/threading.py", line 1011, in join
self._wait_for_tstate_lock()
File: "/usr/lib64/python3.8/threading.py", line 1027, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
######### ProcessID=1389271, ThreadID=140366548186944 #########
File: "/home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0/tests/helper.py", line 215, in <module>
time.sleep(TIMEOUT)
#############################################
Python 3.8.18 (default, Nov 22 2023, 11:59:28)
[GCC 13.2.1 20231110 (Red Hat 13.2.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(ManholeConsole)
>>> FOOBAR
>>>
****************************************************************************************************
*********** <bound method TestProcess.read of TestProcess(pid=1389271, is_alive=False)> ************
Manhole[1389271:1702824222.6303]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389271:1702824222.6306]: Manhole UDS path: /tmp/manhole-1389271
Manhole[1389271:1702824222.6306]: Waiting for new connection (in pid:1389271) ...
Manhole[1389271:1702824222.6765]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[1389271:1702824222.6766]: Accepted connection on fd:4 from PID:1389244 UID:1000 GID:1000
Fatal Python error: could not acquire lock for <_io.BufferedReader name=4> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x56408c55f680)
Thread 0x00007fa9937c26c0 (most recent call first):
File "/usr/lib64/python3.8/socket.py", line 669 in readinto
File "/usr/lib64/python3.8/code.py", line 274 in raw_input
File "/usr/lib64/python3.8/code.py", line 227 in interact
File "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 365 in handle_repl
File "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 305 in handle_connection_repl
File "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 238 in run
File "/usr/lib64/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib64/python3.8/threading.py", line 890 in _bootstrap
Thread 0x00007fa993fc36c0 (most recent call first):
File "/usr/lib64/python3.8/threading.py", line 1027 in _wait_for_tstate_lock
File "/usr/lib64/python3.8/threading.py", line 1011 in join
File "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 207 in run
File "/usr/lib64/python3.8/threading.py", line 932 in _bootstrap_inner
File "/usr/lib64/python3.8/threading.py", line 890 in _bootstrap
Current thread 0x00007fa9a23e3740 (most recent call first):
<no Python frame>
****************************************************************************************************
__________________________ test_non_daemon_connection __________________________
tests/test_manhole.py:164: in test_non_daemon_connection
assert_manhole_running(proc, uds_path, extra=terminate_and_read, oneshot=True)
tests/test_manhole.py:56: in assert_manhole_running
extra(client)
tests/test_manhole.py:158: in terminate_and_read
wait_for_strings(proc.read, TIMEOUT, 'Died with KeyboardInterrupt')
/usr/lib/python3.8/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['Died with KeyboardInterrupt'] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f9189e5a6a0>> *******
######### ProcessID=1389275, ThreadID=140313386526400 #########
File: "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 238, in run
self.connection_handler(self.client)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 305, in handle_connection_repl
handle_repl(_MANHOLE.locals)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 354, in handle_repl
dump_stacktraces()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 633, in dump_stacktraces
for filename, lineno, name, line in traceback.extract_stack(stack):
######### ProcessID=1389275, ThreadID=140313394919104 #########
File: "/usr/lib64/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/manhole/__init__.py", line 207, in run
client.join()
File: "/usr/lib64/python3.8/threading.py", line 1011, in join
self._wait_for_tstate_lock()
File: "/usr/lib64/python3.8/threading.py", line 1027, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
######### ProcessID=1389275, ThreadID=140313633187648 #########
File: "/home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0/tests/helper.py", line 244, in <module>
time.sleep(0.3) # give the manhole a bit enough time to start
#############################################
Python 3.8.18 (default, Nov 22 2023, 11:59:28)
[GCC 13.2.1 20231110 (Red Hat 13.2.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(ManholeConsole)
>>> FOOBAR
>>>
****************************************************************************************************
************ <bound method TestProcess.read of TestProcess(pid=1389275, is_alive=True)> ************
Manhole[1389275:1702824233.0060]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389275:1702824233.0064]: Manhole UDS path: /tmp/manhole-1389275
Manhole[1389275:1702824233.0064]: Waiting for new connection (in pid:1389275) ...
Manhole[1389275:1702824233.0399]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[1389275:1702824233.0401]: Accepted connection on fd:4 from PID:1389244 UID:1000 GID:1000
****************************************************************************************************
____________________________ test_locals_after_fork ____________________________
tests/test_manhole.py:179: in test_locals_after_fork
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389283, is_alive=True)> ************
Manhole[1389283:1702824244.9683]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389283:1702824244.9694]: Manhole UDS path: /tmp/manhole-1389283
Manhole[1389283:1702824244.9695]: Waiting for new connection (in pid:1389283) ...
Manhole[1389286:1702824244.9705]: Fork detected. Reinstalling Manhole.
Manhole[1389286:1702824244.9714]: Delaying UDS binding 0.5 seconds ...
****************************************************************************************************
_______________________________ test_socket_path _______________________________
tests/test_manhole.py:206: in test_socket_path
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389293, is_alive=True)> ************
Manhole[1389293:1702824247.8505]: Not patching os.fork and os.forkpty. Using user socket path /tmp/manhole-socket
Manhole[1389293:1702824247.8506]: Manhole UDS path: /tmp/manhole-socket
Manhole[1389293:1702824247.8507]: Waiting for new connection (in pid:1389293) ...
****************************************************************************************************
________________________________ test_with_fork ________________________________
tests/test_manhole.py:343: in test_with_fork
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389328, is_alive=True)> ************
Manhole[1389328:1702824262.5470]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389328:1702824262.5474]: Manhole UDS path: /tmp/manhole-1389328
Manhole[1389328:1702824262.5474]: Waiting for new connection (in pid:1389328) ...
****************************************************************************************************
______________________________ test_with_forkpty _______________________________
tests/test_manhole.py:365: in test_with_forkpty
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389331, is_alive=True)> ************
Manhole[1389331:1702824263.9101]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[1389331:1702824263.9104]: Manhole UDS path: /tmp/manhole-1389331
Manhole[1389331:1702824263.9104]: Waiting for new connection (in pid:1389331) ...
****************************************************************************************************
__________________________ test_oneshot_on_usr2_error __________________________
tests/test_manhole.py:470: in test_oneshot_on_usr2_error
proc.reset()
E AttributeError: 'TestProcess' object has no attribute 'reset'
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389350, is_alive=True)> ************
Manhole[1389350:1702824288.8589]: Not patching os.fork and os.forkpty. Oneshot activation is done by signal Signals.SIGUSR2
Manhole[1389350:1702824298.9425]: Manhole UDS path: /tmp/manhole-1389350
Manhole[1389350:1702824298.9426]: Waiting for new connection (in pid:1389350) ...
Manhole[1389350:1702824298.9932]: Accepted connection on fd:4 from PID:1389244 UID:1000 GID:1000
Manhole[1389350:1702824299.0943]: DONE.
Manhole[1389350:1702824299.0945]: Cleaned up.
****************************************************************************************************
_______________________ test_environ_variable_activation _______________________
tests/test_manhole.py:493: in test_environ_variable_activation
wait_for_strings(proc.read, TIMEOUT,
/usr/lib/python3.8/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['Not patching os.fork and os.forkpty. Oneshot activation is done by signal'] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
************ <bound method TestProcess.read of TestProcess(pid=1389357, is_alive=True)> ************
****************************************************************************************************
__________________________________ test_uwsgi __________________________________
tests/test_manhole.py:529: in test_uwsgi
with TestProcess(
/usr/lib/python3.8/site-packages/process_tests.py:129: in __init__
self.proc = subprocess.Popen(args, stdout=stdout, **kwargs)
/usr/lib64/python3.8/subprocess.py:858: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
/usr/lib64/python3.8/subprocess.py:1720: in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'uwsgi'
=============================== warnings summary ===============================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1316
/usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1316: PytestRemovedIn8Warning: The --strict option is deprecated, use --strict-markers instead.
self.issue_config_time_warning(
tests/test_manhole.py:3
/home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0/tests/test_manhole.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] tests/test_manhole.py:402: condition: not is_module_available("signalfd")
SKIPPED [1] tests/test_manhole.py:413: condition: not is_module_available("signalfd")
SKIPPED [1] tests/test_manhole.py:502: condition: not is_module_available("signalfd")
FAILED tests/test_manhole.py::test_simple - AttributeError: 'TestProcess' obj...
FAILED tests/test_manhole.py::test_connection_handler_exec[str] - AttributeEr...
FAILED tests/test_manhole.py::test_connection_handler_exec[func] - AttributeE...
FAILED tests/test_manhole.py::test_daemon_connection - AssertionError: Waited...
FAILED tests/test_manhole.py::test_non_daemon_connection - AssertionError: Wa...
FAILED tests/test_manhole.py::test_locals_after_fork - AttributeError: 'TestP...
FAILED tests/test_manhole.py::test_socket_path - AttributeError: 'TestProcess...
FAILED tests/test_manhole.py::test_with_fork - AttributeError: 'TestProcess' ...
FAILED tests/test_manhole.py::test_with_forkpty - AttributeError: 'TestProces...
FAILED tests/test_manhole.py::test_oneshot_on_usr2_error - AttributeError: 'T...
FAILED tests/test_manhole.py::test_environ_variable_activation - AssertionErr...
FAILED tests/test_manhole.py::test_uwsgi - FileNotFoundError: [Errno 2] No su...
======= 12 failed, 30 passed, 3 skipped, 2 warnings in 137.88s (0:02:17) =======
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-c07e4556-f0cc-4cca-8e6b-8ab836fecf26'
warnings.warn(
In atexit handler. List of installed modules in build env:Package Version
----------------------------- -------
alabaster 0.7.13
Babel 2.14.0
build 1.0.3
charset-normalizer 3.3.2
cppclean 0.13
distro 1.8.0
dnf 4.18.2
docutils 0.20.1
exceptiongroup 1.1.3
gpg 1.23.2
idna 3.6
imagesize 1.4.1
importlib-metadata 7.0.0
iniconfig 2.0.0
installer 0.7.0
Jinja2 3.1.2
libdnf 0.72.0
MarkupSafe 2.1.3
packaging 23.2
pluggy 1.3.0
process-tests 3.0.0
Pygments 2.17.2
pyproject_hooks 1.0.0
pytest 7.4.3
python-dateutil 2.8.2
pytz 2023.3
requests 2.31.0
setuptools 69.0.2
six 1.16.0
snowballstemmer 2.2.0
Sphinx 7.1.2
sphinx-py3doc-enhanced-theme 2.4.0
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.5
sphinxcontrib-htmlhelp 2.0.4
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.9
tomli 2.0.1
urllib3 1.26.18
wheel 0.42.0
zipp 3.17.0 |
Just retested with patch es taken from master Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0
configfile: pytest.ini
testpaths: tests
plugins: mock-3.14.0, timeout-2.3.1, hypothesis-6.100.0, flaky-3.8.1, trio-0.8.0, benchmark-4.0.0, betamax-0.9.0
collected 46 items
tests/test_manhole.py ....FF..FF...............ss.....Fs.F [ 78%]
tests/test_manhole_cli.py .......... [100%]
========================================================================================= FAILURES ==========================================================================================
_____________________________________________________________________________ test_connection_handler_exec[str] _____________________________________________________________________________
tests/test_manhole.py:112: in test_connection_handler_exec
wait_for_strings(proc.read, TIMEOUT, 'TETE')
/usr/lib/python3.10/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['TETE'] did not appear in output in the given order !
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f587572bfa0>> *******
****************************************************************************************************
************ <bound method TestProcess.read of TestProcess(pid=2725353, is_alive=True)> ************
Manhole[2725353:1712305921.3184]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[2725353:1712305921.3186]: Accepted connection on fd:4 from PID:2725318 UID:1000 GID:1000
Manhole[2725353:1712305921.3683]: Running: "print('FOOBAR')\n".
Manhole[2725353:1712305921.4187]: Running: 'tete()\n'.
****************************************************************************************************
____________________________________________________________________________ test_connection_handler_exec[func] _____________________________________________________________________________
tests/test_manhole.py:112: in test_connection_handler_exec
wait_for_strings(proc.read, TIMEOUT, 'TETE')
/usr/lib/python3.10/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['TETE'] did not appear in output in the given order !
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f5875763ee0>> *******
****************************************************************************************************
************ <bound method TestProcess.read of TestProcess(pid=2725357, is_alive=True)> ************
Manhole[2725357:1712305932.8897]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[2725357:1712305932.8899]: Accepted connection on fd:4 from PID:2725318 UID:1000 GID:1000
Manhole[2725357:1712305932.9395]: Running: "print('FOOBAR')\n".
Manhole[2725357:1712305932.9899]: Running: 'tete()\n'.
****************************************************************************************************
__________________________________________________________________________________ test_daemon_connection ___________________________________________________________________________________
tests/test_manhole.py:149: in test_daemon_connection
pytest.raises((socket.error, OSError), assert_manhole_running, proc, uds_path, extra=terminate_and_read)
tests/test_manhole.py:59: in assert_manhole_running
extra(client)
tests/test_manhole.py:143: in terminate_and_read
wait_for_strings(proc.read, TIMEOUT, 'Died with KeyboardInterrupt', 'DIED.')
/usr/lib/python3.10/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['DIED.', 'Died with KeyboardInterrupt'] did not appear in output in the given order !
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f5875747be0>> *******
######### ProcessID=2725369, ThreadID=140015864645312 #########
File: "/usr/lib64/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 244, in run
self.connection_handler(self.client)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 312, in handle_connection_repl
handle_repl(_MANHOLE.locals)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 358, in handle_repl
dump_stacktraces()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 649, in dump_stacktraces
for filename, lineno, name, line in traceback.extract_stack(stack):
######### ProcessID=2725369, ThreadID=140015950628544 #########
File: "/usr/lib64/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 213, in run
client.join()
File: "/usr/lib64/python3.10/threading.py", line 1096, in join
self._wait_for_tstate_lock()
File: "/usr/lib64/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
######### ProcessID=2725369, ThreadID=140015963458432 #########
File: "/home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0/tests/helper.py", line 226, in <module>
time.sleep(TIMEOUT)
#############################################
Python 3.10.14 (main, Apr 3 2024, 21:50:31) [GCC 14.0.1 20240328 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(ManholeConsole)
>>> FOOBAR
>>>
****************************************************************************************************
*********** <bound method TestProcess.read of TestProcess(pid=2725369, is_alive=False)> ************
Manhole[2725369:1712305945.9355]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[2725369:1712305945.9357]: Manhole UDS path: /tmp/manhole-2725369
Manhole[2725369:1712305945.9357]: Waiting for new connection (in pid:2725369) ...
Manhole[2725369:1712305945.9759]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[2725369:1712305945.9761]: Accepted connection on fd:4 from PID:2725318 UID:1000 GID:1000
****************************************************************************************************
________________________________________________________________________________ test_non_daemon_connection _________________________________________________________________________________
tests/test_manhole.py:171: in test_non_daemon_connection
assert_manhole_running(proc, uds_path, extra=terminate_and_read, oneshot=True)
tests/test_manhole.py:59: in assert_manhole_running
extra(client)
tests/test_manhole.py:165: in terminate_and_read
wait_for_strings(proc.read, TIMEOUT, 'Died with KeyboardInterrupt')
/usr/lib/python3.10/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['Died with KeyboardInterrupt'] did not appear in output in the given order !
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
****** <bound method PipeBuffer.read of <process_tests.TestSocket object at 0x7f5875740c40>> *******
######### ProcessID=2725373, ThreadID=140344662427328 #########
File: "/usr/lib64/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 244, in run
self.connection_handler(self.client)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 312, in handle_connection_repl
handle_repl(_MANHOLE.locals)
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 358, in handle_repl
dump_stacktraces()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 649, in dump_stacktraces
for filename, lineno, name, line in traceback.extract_stack(stack):
######### ProcessID=2725373, ThreadID=140344672913088 #########
File: "/usr/lib64/python3.10/threading.py", line 973, in _bootstrap
self._bootstrap_inner()
File: "/usr/lib64/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File: "/home/tkloczko/rpmbuild/BUILDROOT/python-manhole-1.8.0-2.fc37.x86_64/usr/lib/python3.10/site-packages/manhole/__init__.py", line 213, in run
client.join()
File: "/usr/lib64/python3.10/threading.py", line 1096, in join
self._wait_for_tstate_lock()
File: "/usr/lib64/python3.10/threading.py", line 1116, in _wait_for_tstate_lock
if lock.acquire(block, timeout):
######### ProcessID=2725373, ThreadID=140344685607808 #########
File: "/home/tkloczko/rpmbuild/BUILD/python-manhole-1.8.0/tests/helper.py", line 254, in <module>
time.sleep(0.3) # give the manhole a bit enough time to start
#############################################
Python 3.10.14 (main, Apr 3 2024, 21:50:31) [GCC 14.0.1 20240328 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(ManholeConsole)
>>> FOOBAR
>>>
****************************************************************************************************
************ <bound method TestProcess.read of TestProcess(pid=2725373, is_alive=True)> ************
Manhole[2725373:1712305956.2734]: Patched <built-in function fork> and <built-in function forkpty>.
Manhole[2725373:1712305956.2736]: Manhole UDS path: /tmp/manhole-2725373
Manhole[2725373:1712305956.2737]: Waiting for new connection (in pid:2725373) ...
Manhole[2725373:1712305956.3138]: Started ManholeConnectionThread thread. Checking credentials ...
Manhole[2725373:1712305956.3139]: Accepted connection on fd:4 from PID:2725318 UID:1000 GID:1000
****************************************************************************************************
_____________________________________________________________________________ test_environ_variable_activation ______________________________________________________________________________
tests/test_manhole.py:496: in test_environ_variable_activation
wait_for_strings(proc.read, TIMEOUT, 'Not patching os.fork and os.forkpty. Oneshot activation is done by signal')
/usr/lib/python3.10/site-packages/process_tests.py:246: in wait_for_strings
raise AssertionError(f'Waited {seconds:0.2f}secs but {check_strings} did not appear in output in the given order !')
E AssertionError: Waited 10.00secs but ['Not patching os.fork and os.forkpty. Oneshot activation is done by signal'] did not appear in output in the given order !
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
************ <bound method TestProcess.read of TestProcess(pid=2725474, is_alive=True)> ************
****************************************************************************************************
________________________________________________________________________________________ test_uwsgi _________________________________________________________________________________________
tests/test_manhole.py:533: in test_uwsgi
with TestProcess(
/usr/lib/python3.10/site-packages/process_tests.py:129: in __init__
self.proc = subprocess.Popen(args, stdout=stdout, **kwargs)
/usr/lib64/python3.10/subprocess.py:971: in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
/usr/lib64/python3.10/subprocess.py:1863: in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
E FileNotFoundError: [Errno 2] No such file or directory: 'uwsgi'
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_manhole.py:405: condition: not is_module_available("signalfd")
SKIPPED [1] tests/test_manhole.py:416: condition: not is_module_available("signalfd")
SKIPPED [1] tests/test_manhole.py:504: condition: not is_module_available("signalfd")
FAILED tests/test_manhole.py::test_connection_handler_exec[str] - AssertionError: Waited 10.00secs but ['TETE'] did not appear in output in the given order !
FAILED tests/test_manhole.py::test_connection_handler_exec[func] - AssertionError: Waited 10.00secs but ['TETE'] did not appear in output in the given order !
FAILED tests/test_manhole.py::test_daemon_connection - AssertionError: Waited 10.00secs but ['DIED.', 'Died with KeyboardInterrupt'] did not appear in output in the given order !
FAILED tests/test_manhole.py::test_non_daemon_connection - AssertionError: Waited 10.00secs but ['Died with KeyboardInterrupt'] did not appear in output in the given order !
FAILED tests/test_manhole.py::test_environ_variable_activation - AssertionError: Waited 10.00secs but ['Not patching os.fork and os.forkpty. Oneshot activation is done by signal'] did not appear in output in the given order !
FAILED tests/test_manhole.py::test_uwsgi - FileNotFoundError: [Errno 2] No such file or directory: 'uwsgi'
==================================================================== 6 failed, 37 passed, 3 skipped in 163.64s (0:02:43) ==================================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w
Here is pytest output with some deprecation warnings as well:
Here is pytest output:
The text was updated successfully, but these errors were encountered: