Skip to content

Errors with track-memory on OpenBSD #219

@lcheylus

Description

@lcheylus

I'm trying to use pyperf on OpenBSD (current version on amd64) with Python 3.12.11. And I have some errors when running tests with the current version cloned from GitHub:

$ uname -a
OpenBSD openbsd-dev.home.lan 7.8 GENERIC.MP#58 amd64
$ python3 -V
Python 3.12.11

$ pytest
(...)
==== FAILURES ====
____
TestPerfCLI.test_command_track_memory 
____

self = <pyperf.tests.test_perf_cli.TestPerfCLI testMethod=test_command_track_memory>

    @unittest.skipIf(sys.platform == 'win32',
                     'https://github.com/psf/pyperf/issues/97')
    def test_command_track_memory(self):
        cmd = (sys.executable, '-c', 'pass')
        with tests.temporary_file() as tmp_name:
            args = ('command',
                    '--track-memory',
                    '-p2', '-w1', '-l2', '-n3',
                    '-o', tmp_name,
                    '--')
            args += cmd
>           self.run_command(*args)

pyperf/tests/test_perf_cli.py:727:
_ _ _ _ 
pyperf/tests/test_perf_cli.py:36: in run_command
    self.assertEqual(proc.returncode, 0)
E   AssertionError: 1 != 0
_______ TestPerfCLI.test_track_memory ____

self = <pyperf.tests.test_perf_cli.TestPerfCLI testMethod=test_track_memory>

    def test_track_memory(self):
>       self._check_track_memory('--track-memory')

pyperf/tests/test_perf_cli.py:706:
_ _ _ _ 
pyperf/tests/test_perf_cli.py:696: in _check_track_memory
    self.run_command('timeit',
pyperf/tests/test_perf_cli.py:36: in run_command
    self.assertEqual(proc.returncode, 0)
E   AssertionError: 1 != 0
==== short test summary info ====
FAILED pyperf/tests/test_perf_cli.py::TestPerfCLI::test_command_track_memory - AssertionError: 1 != 0
FAILED pyperf/tests/test_perf_cli.py::TestPerfCLI::test_track_memory - AssertionError: 1 != 0
==== 2 failed, 171 passed in 42.39s ====

It seems that pyperf --track-memory is not supported correctly on OpenBSD (and IMHO on BSD OS in general).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions