Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .github/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,7 @@ cache:
- externals -> PCbuild
before_build:
- ps: |+
if ($env:APPVEYOR_RE_BUILD) {
echo 'Doing full build due to re-build request.'
} elseif (!$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) {
echo 'Not a PR, doing full build.'
} else {
git fetch -q origin +refs/heads/$env:APPVEYOR_REPO_BRANCH
$mergebase = git merge-base HEAD FETCH_HEAD
$changes = git diff --name-only HEAD $mergebase | grep -vE '(\.rst$)|(^Doc)|(^Misc)'
If (!$changes) {
echo 'Only docs were updated, stopping build process.'
Exit-AppveyorBuild
}
echo 'Doing full build due to non-doc changes in these files:'
echo $changes
}
Exit-AppveyorBuild


build_script:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ script:
# Check that all symbols exported by libpython start with "Py" or "_Py"
- make smelly
# `-r -w` implicitly provided through `make buildbottest`.
- make buildbottest TESTOPTS="-j4 -uall,-cpu"
- make buildbottest TESTOPTS="-j4 -uall,-cpu --randseed=7474929 -x test_regrtest"

notifications:
email: false
Expand Down
29 changes: 22 additions & 7 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4332,16 +4332,27 @@ class TestIgnoreEINTR(unittest.TestCase):

@classmethod
def _test_ignore(cls, conn):
def handler(signum, frame):
pass
signal.signal(signal.SIGUSR1, handler)
conn.send('ready')
x = conn.recv()
conn.send(x)
conn.send_bytes(b'x' * (1024 * 1024)) # sending 1 MiB should block
print(f"child: pid={os.getpid()} ppid={os.getppid()}", flush=True)
try:
def handler(signum, frame):
pass
signal.signal(signal.SIGUSR1, handler)
conn.send('ready')
x = conn.recv()
conn.send(x)

print(f"child: send BIG", flush=True)
conn.send_bytes(b'x' * (1024 * 1024)) # sending 1 MiB should block
print(f"child: done", flush=True)
except Exception as exc:
print(f"child: ERR", flush=True)
print(f"child: ERR: {exc}", flush=True)
print(f"child: ERR: {type(exc)}", flush=True)
raise

@unittest.skipUnless(hasattr(signal, 'SIGUSR1'), 'requires SIGUSR1')
def test_ignore(self):
print(f"parent: pid={os.getpid()}", flush=True)
conn, child_conn = multiprocessing.Pipe()
try:
p = multiprocessing.Process(target=self._test_ignore,
Expand All @@ -4351,15 +4362,19 @@ def test_ignore(self):
child_conn.close()
self.assertEqual(conn.recv(), 'ready')
time.sleep(0.1)

os.kill(p.pid, signal.SIGUSR1)
time.sleep(0.1)
conn.send(1234)
self.assertEqual(conn.recv(), 1234)
time.sleep(0.1)

print(f"parent: second SIGUSR1", flush=True)
os.kill(p.pid, signal.SIGUSR1)
self.assertEqual(conn.recv_bytes(), b'x'*(1024*1024))
time.sleep(0.1)
p.join()
print(f"parent: done", flush=True)
finally:
conn.close()

Expand Down
5 changes: 3 additions & 2 deletions Lib/test/libregrtest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,9 @@ def _main(self, tests, kwargs):
self.run_tests()
self.display_result()

if self.ns.verbose2 and self.bad:
self.rerun_failed_tests()
if 'test_multiprocessing_forkserver' not in self.bad:
self.bad.append('test_multiprocessing_forkserver')
self.rerun_failed_tests()

self.finalize()
if self.bad:
Expand Down