def ipc_socket_path(tmp_path):
    if salt.utils.platform.is_darwin():
        # A shorter path so that we don't hit the AF_UNIX path too long
        tmp_path = pathlib.Path("/tmp").resolve()
    _socket_path = tmp_path / "ipc-test.ipc"
    try:
        yield _socket_path
    finally:
        if _socket_path.exists():
            _socket_path.unlink()