diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/fs.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -371,6 +371,22 @@ def discovery(binary, embedded=False): assert f'err {unsaved} ctl: Save /nonexistent-pardes-dir/x.txt: '.encode() in client.read('/log'), client.read('/log') client.remove(f'/pane/{unsaved}') + # Sixteen connections fill the slots; the next is told why. + extra = [Client(address) for _ in range(15)] + try: + try: + Client(address).__exit__() + raise AssertionError('a seventeenth connection was served') + except OSError as refused: + assert 'too many connections' in str(refused), refused + finally: + for other in extra: + other.__exit__() + deadline = time.monotonic() + 5 + while b'err - 9p: too many connections' not in client.read('/log'): + assert time.monotonic() < deadline, client.read('/log') + time.sleep(.01) + print('9P discovery: listing/stat/find are inert; new, remove, look, exec, name, sel, log, ctl lock, focus, the ctl split and commands behave') |
