Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
The Python test suite has multiple tests on AF_UNIX sockets. They create a temporary socket path. Example with test_socketserver:
return tempfile.mktemp(prefix='unix_socket.')The problem is that if the temporary directory is too long, creating a socket with this path fails with "OSError: AF_UNIX path too long". On Linux, sun_path is 107 bytes.
With my PR#93817, TMPDIR becomes something like(...)/test_python_157983_æ/test_python_worker_243024_æ_tmpdir/. For example, the path/home/vstinner/python/main/build/test_python_157983_æ/test_python_worker_243024_æ_tmpdir/unix_socket.xxxxxxxx is 11 bytes long, longer than the limit of 107 bytes.
I see different options:
- Use a relative path
- Create a temporary socket path in the current directory rather than in TMPDIR
- Skip tests if AF_UNIX path is too long