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

3.4.3: pytest is failing #107

Open
kloczek opened this issue Jan 4, 2022 · 11 comments
Open

3.4.3: pytest is failing #107

kloczek opened this issue Jan 4, 2022 · 11 comments

Comments

@kloczek
Copy link

kloczek commented Jan 4, 2022

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
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --ignore tests/test_tracer.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
benchmark: 3.4.1 (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-hunter-3.4.3, configfile: setup.cfg, testpaths: tests
plugins: hypothesis-6.34.1, cov-3.0.0, aspectlib-1.5.2, benchmark-3.4.1
collected 140 items

tests/test_config.py ......................                                                                                                                          [ 15%]
tests/test_cookbook.py .....                                                                                                                                         [ 19%]
tests/test_integration.py FFF.....FFFF....FFF........FFFFFF                                                                                                          [ 42%]
tests/test_predicates.py ..........................................................................                                                                  [ 95%]
tests/test_remote.py FFFF                                                                                                                                            [ 98%]
tests/test_util.py ..                                                                                                                                                [100%]

================================================================================= FAILURES =================================================================================
___________________________________________________________________________ test_pth_activation ____________________________________________________________________________
tests/test_integration.py:63: in test_pth_activation
    assert expected_module.encode() in output
E   AssertionError: assert b'posixpath.py' in b''
E    +  where b'posixpath.py' = <built-in method encode of str object at 0x7f922d0e76b0>()
E    +    where <built-in method encode of str object at 0x7f922d0e76b0> = 'posixpath.py'.encode
_____________________________________________________________________________ test_pth_sample4 _____________________________________________________________________________
tests/test_integration.py:76: in test_pth_sample4
    assert output
E   AssertionError: assert b''
_____________________________________________________________________________ test_pth_sample2 _____________________________________________________________________________
tests/test_integration.py:89: in test_pth_sample2
    lm.fnmatch_lines([
E   Failed: nomatch: '*tests*sample2.py:* call      *'
E       and: "/home/tkloczko/rpmbuild/BUILD/python-hunter-3.4.3/tests/sample2.py:24: SyntaxWarning: 'NoneType' object is not callable; perhaps you missed a comma?"
E       and: '  None('
E   remains unmatched: '*tests*sample2.py:* call      *'
____________________________________________________________________ test_pid_prefix[True-CodePrinter] _____________________________________________________________________
tests/test_integration.py:268: in test_pid_prefix
    main()
E   Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
OUT [3187735]MainThread  [...].8/site-packages/hunter/__init__.py:384   return    def trace(*predicates, **options):
[3187735]MainThread                                                 ...       return value: <hunter._tracer.Tracer object at 0x7f922d2575e0>
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:268   line              main()
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:256   call          def main():
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:257   line              a = 1
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line              pid = os.fork()
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line              if pid:
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line                  os.waitpid(pid, 0)
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line      [a => 1]
[3187753]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line              if pid:
[3187753]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187753]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line                  os._exit(0)  # child
[3187753]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return                os.waitpid(pid, 0)
[3187735]MainThread                                                 ...       return value: None
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    [a => 1]

ERR
____________________________________________________________________ test_pid_prefix[True-CallPrinter] _____________________________________________________________________
tests/test_integration.py:268: in test_pid_prefix
    main()
E   Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
OUT [3187735]MainThread  [...].8/site-packages/hunter/__init__.py:384   return    <= trace: <hunter._tracer.Tracer object at 0x7f922d2bcd00>
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:268   line      main()
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:256   call      => main()
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:257   line         a = 1
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line         pid = os.fork()
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line         if pid:
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line         os.waitpid(pid, 0)
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line      [a => 1]
[3187754]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line         if pid:
[3187754]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187754]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line         os._exit(0)  # child
[3187754]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line      [a => 1]
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    <= main: None
[3187735]MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    [a => 1]

ERR
____________________________________________________________________ test_pid_prefix[False-CodePrinter] ____________________________________________________________________
tests/test_integration.py:268: in test_pid_prefix
    main()
E   Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
E   matched:  'MainThread  *test_*.py:*  line * if pid:'
E   matched:  'MainThread  *test_*.py:*  line * [[]a => 1[]]'
E   matched:  'MainThread  *test_*.py:*  line * os.waitpid(pid, 0)'
E   line '[[]*[]] *MainThread  *test_*.py:*  line * os._exit(0)  # child' not found in output
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
OUT MainThread  [...].8/site-packages/hunter/__init__.py:384   return    def trace(*predicates, **options):
MainThread                                                 ...       return value: <hunter._tracer.Tracer object at 0x7f922d2bcc40>
MainThread  [...]ter-3.4.3/tests/test_integration.py:268   line              main()
MainThread  [...]ter-3.4.3/tests/test_integration.py:256   call          def main():
MainThread  [...]ter-3.4.3/tests/test_integration.py:257   line              a = 1
MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line              pid = os.fork()
MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line              if pid:
MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line                  os.waitpid(pid, 0)
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line      [a => 1]
[3187755]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line              if pid:
[3187755]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187755]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line                  os._exit(0)  # child
[3187755]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return                os.waitpid(pid, 0)
MainThread                                                 ...       return value: None
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    [a => 1]

