Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 668
    • Issues 668
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #3020

Closed
Open
Created May 26, 2019 by Bitbucket Importer@bitbucket_importerMaintainer

Error Code Handling in Multiprocessing Tests

Created originally on Bitbucket by andrewjlawrence (Andrew Lawrence)

There is some behavior of error codes that I cannot explain in test_multiprocessing_spawn.py.

When running the tests lib-python\3\test\test_multiprocessing_spawn.py WithManagerTestLock.test_lock WithProcessesTestBarrier.test_barrier on Windows the error code leaks from test_lock into test_barrier causing test_barrier to fail.

In CPython the error codes do not leak between the tests like this.

‌

I have also noticed that doing p _winapi.GetLastError() from pdb inside WithProcessesTestBarrier.test_barrier in CPython produces the error code from the previous test but print(_winapi.GetLastError()) in the test itself does not result in the error.

Also inserting the following code into _test_multiprocessing.py results in different behaviour on both CPython and windows when running test_multiprocessing_spawn.py WithManagerTestLock.test_lock

class ManagerMixin(object):
  def tearDownClass(cls):
        import ctypes
        ctypes.windll.kernel32.SetLastError(996)
        print(_winapi.GetLastError())
        print(ctypes.windll.kernel32.GetLastError())

The final print statement produces 0 in CPython and 996 in PyPy

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking