|
@@ 470-480 (lines=11) @@
|
| 467 |
|
wait_for_strings(proc.read, TIMEOUT, '/tmp/manhole-') |
| 468 |
|
uds_path = re.findall(r"(/tmp/manhole-\d+)", proc.read())[0] |
| 469 |
|
wait_for_strings(proc.read, TIMEOUT, 'Waiting for new connection') |
| 470 |
|
assert_manhole_running(proc, uds_path, oneshot=True, |
| 471 |
|
extra=lambda client: client.sock.send(b"raise SystemExit()\n")) |
| 472 |
|
|
| 473 |
|
proc.reset() |
| 474 |
|
proc.signal(signal.SIGUSR2) |
| 475 |
|
wait_for_strings(proc.read, TIMEOUT, '/tmp/manhole-') |
| 476 |
|
uds_path = re.findall(r"(/tmp/manhole-\d+)", proc.read())[0] |
| 477 |
|
wait_for_strings(proc.read, TIMEOUT, 'Waiting for new connection') |
| 478 |
|
assert_manhole_running(proc, uds_path, oneshot=True) |
| 479 |
|
|
| 480 |
|
|
| 481 |
|
def test_interrupt_on_accept(): |
| 482 |
|
with TestProcess(sys.executable, '-u', HELPER, 'test_interrupt_on_accept') as proc: |
| 483 |
|
with dump_on_error(proc.read): |
|
@@ 426-436 (lines=11) @@
|
| 423 |
|
wait_for_strings(proc.read, TIMEOUT, 'signalled=True') |
| 424 |
|
assert_manhole_running(proc, uds_path) |
| 425 |
|
|
| 426 |
|
|
| 427 |
|
def test_activate_on_usr2(): |
| 428 |
|
with TestProcess(sys.executable, '-u', HELPER, 'test_activate_on_usr2') as proc: |
| 429 |
|
with dump_on_error(proc.read): |
| 430 |
|
wait_for_strings(proc.read, TIMEOUT, 'Not patching os.fork and os.forkpty. Activation is done by signal') |
| 431 |
|
raises(AssertionError, wait_for_strings, proc.read, TIMEOUT, '/tmp/manhole-') |
| 432 |
|
proc.signal(signal.SIGUSR2) |
| 433 |
|
wait_for_strings(proc.read, TIMEOUT, '/tmp/manhole-') |
| 434 |
|
uds_path = re.findall(r"(/tmp/manhole-\d+)", proc.read())[0] |
| 435 |
|
wait_for_strings(proc.read, TIMEOUT, 'Waiting for new connection') |
| 436 |
|
assert_manhole_running(proc, uds_path) |
| 437 |
|
|
| 438 |
|
|
| 439 |
|
def test_activate_on_with_oneshot_on(): |