-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi,
I wanted to use tempdir to generate a Unix socket path for tests and just found out that they have stricter length limits than regular file names (108 on linux).
An excerpt from my logs:
Starting server on 127.0.0.1:41661; agent on "/home/wiktor/tmp/cargo/testdir-20/ssh_roundtrip/start_ssh_server_connect_and_check_result_of_signing/agent.sock"
...
thread 'start_ssh_server_connect_and_check_result_of_signing' panicked at signstar-request-signature/tests/ssh-roundtrip.rs:181:40:
error: std::io::error::Error - path must be shorter than SUN_LEN
("/home/wiktor/tmp/cargo/testdir-20/ssh_roundtrip/start_ssh_server_connect_and_check_result_of_signing/agent.sock" has 111 characters).
A workaround is to use shorter test names but sadly the path to the temp file varies between my local computer and the CI and this kind of workaround is basically a bomb that may go off any time.
It'd be good to be able to generate shorter, but still unique, paths with testdir.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels