New submission from STINNER Victor <vstin...@redhat.com>:

test_semaphore_tracker_sigint() emits a warning. If the test is run with -W 
error, the test fails.

vstinner@apu$ ./python -m test test_multiprocessing_fork -v -m 
test_semaphore_tracker_sigint
(...)
test_semaphore_tracker_sigint 
(test.test_multiprocessing_fork.TestSemaphoreTracker) ... 
/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py:55: 
UserWarning: semaphore_tracker: process died unexpectedly, relaunching.  Some 
semaphores might leak.
  warnings.warn('semaphore_tracker: process died unexpectedly, '
ok
(...)
Tests result: SUCCESS

vstinner@apu$ ./python  -Werror  -m test test_multiprocessing_fork -v -m 
test_semaphore_tracker_sigint
(...)
======================================================================
ERROR: test_semaphore_tracker_sigint 
(test.test_multiprocessing_fork.TestSemaphoreTracker)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/_test_multiprocessing.py", 
line 4533, in test_semaphore_tracker_sigint
    self.check_semaphore_tracker_death(signal.SIGINT, False)
  File "/home/vstinner/prog/python/master/Lib/test/_test_multiprocessing.py", 
line 4521, in check_semaphore_tracker_death
    sem = ctx.Semaphore()
  File "/home/vstinner/prog/python/master/Lib/multiprocessing/context.py", line 
82, in Semaphore
    return Semaphore(value, ctx=self.get_context())
  File "/home/vstinner/prog/python/master/Lib/multiprocessing/synchronize.py", 
line 127, in __init__
    SemLock.__init__(self, SEMAPHORE, value, SEM_VALUE_MAX, ctx=ctx)
  File "/home/vstinner/prog/python/master/Lib/multiprocessing/synchronize.py", 
line 81, in __init__
    register(self._semlock.name)
  File 
"/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", 
line 83, in register
    self._send('REGISTER', name)
  File 
"/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", 
line 90, in _send
    self.ensure_running()
  File 
"/home/vstinner/prog/python/master/Lib/multiprocessing/semaphore_tracker.py", 
line 55, in ensure_running
    warnings.warn('semaphore_tracker: process died unexpectedly, '
UserWarning: semaphore_tracker: process died unexpectedly, relaunching.  Some 
semaphores might leak.
(...)
Tests result: FAILURE

----------
components: Tests
messages: 317372
nosy: davin, pitrou, vstinner
priority: normal
severity: normal
status: open
title: test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W 
error
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33613>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to