ERR
____________________________________________________________________ test_pid_prefix[False-CallPrinter] ____________________________________________________________________
tests/test_integration.py:268: in test_pid_prefix
    main()
E   Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
E   matched:  'MainThread  *test_*.py:*  line * if pid:'
E   matched:  'MainThread  *test_*.py:*  line * [[]a => 1[]]'
E   matched:  'MainThread  *test_*.py:*  line * os.waitpid(pid, 0)'
E   line '[[]*[]] *MainThread  *test_*.py:*  line * os._exit(0)  # child' not found in output
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
OUT MainThread  [...].8/site-packages/hunter/__init__.py:384   return    <= trace: <hunter._tracer.Tracer object at 0x7f922d2bcdc0>
MainThread  [...]ter-3.4.3/tests/test_integration.py:268   line      main()
MainThread  [...]ter-3.4.3/tests/test_integration.py:256   call      => main()
MainThread  [...]ter-3.4.3/tests/test_integration.py:257   line         a = 1
MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line         pid = os.fork()
MainThread  [...]ter-3.4.3/tests/test_integration.py:258   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line         if pid:
MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line         os.waitpid(pid, 0)
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   line      [a => 1]
[3187756]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line         if pid:
[3187756]MainThread  [...]ter-3.4.3/tests/test_integration.py:259   line      [a => 1]
[3187756]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line         os._exit(0)  # child
[3187756]MainThread  [...]ter-3.4.3/tests/test_integration.py:262   line      [a => 1]
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    <= main: None
MainThread  [...]ter-3.4.3/tests/test_integration.py:260   return    [a => 1]

ERR
_________________________________________________________________ test_depth_limit_subprocess[depth_lt=2] __________________________________________________________________
tests/test_integration.py:362: in test_depth_limit_subprocess
    lm.fnmatch_lines([
E   Failed: remains unmatched: '* call    * => one()'
_________________________________________________________________ test_depth_limit_subprocess[depth_lt=3] __________________________________________________________________
tests/test_integration.py:362: in test_depth_limit_subprocess
    lm.fnmatch_lines([
E   Failed: remains unmatched: '* call    * => one()'
_________________________________________________________________ test_depth_limit_subprocess[depth_lt=4] __________________________________________________________________
tests/test_integration.py:362: in test_depth_limit_subprocess
    lm.fnmatch_lines([
E   Failed: remains unmatched: '* call    * => one()'
_________________________________________________________________________ test_pdb[postmortem-pdb] _________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
________________________________________________________________________ test_pdb[postmortem-ipdb] _________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
__________________________________________________________________________ test_pdb[settrace-pdb] __________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
_________________________________________________________________________ test_pdb[settrace-ipdb] __________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
__________________________________________________________________________ test_pdb[debugger-pdb] __________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
_________________________________________________________________________ test_pdb[debugger-ipdb] __________________________________________________________________________
tests/test_integration.py:754: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
_______________________________________________________________________________ test_manhole _______________________________________________________________________________
tests/test_remote.py:23: in test_manhole
    wait_for_strings(target.read, TIMEOUT, 'Oneshot activation is done by signal')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['Oneshot activation is done by signal'] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python: No module named samplemanhole

******************************
_________________________________________________________________________ test_manhole_clean_exit __________________________________________________________________________
tests/test_remote.py:39: in test_manhole_clean_exit
    wait_for_strings(target.read, TIMEOUT, 'Oneshot activation is done by signal')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['Oneshot activation is done by signal'] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
/usr/bin/python: No module named samplemanhole

******************************
_________________________________________________________________________________ test_gdb _________________________________________________________________________________
tests/test_remote.py:66: in test_gdb
    wait_for_strings(
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['return    <= stuff: None', 'line         time.sleep(1)', 'call      => stuff()', 'Output stream active. Starting tracer'] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
warning: process 3188183 is a zombie - the process has already terminated
ptrace: Operation not permitted.
No symbol table is loaded.  Use the "file" command.
WARNING: Using GDB may deadlock the process or create unpredictable results!
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/bin/hunter-trace", line 8, in <module>
    sys.exit(main())
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages/hunter/remote.py", line 164, in main
    with bootstrapper(args, payload, 'from hunter import remote; remote.deactivate()'):
  File "/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages/hunter/remote.py", line 87, in gdb_bootstrap
    check_call(activation_command)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gdb', '-p', '3188183', '-batch', '-ex', 'call (void)Py_AddPendingCall(PyRun_SimpleString, "from hunter import remote; remote.activate(\'/tmp/hunter-3188184\', False, \'utf-8\', \'stdlib=False\')")']' returned non-zero exit status 1.

******************************
*********** OUTPUT ***********
/usr/bin/python: No module named samplemanhole

******************************
___________________________________________________________________________ test_gdb_clean_exit ____________________________________________________________________________
tests/test_remote.py:85: in test_gdb_clean_exit
    wait_for_strings(
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['return    <= stuff: None', 'line         time.sleep(1)', 'call      => stuff()', 'Output stream active. Starting tracer'] did not appear in output in the given order !
--------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------
*********** OUTPUT ***********
warning: process 3188249 is a zombie - the process has already terminated
ptrace: Operation not permitted.
No symbol table is loaded.  Use the "file" command.
WARNING: Using GDB may deadlock the process or create unpredictable results!
Traceback (most recent call last):
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/bin/hunter-trace", line 8, in <module>
    sys.exit(main())
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages/hunter/remote.py", line 164, in main
    with bootstrapper(args, payload, 'from hunter import remote; remote.deactivate()'):
  File "/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages/hunter/remote.py", line 87, in gdb_bootstrap
    check_call(activation_command)
  File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gdb', '-p', '3188249', '-batch', '-ex', 'call (void)Py_AddPendingCall(PyRun_SimpleString, "from hunter import remote; remote.activate(\'/tmp/hunter-3188250\', False, \'utf-8\', \'stdlib=False\')")']' returned non-zero exit status 1.

******************************
*********** OUTPUT ***********
/usr/bin/python3: No module named samplemanhole

******************************

----------------------------------------------------------------------------------------- benchmark: 3 tests ----------------------------------------------------------------------------------------
Name (time in us)                Min                 Max                Mean             StdDev              Median               IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_probe[no_probe]         26.7099 (1.0)      110.5189 (1.0)       27.8665 (1.0)       1.1165 (1.0)       27.6831 (1.0)      0.7423 (1.0)       888;882       35.8854 (1.0)       29066           1
test_probe[fast_probe]      186.0410 (6.97)     396.7280 (3.59)     192.2989 (6.90)      8.9009 (7.97)     190.6899 (6.89)     4.6414 (6.25)       91;114        5.2002 (0.14)       3061           1
test_probe[brief_probe]     292.4309 (10.95)    655.1051 (5.93)     300.4506 (10.78)    10.9594 (9.82)     298.0419 (10.77)    6.5049 (8.76)        84;69        3.3283 (0.09)       2661           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
========================================================================= short test summary info ==========================================================================
FAILED tests/test_integration.py::test_pth_activation - AssertionError: assert b'posixpath.py' in b''
FAILED tests/test_integration.py::test_pth_sample4 - AssertionError: assert b''
FAILED tests/test_integration.py::test_pth_sample2 - Failed: nomatch: '*tests*sample2.py:* call      *'
FAILED tests/test_integration.py::test_pid_prefix[True-CodePrinter] - Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
FAILED tests/test_integration.py::test_pid_prefix[True-CallPrinter] - Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
FAILED tests/test_integration.py::test_pid_prefix[False-CodePrinter] - Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
FAILED tests/test_integration.py::test_pid_prefix[False-CallPrinter] - Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=2] - Failed: remains unmatched: '* call    * => one()'
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=3] - Failed: remains unmatched: '* call    * => one()'
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=4] - Failed: remains unmatched: '* call    * => one()'
FAILED tests/test_integration.py::test_pdb[postmortem-pdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_integration.py::test_pdb[postmortem-ipdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_integration.py::test_pdb[settrace-pdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_integration.py::test_pdb[settrace-ipdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_integration.py::test_pdb[debugger-pdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_integration.py::test_pdb[debugger-ipdb] - AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
FAILED tests/test_remote.py::test_manhole - AssertionError: Waited 60.00secs but ['Oneshot activation is done by signal'] did not appear in output in the given order !
FAILED tests/test_remote.py::test_manhole_clean_exit - AssertionError: Waited 60.00secs but ['Oneshot activation is done by signal'] did not appear in output in the give...
FAILED tests/test_remote.py::test_gdb - AssertionError: Waited 60.00secs but ['return    <= stuff: None', 'line         time.sleep(1)', 'call      => stuff()', 'Output s...
FAILED tests/test_remote.py::test_gdb_clean_exit - AssertionError: Waited 60.00secs but ['return    <= stuff: None', 'line         time.sleep(1)', 'call      => stuff()'...
================================================================ 20 failed, 120 passed in 611.88s (0:10:11) ================================================================
@kloczek
Copy link
Author

kloczek commented Jan 4, 2022

I forgot aboit one thing. tests/test_tracer.py requires eviltracer module which I cannot find on pypi

+ /usr/bin/pytest -ra tests/test_tracer.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
benchmark: 3.4.1 (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-hunter-3.4.3, configfile: setup.cfg
plugins: hypothesis-6.34.1, cov-3.0.0, aspectlib-1.5.2, benchmark-3.4.1
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
__________________________________________________________________ ERROR collecting tests/test_tracer.py ___________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/python-hunter-3.4.3/tests/test_tracer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_tracer.py:81: in <module>
    from eviltracer import EvilTracer
E   ModuleNotFoundError: No module named 'eviltracer'
========================================================================= short test summary info ==========================================================================
ERROR tests/test_tracer.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.28s =============================================================================

@kloczek
Copy link
Author

kloczek commented Jan 4, 2022

And yet another small detail :P
gcc warning:

/usr/bin/gcc -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -D_GNU_SOURCE -fPIC -fwrapv -ffat-lto-objects -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -Isrc/hunter -I/tmp/build-env-8vy2rl4h/include -I/usr/include/python3.8 -c src/hunter/_predicates.c -o build/temp.linux-x86_64-3.8/src/hunter/_predicates.o
src/hunter/_predicates.c:24144:18: warning: ‘__Pyx_CFunc_object____Event___to_py’ defined but not used [-Wunused-function]
24144 | static PyObject *__Pyx_CFunc_object____Event___to_py(PyObject *(*__pyx_v_f)(struct __pyx_obj_6hunter_6_event_Event *)) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@ionelmc
Copy link
Owner

ionelmc commented Feb 2, 2022

Ok so there are a number of issues here:

  1. ./tests not being on the import path (import failures for eviltracer, samplesomething and so on). Some of those modules (eviltracer and some other one) require an extension build (see tests/setup.py)
  2. the line '[[]*[]] *MainThread something' not found in output failures seem to be some weird alignment issue, I guess tests could be patched to have line '[[]*[]]*MainThread instead of line '[[]*[]] *MainThread - does that make the problem go away?
  3. the ol pth problem - the .pth file needs to be in one of the site dirs so python executes its code on initialization. You might need to copy that file in a special place or do something else with that environment where hunter is not fully installed.

@kloczek
Copy link
Author

kloczek commented Feb 2, 2022

OK. Thank you.
Ad 3: why that file cannot be copied to exact location as part of the test suite?

@ionelmc
Copy link
Owner

ionelmc commented Feb 2, 2022

It's correct location is too variable and more importantly I want to test that the installation is working as expected (it's a integration test after all...).

@kloczek
Copy link
Author

kloczek commented Feb 2, 2022

If you will have any PR which you want to test before actual merge please let me know.
I would be happy to test that 😄

@kloczek
Copy link
Author

kloczek commented Aug 27, 2023

Sorry for asking.
Any update? 🤔

BTW looks like test suite uses eviltracer and I cannot find that module on pypi.

@kloczek
Copy link
Author

kloczek commented Aug 27, 2023

Just FTR pytest output of 3.6.1

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-hunter-3.6.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --ignore tests/test_tracer.py
============================= test session starts ==============================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.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-hunter-3.6.1
configfile: pytest.ini
testpaths: tests
plugins: benchmark-4.0.0, aspectlib-2.0.0
collected 143 items

tests/test_config.py ......................                              [ 15%]
tests/test_cookbook.py .....                                             [ 18%]
tests/test_integration.py FFF.....FFFF....FFF........FFFFFF              [ 41%]
tests/test_predicates.py ............................................... [ 74%]
...........................                                              [ 93%]
tests/test_remote.py FFFss                                               [ 97%]
tests/test_util.py .s..                                                  [100%]

=================================== FAILURES ===================================
_____________________________ test_pth_activation ______________________________
tests/test_integration.py:52: in test_pth_activation
    assert expected_module.encode() in output
E   AssertionError: assert b'posixpath' in b''
E    +  where b'posixpath' = <built-in method encode of str object at 0x7ff054acc130>()
E    +    where <built-in method encode of str object at 0x7ff054acc130> = 'posixpath'.encode
_______________________________ test_pth_sample4 _______________________________
tests/test_integration.py:68: in test_pth_sample4
    assert output
E   AssertionError: assert b''
_______________________________ test_pth_sample2 _______________________________
tests/test_integration.py:84: in test_pth_sample2
    lm.fnmatch_lines(
E   Failed: nomatch: '*tests*sample2.py:* call      *'
E       and: "/home/tkloczko/rpmbuild/BUILD/python-hunter-3.6.1/tests/sample2.py:26: SyntaxWarning: 'NoneType' object is not callable; perhaps you missed a comma?"
E       and: '  None('
E   remains unmatched: '*tests*sample2.py:* call      *'
______________________ test_pid_prefix[True-CodePrinter] _______________________
tests/test_integration.py:279: in test_pid_prefix
    main()
E   Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
----------------------------- Captured stdout call -----------------------------
OUT [1678536]MainThread  [...].8/site-packages/hunter/__init__.py:440   return        return _last_tracer.trace(predicate)
[1678536]MainThread                                                 ...       return value: <hunter._tracer.Tracer object at 0x7ff045505dc0>
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:279   line              main()
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:263   call          def main():
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:264   line              a = 1
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line              pid = os.fork()
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line              if pid:
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line                  os.waitpid(pid, 0)
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line      [a => 1]
[1678548]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line              if pid:
[1678548]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678548]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line                  os._exit(0)  # child
[1678548]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return                os.waitpid(pid, 0)
[1678536]MainThread                                                 ...       return value: None
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    [a => 1]

ERR
______________________ test_pid_prefix[True-CallPrinter] _______________________
tests/test_integration.py:279: in test_pid_prefix
    main()
E   Failed: line '[[]*[]] *MainThread  *test_*.py:*  line * a = 1' not found in output
----------------------------- Captured stdout call -----------------------------
OUT [1678536]MainThread  [...].8/site-packages/hunter/__init__.py:440   return    <= trace: <hunter._tracer.Tracer object at 0x7ff0455031c0>
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:279   line      main()
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:263   call      => main()
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:264   line         a = 1
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line         pid = os.fork()
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line         if pid:
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line         os.waitpid(pid, 0)
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line      [a => 1]
[1678549]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line         if pid:
[1678549]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678549]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line         os._exit(0)  # child
[1678549]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line      [a => 1]
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    <= main: None
[1678536]MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    [a => 1]

ERR
______________________ test_pid_prefix[False-CodePrinter] ______________________
tests/test_integration.py:279: in test_pid_prefix
    main()
E   Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
E   matched:  'MainThread  *test_*.py:*  line * if pid:'
E   matched:  'MainThread  *test_*.py:*  line * [[]a => 1[]]'
E   matched:  'MainThread  *test_*.py:*  line * os.waitpid(pid, 0)'
E   line '[[]*[]] *MainThread  *test_*.py:*  line * os._exit(0)  # child' not found in output
----------------------------- Captured stdout call -----------------------------
OUT MainThread  [...].8/site-packages/hunter/__init__.py:440   return        return _last_tracer.trace(predicate)
MainThread                                                 ...       return value: <hunter._tracer.Tracer object at 0x7ff045503820>
MainThread  [...]ter-3.6.1/tests/test_integration.py:279   line              main()
MainThread  [...]ter-3.6.1/tests/test_integration.py:263   call          def main():
MainThread  [...]ter-3.6.1/tests/test_integration.py:264   line              a = 1
MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line              pid = os.fork()
MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line              if pid:
MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line                  os.waitpid(pid, 0)
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line      [a => 1]
[1678550]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line              if pid:
[1678550]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678550]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line                  os._exit(0)  # child
[1678550]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return                os.waitpid(pid, 0)
MainThread                                                 ...       return value: None
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    [a => 1]

ERR
______________________ test_pid_prefix[False-CallPrinter] ______________________
tests/test_integration.py:279: in test_pid_prefix
    main()
E   Failed: matched:  'MainThread  *test_*.py:*  line * a = 1'
E   matched:  'MainThread  *test_*.py:*  line * if pid:'
E   matched:  'MainThread  *test_*.py:*  line * [[]a => 1[]]'
E   matched:  'MainThread  *test_*.py:*  line * os.waitpid(pid, 0)'
E   line '[[]*[]] *MainThread  *test_*.py:*  line * os._exit(0)  # child' not found in output
----------------------------- Captured stdout call -----------------------------
OUT MainThread  [...].8/site-packages/hunter/__init__.py:440   return    <= trace: <hunter._tracer.Tracer object at 0x7ff04557a340>
MainThread  [...]ter-3.6.1/tests/test_integration.py:279   line      main()
MainThread  [...]ter-3.6.1/tests/test_integration.py:263   call      => main()
MainThread  [...]ter-3.6.1/tests/test_integration.py:264   line         a = 1
MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line         pid = os.fork()
MainThread  [...]ter-3.6.1/tests/test_integration.py:265   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line         if pid:
MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line         os.waitpid(pid, 0)
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   line      [a => 1]
[1678551]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line         if pid:
[1678551]MainThread  [...]ter-3.6.1/tests/test_integration.py:266   line      [a => 1]
[1678551]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line         os._exit(0)  # child
[1678551]MainThread  [...]ter-3.6.1/tests/test_integration.py:269   line      [a => 1]
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    <= main: None
MainThread  [...]ter-3.6.1/tests/test_integration.py:267   return    [a => 1]

ERR
___________________ test_depth_limit_subprocess[depth_lt=2] ____________________
tests/test_integration.py:386: in test_depth_limit_subprocess
    lm.fnmatch_lines(
E   Failed: remains unmatched: '* call    * => one()'
___________________ test_depth_limit_subprocess[depth_lt=3] ____________________
tests/test_integration.py:386: in test_depth_limit_subprocess
    lm.fnmatch_lines(
E   Failed: remains unmatched: '* call    * => one()'
___________________ test_depth_limit_subprocess[depth_lt=4] ____________________
tests/test_integration.py:386: in test_depth_limit_subprocess
    lm.fnmatch_lines(
E   Failed: remains unmatched: '* call    * => one()'
___________________________ test_pdb[postmortem-pdb] ___________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
__________________________ test_pdb[postmortem-ipdb] ___________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
____________________________ test_pdb[settrace-pdb] ____________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
___________________________ test_pdb[settrace-ipdb] ____________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
____________________________ test_pdb[debugger-pdb] ____________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
___________________________ test_pdb[debugger-ipdb] ____________________________
tests/test_integration.py:810: in test_pdb
    wait_for_strings(target.read, TIMEOUT, '-> ')
/usr/lib/python3.8/site-packages/process_tests.py:247: in wait_for_strings
    raise AssertionError("Waited %0.2fsecs but %s did not appear in output in the given order !" % (
E   AssertionError: Waited 60.00secs but ['-> '] did not appear in output in the given order !
----------------------------- Captured stdout call -----------------------------
*********** OUTPUT ***********
/usr/bin/python3: No module named samplepdb

******************************
_________________________________ test_manhole _________________________________
tests/test_remote.py:18: in test_manhole
    with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
/usr/lib/python3.8/site-packages/process_tests.py:127: in __init__
    self.proc = subprocess.Popen(
/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: 'python'
____________________________ test_manhole_reattach _____________________________
tests/test_remote.py:35: in test_manhole_reattach
    with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
/usr/lib/python3.8/site-packages/process_tests.py:127: in __init__
    self.proc = subprocess.Popen(
/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: 'python'
___________________________ test_manhole_clean_exit ____________________________
tests/test_remote.py:64: in test_manhole_clean_exit
    with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
/usr/lib/python3.8/site-packages/process_tests.py:127: in __init__
    self.proc = subprocess.Popen(
/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: 'python'

----------------------------------------------------------------------------------------- benchmark: 3 tests -----------------------------------------------------------------------------------------
Name (time in us)                Min                 Max                Mean             StdDev              Median               IQR             Outliers  OPS (Kops/s)            Rounds  Iterations
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_probe[no_probe]         14.5901 (1.0)       45.3889 (1.0)       15.3598 (1.0)       0.8742 (1.0)       15.2308 (1.0)      0.3073 (1.0)      2500;4048       65.1049 (1.0)       44368           1
test_probe[fast_probe]      122.5676 (8.40)     527.5728 (11.62)    126.3096 (8.22)      7.3995 (8.46)     125.0850 (8.21)     1.8803 (6.12)       120;607        7.9171 (0.12)       3942           1
test_probe[brief_probe]     223.6450 (15.33)    593.3726 (13.07)    229.7531 (14.96)    11.3935 (13.03)    227.3936 (14.93)    5.7635 (18.75)      162;174        4.3525 (0.07)       3992           1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean
=========================== short test summary info ============================
SKIPPED [1] tests/test_remote.py:88: condition: not which("gdb")
SKIPPED [1] tests/test_remote.py:107: condition: not which("gdb")
SKIPPED [1] tests/test_util.py:147: could not import 'zoneinfo': No module named 'zoneinfo'
FAILED tests/test_integration.py::test_pth_activation - AssertionError: asser...
FAILED tests/test_integration.py::test_pth_sample4 - AssertionError: assert b''
FAILED tests/test_integration.py::test_pth_sample2 - Failed: nomatch: '*tests...
FAILED tests/test_integration.py::test_pid_prefix[True-CodePrinter] - Failed:...
FAILED tests/test_integration.py::test_pid_prefix[True-CallPrinter] - Failed:...
FAILED tests/test_integration.py::test_pid_prefix[False-CodePrinter] - Failed...
FAILED tests/test_integration.py::test_pid_prefix[False-CallPrinter] - Failed...
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=2] - F...
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=3] - F...
FAILED tests/test_integration.py::test_depth_limit_subprocess[depth_lt=4] - F...
FAILED tests/test_integration.py::test_pdb[postmortem-pdb] - AssertionError: ...
FAILED tests/test_integration.py::test_pdb[postmortem-ipdb] - AssertionError:...
FAILED tests/test_integration.py::test_pdb[settrace-pdb] - AssertionError: Wa...
FAILED tests/test_integration.py::test_pdb[settrace-ipdb] - AssertionError: W...
FAILED tests/test_integration.py::test_pdb[debugger-pdb] - AssertionError: Wa...
FAILED tests/test_integration.py::test_pdb[debugger-ipdb] - AssertionError: W...
FAILED tests/test_remote.py::test_manhole - FileNotFoundError: [Errno 2] No s...
FAILED tests/test_remote.py::test_manhole_reattach - FileNotFoundError: [Errn...
FAILED tests/test_remote.py::test_manhole_clean_exit - FileNotFoundError: [Er...
============ 19 failed, 121 passed, 3 skipped in 369.08s (0:06:09) =============

@kloczek
Copy link
Author

kloczek commented Mar 25, 2024

BTW looks like test suite uses eviltracer and I cannot find that module on pypi.

Gentle ping .. ay update about that part? 🤔

@The-Compiler
Copy link
Contributor

That question was already answered above. It's shipped with the tests.

@kloczek
Copy link
Author

kloczek commented Mar 25, 2024

That question was already answered above. It's shipped with the tests.

Sorry my mistake.

Why not just build that module DSO as normal part of the build and exclude it from be a part of the wheel archive? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants