Lul, never use `'uds'` tpt for macos test-scripts
It's explained in the comment and i really think it's getting more hilarious the more i learn about the arbitrary limitations of user space with this tina platform.ns_aware
parent
b7546fd221
commit
82d02ef404
|
|
@ -3,6 +3,7 @@ Verify we can dump a `stackscope` tree on a hang.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
import trio
|
import trio
|
||||||
|
|
@ -31,13 +32,26 @@ async def main(
|
||||||
from_test: bool = False,
|
from_test: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
||||||
|
if platform.system() != 'Darwin':
|
||||||
|
tpt = 'uds'
|
||||||
|
else:
|
||||||
|
# XXX, precisely we can't use pytest's tmp-path generation
|
||||||
|
# for tests.. apparently because:
|
||||||
|
#
|
||||||
|
# > The OSError: AF_UNIX path too long in macOS Python occurs
|
||||||
|
# > because the path to the Unix domain socket exceeds the
|
||||||
|
# > operating system's maximum path length limit (around 104
|
||||||
|
#
|
||||||
|
# WHICH IS just, wtf hillarious XD
|
||||||
|
tpt = 'tcp'
|
||||||
|
|
||||||
async with (
|
async with (
|
||||||
tractor.open_nursery(
|
tractor.open_nursery(
|
||||||
debug_mode=True,
|
debug_mode=True,
|
||||||
enable_stack_on_sig=True,
|
enable_stack_on_sig=True,
|
||||||
# maybe_enable_greenback=False,
|
# maybe_enable_greenback=False,
|
||||||
loglevel='devx',
|
loglevel='devx',
|
||||||
enable_transports=['uds'],
|
enable_transports=[tpt],
|
||||||
) as an,
|
) as an,
|
||||||
):
|
):
|
||||||
ptl: tractor.Portal = await an.start_actor(
|
ptl: tractor.Portal = await an.start_actor(
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import platform
|
||||||
|
|
||||||
import tractor
|
import tractor
|
||||||
import trio
|
import trio
|
||||||
|
|
||||||
|
|
@ -34,9 +36,22 @@ async def just_bp(
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
|
|
||||||
|
if platform.system() != 'Darwin':
|
||||||
|
tpt = 'uds'
|
||||||
|
else:
|
||||||
|
# XXX, precisely we can't use pytest's tmp-path generation
|
||||||
|
# for tests.. apparently because:
|
||||||
|
#
|
||||||
|
# > The OSError: AF_UNIX path too long in macOS Python occurs
|
||||||
|
# > because the path to the Unix domain socket exceeds the
|
||||||
|
# > operating system's maximum path length limit (around 104
|
||||||
|
#
|
||||||
|
# WHICH IS just, wtf hillarious XD
|
||||||
|
tpt = 'tcp'
|
||||||
|
|
||||||
async with tractor.open_nursery(
|
async with tractor.open_nursery(
|
||||||
debug_mode=True,
|
debug_mode=True,
|
||||||
enable_transports=['uds'],
|
enable_transports=[tpt],
|
||||||
loglevel='devx',
|
loglevel='devx',
|
||||||
) as n:
|
) as n:
|
||||||
p = await n.start_actor(
|
p = await n.start_actor(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue